summaryrefslogtreecommitdiff
path: root/src/ltc/ciphers/aes/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ltc/ciphers/aes/aes.c')
-rw-r--r--src/ltc/ciphers/aes/aes.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ltc/ciphers/aes/aes.c b/src/ltc/ciphers/aes/aes.c
index cc9d99f3..2bf7a005 100644
--- a/src/ltc/ciphers/aes/aes.c
+++ b/src/ltc/ciphers/aes/aes.c
@@ -675,11 +675,11 @@ int ECB_TEST(void)
}
};
- symmetric_key key;
- unsigned char tmp[2][16];
- int i, y;
+ symmetric_key key;
+ unsigned char tmp[2][16];
+ int i, y;
- for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) {
+ for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) {
zeromem(&key, sizeof(key));
if ((err = rijndael_setup(tests[i].key, tests[i].keylen, 0, &key)) != CRYPT_OK) {
return err;
@@ -707,13 +707,13 @@ int ECB_TEST(void)
return CRYPT_FAIL_TESTVECTOR;
}
- /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */
- for (y = 0; y < 16; y++) tmp[0][y] = 0;
- for (y = 0; y < 1000; y++) rijndael_ecb_encrypt(tmp[0], tmp[0], &key);
- for (y = 0; y < 1000; y++) rijndael_ecb_decrypt(tmp[0], tmp[0], &key);
- for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR;
- }
- return CRYPT_OK;
+ /* now see if we can encrypt all zero bytes 1000 times, decrypt and come back where we started */
+ for (y = 0; y < 16; y++) tmp[0][y] = 0;
+ for (y = 0; y < 1000; y++) rijndael_ecb_encrypt(tmp[0], tmp[0], &key);
+ for (y = 0; y < 1000; y++) rijndael_ecb_decrypt(tmp[0], tmp[0], &key);
+ for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR;
+ }
+ return CRYPT_OK;
#endif
}