aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/aes128cbc.c4
-rw-r--r--examples/aes128cfb.c4
-rw-r--r--examples/aes128ctr.c4
-rw-r--r--examples/aes128ecb.c4
-rw-r--r--examples/aes128ofb.c4
-rw-r--r--examples/aes192cbc.c4
-rw-r--r--examples/aes192cfb.c4
-rw-r--r--examples/aes192ctr.c4
-rw-r--r--examples/aes192ecb.c4
-rw-r--r--examples/aes192ofb.c4
-rw-r--r--examples/aes256cbc.c4
-rw-r--r--examples/aes256cfb.c4
-rw-r--r--examples/aes256ctr.c4
-rw-r--r--examples/aes256ecb.c4
-rw-r--r--examples/aes256ofb.c4
15 files changed, 30 insertions, 30 deletions
diff --git a/examples/aes128cbc.c b/examples/aes128cbc.c
index 92c1f32..986be2e 100644
--- a/examples/aes128cbc.c
+++ b/examples/aes128cbc.c
@@ -37,7 +37,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes128cbc_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes128cbc_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -53,7 +53,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes128cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
+ decrypted = aes128cbc_decrypt_block(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes128cfb.c b/examples/aes128cfb.c
index 91e1c73..2d209ca 100644
--- a/examples/aes128cfb.c
+++ b/examples/aes128cfb.c
@@ -37,7 +37,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes128cfb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes128cfb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -46,7 +46,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes128cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes128cfb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes128ctr.c b/examples/aes128ctr.c
index 2cabdc1..c645da7 100644
--- a/examples/aes128ctr.c
+++ b/examples/aes128ctr.c
@@ -37,12 +37,12 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes128ctr_encrypt(plain, &key_schedule, iv, 0);
+ cipher = aes128ctr_encrypt_block(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
- decrypted = aes128ctr_decrypt(cipher, &key_schedule, iv, 0);
+ decrypted = aes128ctr_decrypt_block(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes128ecb.c b/examples/aes128ecb.c
index 5b2d2a0..e36cd66 100644
--- a/examples/aes128ecb.c
+++ b/examples/aes128ecb.c
@@ -32,7 +32,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes128ecb_encrypt(plain, &key_schedule);
+ cipher = aes128ecb_encrypt_block(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -44,7 +44,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes128ecb_decrypt(cipher, &inverted_schedule);
+ decrypted = aes128ecb_decrypt_block(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes128ofb.c b/examples/aes128ofb.c
index cef4df5..12ef468 100644
--- a/examples/aes128ofb.c
+++ b/examples/aes128ofb.c
@@ -37,7 +37,7 @@ int main()
for (int i = 0; i < 11; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes128ofb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes128ofb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -46,7 +46,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes128ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes128ofb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes192cbc.c b/examples/aes192cbc.c
index fcd79c5..406575c 100644
--- a/examples/aes192cbc.c
+++ b/examples/aes192cbc.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes192cbc_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes192cbc_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -54,7 +54,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes192cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
+ decrypted = aes192cbc_decrypt_block(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes192cfb.c b/examples/aes192cfb.c
index 0ad8903..103ac12 100644
--- a/examples/aes192cfb.c
+++ b/examples/aes192cfb.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes192cfb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes192cfb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -47,7 +47,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes192cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes192cfb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes192ctr.c b/examples/aes192ctr.c
index eb5df43..48d4b14 100644
--- a/examples/aes192ctr.c
+++ b/examples/aes192ctr.c
@@ -38,12 +38,12 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes192ctr_encrypt(plain, &key_schedule, iv, 0);
+ cipher = aes192ctr_encrypt_block(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
- decrypted = aes192ctr_decrypt(cipher, &key_schedule, iv, 0);
+ decrypted = aes192ctr_decrypt_block(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes192ecb.c b/examples/aes192ecb.c
index 13311f7..f7a05af 100644
--- a/examples/aes192ecb.c
+++ b/examples/aes192ecb.c
@@ -33,7 +33,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes192ecb_encrypt(plain, &key_schedule);
+ cipher = aes192ecb_encrypt_block(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -45,7 +45,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes192ecb_decrypt(cipher, &inverted_schedule);
+ decrypted = aes192ecb_decrypt_block(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes192ofb.c b/examples/aes192ofb.c
index 3738820..3c4f025 100644
--- a/examples/aes192ofb.c
+++ b/examples/aes192ofb.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 13; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes192ofb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes192ofb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -47,7 +47,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes192ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes192ofb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes256cbc.c b/examples/aes256cbc.c
index 27e8458..0a148e1 100644
--- a/examples/aes256cbc.c
+++ b/examples/aes256cbc.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes256cbc_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes256cbc_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -54,7 +54,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes256cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
+ decrypted = aes256cbc_decrypt_block(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes256cfb.c b/examples/aes256cfb.c
index 21cd721..44d5f30 100644
--- a/examples/aes256cfb.c
+++ b/examples/aes256cfb.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes256cfb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes256cfb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -47,7 +47,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes256cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes256cfb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes256ctr.c b/examples/aes256ctr.c
index be19d11..0a47004 100644
--- a/examples/aes256ctr.c
+++ b/examples/aes256ctr.c
@@ -38,12 +38,12 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes256ctr_encrypt(plain, &key_schedule, iv, 0);
+ cipher = aes256ctr_encrypt_block(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
- decrypted = aes256ctr_decrypt(cipher, &key_schedule, iv, 0);
+ decrypted = aes256ctr_decrypt_block(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes256ecb.c b/examples/aes256ecb.c
index 1f265da..f96a368 100644
--- a/examples/aes256ecb.c
+++ b/examples/aes256ecb.c
@@ -33,7 +33,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes256ecb_encrypt(plain, &key_schedule);
+ cipher = aes256ecb_encrypt_block(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -45,7 +45,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&inverted_schedule.keys[i]).str);
- decrypted = aes256ecb_decrypt(cipher, &inverted_schedule);
+ decrypted = aes256ecb_decrypt_block(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);
diff --git a/examples/aes256ofb.c b/examples/aes256ofb.c
index efb7eaa..1104438 100644
--- a/examples/aes256ofb.c
+++ b/examples/aes256ofb.c
@@ -38,7 +38,7 @@ int main()
for (int i = 0; i < 15; ++i)
printf("\t[%d]: %s\n", i, format_aes_block128(&key_schedule.keys[i]).str);
- cipher = aes256ofb_encrypt(plain, &key_schedule, iv, &next_iv);
+ cipher = aes256ofb_encrypt_block(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
print_aes_block128_as_matrix(&cipher);
@@ -47,7 +47,7 @@ int main()
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
print_aes_block128_as_matrix(&next_iv);
- decrypted = aes256ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
+ decrypted = aes256ofb_decrypt_block(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
print_aes_block128_as_matrix(&decrypted);