aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
commit0651133db30c0932877780c2f98901e4ca1072e1 (patch)
tree2b87823b4b9f4b5a75affa4b1606abb06a598c97 /test
parentfactor out 128-bit XORing (diff)
downloadaes-tools-0651133db30c0932877780c2f98901e4ca1072e1.tar.gz
aes-tools-0651133db30c0932877780c2f98901e4ca1072e1.zip
refactoring
Diffstat (limited to 'test')
-rw-r--r--test/aes128cbc_decrypt_block.c8
-rw-r--r--test/aes128cbc_encrypt_block.c6
-rw-r--r--test/aes128cfb_decrypt_block.c6
-rw-r--r--test/aes128cfb_encrypt_block.c6
-rw-r--r--test/aes128ctr_decrypt_block.c6
-rw-r--r--test/aes128ctr_encrypt_block.c6
-rw-r--r--test/aes128ecb_decrypt_block.c8
-rw-r--r--test/aes128ecb_encrypt_block.c6
-rw-r--r--test/aes128ofb_decrypt_block.c6
-rw-r--r--test/aes128ofb_encrypt_block.c6
-rw-r--r--test/aes192cbc_decrypt_block.c8
-rw-r--r--test/aes192cbc_encrypt_block.c6
-rw-r--r--test/aes192cfb_decrypt_block.c6
-rw-r--r--test/aes192cfb_encrypt_block.c6
-rw-r--r--test/aes192ctr_decrypt_block.c6
-rw-r--r--test/aes192ctr_encrypt_block.c6
-rw-r--r--test/aes192ecb_decrypt_block.c8
-rw-r--r--test/aes192ecb_encrypt_block.c6
-rw-r--r--test/aes192ofb_decrypt_block.c6
-rw-r--r--test/aes192ofb_encrypt_block.c6
-rw-r--r--test/aes256cbc_decrypt_block.c8
-rw-r--r--test/aes256cbc_encrypt_block.c6
-rw-r--r--test/aes256cfb_decrypt_block.c6
-rw-r--r--test/aes256cfb_encrypt_block.c6
-rw-r--r--test/aes256ctr_decrypt_block.c6
-rw-r--r--test/aes256ctr_encrypt_block.c6
-rw-r--r--test/aes256ecb_decrypt_block.c8
-rw-r--r--test/aes256ecb_encrypt_block.c6
-rw-r--r--test/aes256ofb_decrypt_block.c6
-rw-r--r--test/aes256ofb_encrypt_block.c6
30 files changed, 96 insertions, 96 deletions
diff --git a/test/aes128cbc_decrypt_block.c b/test/aes128cbc_decrypt_block.c
index 933c279..73586eb 100644
--- a/test/aes128cbc_decrypt_block.c
+++ b/test/aes128cbc_decrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule, inverted_schedule;
+ AesNI_Aes128_RoundKeys key_schedule, inverted_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,8 +40,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
- aesni_invert_key_schedule128(&key_schedule, &inverted_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
+ aesni_aes128_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cbc128(cipher, &inverted_schedule, iv, &iv);
+ plain = aesni_aes128_decrypt_block_cbc(cipher, &inverted_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes128cbc_encrypt_block.c b/test/aes128cbc_encrypt_block.c
index 109dfc1..dfdd7d3 100644
--- a/test/aes128cbc_encrypt_block.c
+++ b/test/aes128cbc_encrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cbc128(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes128_encrypt_block_cbc(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes128cfb_decrypt_block.c b/test/aes128cfb_decrypt_block.c
index 4f4803a..a78f276 100644
--- a/test/aes128cfb_decrypt_block.c
+++ b/test/aes128cfb_decrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cfb128(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes128_decrypt_block_cfb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes128cfb_encrypt_block.c b/test/aes128cfb_encrypt_block.c
index 90a1a4b..576a2ed 100644
--- a/test/aes128cfb_encrypt_block.c
+++ b/test/aes128cfb_encrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cfb128(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes128_encrypt_block_cfb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes128ctr_decrypt_block.c b/test/aes128ctr_decrypt_block.c
index 54c8375..940d2f4 100644
--- a/test/aes128ctr_decrypt_block.c
+++ b/test/aes128ctr_decrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
int ctr = 0;
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ctr128(cipher, &key_schedule, iv, ctr++);
+ plain = aesni_aes128_decrypt_block_ctr(cipher, &key_schedule, iv, ctr++);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes128ctr_encrypt_block.c b/test/aes128ctr_encrypt_block.c
index d5cec3b..32dd216 100644
--- a/test/aes128ctr_encrypt_block.c
+++ b/test/aes128ctr_encrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
int ctr = 0;
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ctr128(plain, &key_schedule, iv, ctr++);
+ cipher = aesni_aes128_encrypt_block_ctr(plain, &key_schedule, iv, ctr++);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes128ecb_decrypt_block.c b/test/aes128ecb_decrypt_block.c
index f470ecc..5885fb9 100644
--- a/test/aes128ecb_decrypt_block.c
+++ b/test/aes128ecb_decrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher;
- AesNI_KeySchedule128 key_schedule, inverted_schedule;
+ AesNI_Aes128_RoundKeys key_schedule, inverted_schedule;
if (argc < 1)
exit_with_usage();
@@ -34,8 +34,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
- aesni_invert_key_schedule128(&key_schedule, &inverted_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
+ aesni_aes128_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ecb128(cipher, &inverted_schedule);
+ plain = aesni_aes128_decrypt_block_ecb(cipher, &inverted_schedule);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes128ecb_encrypt_block.c b/test/aes128ecb_encrypt_block.c
index be86d05..040d47d 100644
--- a/test/aes128ecb_encrypt_block.c
+++ b/test/aes128ecb_encrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 1)
exit_with_usage();
@@ -34,7 +34,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ecb128(plain, &key_schedule);
+ cipher = aesni_aes128_encrypt_block_ecb(plain, &key_schedule);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes128ofb_decrypt_block.c b/test/aes128ofb_decrypt_block.c
index b8a6880..16f148d 100644
--- a/test/aes128ofb_decrypt_block.c
+++ b/test/aes128ofb_decrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ofb128(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes128_decrypt_block_ofb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes128ofb_encrypt_block.c b/test/aes128ofb_encrypt_block.c
index a64fa31..4532cc8 100644
--- a/test/aes128ofb_encrypt_block.c
+++ b/test/aes128ofb_encrypt_block.c
@@ -23,7 +23,7 @@ int main(int argc, char** argv)
for (--argc, ++argv; argc > -1; --argc, ++argv)
{
AesNI_Block128 plain, key, cipher, iv;
- AesNI_KeySchedule128 key_schedule;
+ AesNI_Aes128_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule128(key, &key_schedule);
+ aesni_aes128_expand_key(key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ofb128(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes128_encrypt_block_ofb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes192cbc_decrypt_block.c b/test/aes192cbc_decrypt_block.c
index 2ee439f..9d5e1d6 100644
--- a/test/aes192cbc_decrypt_block.c
+++ b/test/aes192cbc_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule, inverted_schedule;
+ AesNI_Aes192_RoundKeys key_schedule, inverted_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,8 +41,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
- aesni_invert_key_schedule192(&key_schedule, &inverted_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
+ aesni_aes192_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cbc192(cipher, &inverted_schedule, iv, &iv);
+ plain = aesni_aes192_decrypt_block_cbc(cipher, &inverted_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes192cbc_encrypt_block.c b/test/aes192cbc_encrypt_block.c
index ffd164e..d562ae5 100644
--- a/test/aes192cbc_encrypt_block.c
+++ b/test/aes192cbc_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cbc192(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes192_encrypt_block_cbc(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes192cfb_decrypt_block.c b/test/aes192cfb_decrypt_block.c
index 4bd04bd..b5703d1 100644
--- a/test/aes192cfb_decrypt_block.c
+++ b/test/aes192cfb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cfb192(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes192_decrypt_block_cfb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes192cfb_encrypt_block.c b/test/aes192cfb_encrypt_block.c
index 6248e94..a23aa72 100644
--- a/test/aes192cfb_encrypt_block.c
+++ b/test/aes192cfb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cfb192(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes192_encrypt_block_cfb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes192ctr_decrypt_block.c b/test/aes192ctr_decrypt_block.c
index 6d0387e..14e91d9 100644
--- a/test/aes192ctr_decrypt_block.c
+++ b/test/aes192ctr_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
int ctr = 0;
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ctr192(cipher, &key_schedule, iv, ctr++);
+ plain = aesni_aes192_decrypt_block_ctr(cipher, &key_schedule, iv, ctr++);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes192ctr_encrypt_block.c b/test/aes192ctr_encrypt_block.c
index d0780c1..e613d87 100644
--- a/test/aes192ctr_encrypt_block.c
+++ b/test/aes192ctr_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
int ctr = 0;
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ctr192(plain, &key_schedule, iv, ctr++);
+ cipher = aesni_aes192_encrypt_block_ctr(plain, &key_schedule, iv, ctr++);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes192ecb_decrypt_block.c b/test/aes192ecb_decrypt_block.c
index 399e00c..39689e9 100644
--- a/test/aes192ecb_decrypt_block.c
+++ b/test/aes192ecb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule, inverted_schedule;
+ AesNI_Aes192_RoundKeys key_schedule, inverted_schedule;
if (argc < 1)
exit_with_usage();
@@ -35,8 +35,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
- aesni_invert_key_schedule192(&key_schedule, &inverted_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
+ aesni_aes192_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -48,7 +48,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ecb192(cipher, &inverted_schedule);
+ plain = aesni_aes192_decrypt_block_ecb(cipher, &inverted_schedule);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes192ecb_encrypt_block.c b/test/aes192ecb_encrypt_block.c
index 051efc3..167ffd4 100644
--- a/test/aes192ecb_encrypt_block.c
+++ b/test/aes192ecb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 1)
exit_with_usage();
@@ -35,7 +35,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ecb192(plain, &key_schedule);
+ cipher = aesni_aes192_encrypt_block_ecb(plain, &key_schedule);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes192ofb_decrypt_block.c b/test/aes192ofb_decrypt_block.c
index 0cc1501..4dd5fbb 100644
--- a/test/aes192ofb_decrypt_block.c
+++ b/test/aes192ofb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ofb192(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes192_decrypt_block_ofb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes192ofb_encrypt_block.c b/test/aes192ofb_encrypt_block.c
index 8282c23..2a45b79 100644
--- a/test/aes192ofb_encrypt_block.c
+++ b/test/aes192ofb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block192 key;
- AesNI_KeySchedule192 key_schedule;
+ AesNI_Aes192_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule192(&key, &key_schedule);
+ aesni_aes192_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ofb192(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes192_encrypt_block_ofb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes256cbc_decrypt_block.c b/test/aes256cbc_decrypt_block.c
index b3b15ce..7cfd85a 100644
--- a/test/aes256cbc_decrypt_block.c
+++ b/test/aes256cbc_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule, inverted_schedule;
+ AesNI_Aes256_RoundKeys key_schedule, inverted_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,8 +41,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
- aesni_invert_key_schedule256(&key_schedule, &inverted_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
+ aesni_aes256_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cbc256(cipher, &inverted_schedule, iv, &iv);
+ plain = aesni_aes256_decrypt_block_cbc(cipher, &inverted_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes256cbc_encrypt_block.c b/test/aes256cbc_encrypt_block.c
index cb3be83..9c0c24b 100644
--- a/test/aes256cbc_encrypt_block.c
+++ b/test/aes256cbc_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cbc256(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes256_encrypt_block_cbc(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes256cfb_decrypt_block.c b/test/aes256cfb_decrypt_block.c
index cfdfb4b..3f8f696 100644
--- a/test/aes256cfb_decrypt_block.c
+++ b/test/aes256cfb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_cfb256(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes256_decrypt_block_cfb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes256cfb_encrypt_block.c b/test/aes256cfb_encrypt_block.c
index 0a73528..aca05a8 100644
--- a/test/aes256cfb_encrypt_block.c
+++ b/test/aes256cfb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_cfb256(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes256_encrypt_block_cfb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes256ctr_decrypt_block.c b/test/aes256ctr_decrypt_block.c
index 6e7f875..8255a11 100644
--- a/test/aes256ctr_decrypt_block.c
+++ b/test/aes256ctr_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
int ctr = 0;
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ctr256(cipher, &key_schedule, iv, ctr++);
+ plain = aesni_aes256_decrypt_block_ctr(cipher, &key_schedule, iv, ctr++);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes256ctr_encrypt_block.c b/test/aes256ctr_encrypt_block.c
index 667b593..580c6e7 100644
--- a/test/aes256ctr_encrypt_block.c
+++ b/test/aes256ctr_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
int ctr = 0;
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ctr256(plain, &key_schedule, iv, ctr++);
+ cipher = aesni_aes256_encrypt_block_ctr(plain, &key_schedule, iv, ctr++);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes256ecb_decrypt_block.c b/test/aes256ecb_decrypt_block.c
index 0ea066a..f4b38c5 100644
--- a/test/aes256ecb_decrypt_block.c
+++ b/test/aes256ecb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule, inverted_schedule;
+ AesNI_Aes256_RoundKeys key_schedule, inverted_schedule;
if (argc < 1)
exit_with_usage();
@@ -35,8 +35,8 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
- aesni_invert_key_schedule256(&key_schedule, &inverted_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
+ aesni_aes256_derive_decryption_keys(&key_schedule, &inverted_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -48,7 +48,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ecb256(cipher, &inverted_schedule);
+ plain = aesni_aes256_decrypt_block_ecb(cipher, &inverted_schedule);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes256ecb_encrypt_block.c b/test/aes256ecb_encrypt_block.c
index 289c82f..7752383 100644
--- a/test/aes256ecb_encrypt_block.c
+++ b/test/aes256ecb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 1)
exit_with_usage();
@@ -35,7 +35,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ecb256(plain, &key_schedule);
+ cipher = aesni_aes256_encrypt_block_ecb(plain, &key_schedule);
aesni_print_block128(&cipher, NULL);
}
}
diff --git a/test/aes256ofb_decrypt_block.c b/test/aes256ofb_decrypt_block.c
index e323d79..b1c533d 100644
--- a/test/aes256ofb_decrypt_block.c
+++ b/test/aes256ofb_decrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- plain = aesni_decrypt_block_ofb256(cipher, &key_schedule, iv, &iv);
+ plain = aesni_aes256_decrypt_block_ofb(cipher, &key_schedule, iv, &iv);
aesni_print_block128(&plain, NULL);
}
}
diff --git a/test/aes256ofb_encrypt_block.c b/test/aes256ofb_encrypt_block.c
index 7a185eb..975a653 100644
--- a/test/aes256ofb_encrypt_block.c
+++ b/test/aes256ofb_encrypt_block.c
@@ -24,7 +24,7 @@ int main(int argc, char** argv)
{
AesNI_Block128 plain, cipher, iv;
AesNI_Block256 key;
- AesNI_KeySchedule256 key_schedule;
+ AesNI_Aes256_RoundKeys key_schedule;
if (argc < 2)
exit_with_usage();
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
exit_with_usage();
}
- aesni_expand_key_schedule256(&key, &key_schedule);
+ aesni_aes256_expand_key(&key, &key_schedule);
for (argc -= 2, argv += 2; argc > 0; --argc, ++argv)
{
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv);
continue;
}
- cipher = aesni_encrypt_block_ofb256(plain, &key_schedule, iv, &iv);
+ cipher = aesni_aes256_encrypt_block_ofb(plain, &key_schedule, iv, &iv);
aesni_print_block128(&cipher, NULL);
}
}