summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/ciphers/kasumi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/ciphers/kasumi.c')
-rw-r--r--libtomcrypt/src/ciphers/kasumi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libtomcrypt/src/ciphers/kasumi.c b/libtomcrypt/src/ciphers/kasumi.c
index 3b765d0..7c2add5 100644
--- a/libtomcrypt/src/ciphers/kasumi.c
+++ b/libtomcrypt/src/ciphers/kasumi.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
/**
@@ -33,7 +31,7 @@ const struct ltc_cipher_descriptor kasumi_desc = {
&kasumi_test,
&kasumi_done,
&kasumi_keysize,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static u16 FI( u16 in, u16 subkey )
@@ -150,7 +148,7 @@ int kasumi_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key
LOAD32H(left, pt);
LOAD32H(right, pt+4);
- for (n = 0; n <= 7; ) {
+ for (n = 0; n <= 7; ) {
temp = FL(left, n, skey);
temp = FO(temp, n++, skey);
right ^= temp;
@@ -236,6 +234,7 @@ int kasumi_setup(const unsigned char *key, int keylen, int num_rounds, symmetric
void kasumi_done(symmetric_key *skey)
{
+ LTC_UNUSED_PARAM(skey);
}
int kasumi_keysize(int *keysize)
@@ -303,7 +302,8 @@ int kasumi_test(void)
if ((err = kasumi_ecb_decrypt(tests[x].ct, buf[1], &key)) != CRYPT_OK) {
return err;
}
- if (XMEMCMP(tests[x].pt, buf[1], 8) || XMEMCMP(tests[x].ct, buf[0], 8)) {
+ if (compare_testvector(buf[1], 8, tests[x].pt, 8, "Kasumi Decrypt", x) ||
+ compare_testvector(buf[0], 8, tests[x].ct, 8, "Kasumi Encrypt", x)) {
return CRYPT_FAIL_TESTVECTOR;
}
}
@@ -313,6 +313,6 @@ int kasumi_test(void)
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */