aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-04 17:05:24 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-04 17:05:24 +0300
commita497b83f80508747151dacf660f7d5de48d0464f (patch)
treeb2ded10280830aa31b3be10e2b81fc1a42df65e0 /examples
parentrefactoring (diff)
downloadaes-tools-a497b83f80508747151dacf660f7d5de48d0464f.tar.gz
aes-tools-a497b83f80508747151dacf660f7d5de48d0464f.zip
explicitly separate BE vs. LE block I/O functions
Diffstat (limited to 'examples')
-rw-r--r--examples/aes128cbc.c14
-rw-r--r--examples/aes128cfb.c14
-rw-r--r--examples/aes128ctr.c10
-rw-r--r--examples/aes128ecb.c8
-rw-r--r--examples/aes128ofb.c14
-rw-r--r--examples/aes192cbc.c14
-rw-r--r--examples/aes192cfb.c14
-rw-r--r--examples/aes192ctr.c10
-rw-r--r--examples/aes192ecb.c8
-rw-r--r--examples/aes192ofb.c14
-rw-r--r--examples/aes256cbc.c14
-rw-r--r--examples/aes256cfb.c14
-rw-r--r--examples/aes256ctr.c10
-rw-r--r--examples/aes256ecb.c8
-rw-r--r--examples/aes256ofb.c14
15 files changed, 90 insertions, 90 deletions
diff --git a/examples/aes128cbc.c b/examples/aes128cbc.c
index ab12df8..05b91b0 100644
--- a/examples/aes128cbc.c
+++ b/examples/aes128cbc.c
@@ -20,15 +20,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block128(&key).str);
- print_aes_block128_fips_matrix_style(&key);
+ print_aes_block128_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes128_expand_key_schedule(key, &key_schedule);
@@ -40,11 +40,11 @@ int main()
cipher = aes128cbc_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
aes128_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -56,11 +56,11 @@ int main()
decrypted = aes128cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes128cfb.c b/examples/aes128cfb.c
index 5071019..4c6daa2 100644
--- a/examples/aes128cfb.c
+++ b/examples/aes128cfb.c
@@ -20,15 +20,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block128(&key).str);
- print_aes_block128_fips_matrix_style(&key);
+ print_aes_block128_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes128_expand_key_schedule(key, &key_schedule);
@@ -40,20 +40,20 @@ int main()
cipher = aes128cfb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes128cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes128ctr.c b/examples/aes128ctr.c
index 0291032..d798e70 100644
--- a/examples/aes128ctr.c
+++ b/examples/aes128ctr.c
@@ -20,15 +20,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block128(&key).str);
- print_aes_block128_fips_matrix_style(&key);
+ print_aes_block128_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes128_expand_key_schedule(key, &key_schedule);
@@ -40,12 +40,12 @@ int main()
cipher = aes128ctr_encrypt(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
decrypted = aes128ctr_decrypt(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes128ecb.c b/examples/aes128ecb.c
index a96f937..8d8f990 100644
--- a/examples/aes128ecb.c
+++ b/examples/aes128ecb.c
@@ -19,11 +19,11 @@ int main()
key = make_aes_block128(0x0f0e0d0c, 0x0b0a0908, 0x07060504, 0x03020100);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block128(&key).str);
- print_aes_block128_fips_matrix_style(&key);
+ print_aes_block128_as_matrix(&key);
aes128_expand_key_schedule(key, &key_schedule);
@@ -35,7 +35,7 @@ int main()
cipher = aes128ecb_encrypt(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
aes128_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -47,7 +47,7 @@ int main()
decrypted = aes128ecb_decrypt(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes128ofb.c b/examples/aes128ofb.c
index e786cd0..9b263ed 100644
--- a/examples/aes128ofb.c
+++ b/examples/aes128ofb.c
@@ -20,15 +20,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block128(&key).str);
- print_aes_block128_fips_matrix_style(&key);
+ print_aes_block128_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes128_expand_key_schedule(key, &key_schedule);
@@ -40,20 +40,20 @@ int main()
cipher = aes128ofb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes128ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes192cbc.c b/examples/aes192cbc.c
index 5afece9..e6d844d 100644
--- a/examples/aes192cbc.c
+++ b/examples/aes192cbc.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block192(&key).str);
- print_aes_block192_fips_matrix_style(&key);
+ print_aes_block192_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes192_expand_key_schedule(&key, &key_schedule);
@@ -41,11 +41,11 @@ int main()
cipher = aes192cbc_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
aes192_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -57,11 +57,11 @@ int main()
decrypted = aes192cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes192cfb.c b/examples/aes192cfb.c
index 363a24f..e530c13 100644
--- a/examples/aes192cfb.c
+++ b/examples/aes192cfb.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block192(&key).str);
- print_aes_block192_fips_matrix_style(&key);
+ print_aes_block192_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes192_expand_key_schedule(&key, &key_schedule);
@@ -41,20 +41,20 @@ int main()
cipher = aes192cfb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes192cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes192ctr.c b/examples/aes192ctr.c
index b6fb82a..eccbc2e 100644
--- a/examples/aes192ctr.c
+++ b/examples/aes192ctr.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block192(&key).str);
- print_aes_block192_fips_matrix_style(&key);
+ print_aes_block192_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes192_expand_key_schedule(&key, &key_schedule);
@@ -41,12 +41,12 @@ int main()
cipher = aes192ctr_encrypt(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
decrypted = aes192ctr_decrypt(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes192ecb.c b/examples/aes192ecb.c
index 6d51fb8..2bf0fdb 100644
--- a/examples/aes192ecb.c
+++ b/examples/aes192ecb.c
@@ -20,11 +20,11 @@ int main()
key = make_aes_block192(0x17161514, 0x13121110, 0x0f0e0d0c, 0x0b0a0908, 0x07060504, 0x03020100);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block192(&key).str);
- print_aes_block192_fips_matrix_style(&key);
+ print_aes_block192_as_matrix(&key);
aes192_expand_key_schedule(&key, &key_schedule);
@@ -36,7 +36,7 @@ int main()
cipher = aes192ecb_encrypt(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
aes192_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -48,7 +48,7 @@ int main()
decrypted = aes192ecb_decrypt(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes192ofb.c b/examples/aes192ofb.c
index b95f45e..aed3c0c 100644
--- a/examples/aes192ofb.c
+++ b/examples/aes192ofb.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block192(&key).str);
- print_aes_block192_fips_matrix_style(&key);
+ print_aes_block192_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes192_expand_key_schedule(&key, &key_schedule);
@@ -41,20 +41,20 @@ int main()
cipher = aes192ofb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes192ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes256cbc.c b/examples/aes256cbc.c
index f91188c..302bb37 100644
--- a/examples/aes256cbc.c
+++ b/examples/aes256cbc.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block256(&key).str);
- print_aes_block256_fips_matrix_style(&key);
+ print_aes_block256_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes256_expand_key_schedule(&key, &key_schedule);
@@ -41,11 +41,11 @@ int main()
cipher = aes256cbc_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
aes256_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -57,11 +57,11 @@ int main()
decrypted = aes256cbc_decrypt(cipher, &inverted_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes256cfb.c b/examples/aes256cfb.c
index 2872fa2..3ebf702 100644
--- a/examples/aes256cfb.c
+++ b/examples/aes256cfb.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block256(&key).str);
- print_aes_block256_fips_matrix_style(&key);
+ print_aes_block256_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes256_expand_key_schedule(&key, &key_schedule);
@@ -41,20 +41,20 @@ int main()
cipher = aes256cfb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes256cfb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}
diff --git a/examples/aes256ctr.c b/examples/aes256ctr.c
index 3e06364..42267d2 100644
--- a/examples/aes256ctr.c
+++ b/examples/aes256ctr.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block256(&key).str);
- print_aes_block256_fips_matrix_style(&key);
+ print_aes_block256_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes256_expand_key_schedule(&key, &key_schedule);
@@ -41,12 +41,12 @@ int main()
cipher = aes256ctr_encrypt(plain, &key_schedule, iv, 0);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
decrypted = aes256ctr_decrypt(cipher, &key_schedule, iv, 0);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes256ecb.c b/examples/aes256ecb.c
index 18e9e88..e1e2488 100644
--- a/examples/aes256ecb.c
+++ b/examples/aes256ecb.c
@@ -20,11 +20,11 @@ int main()
key = make_aes_block256(0x1f1e1d1c, 0x1b1a1918, 0x17161514, 0x13121110, 0x0f0e0d0c, 0x0b0a0908, 0x07060504, 0x03020100);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block256(&key).str);
- print_aes_block256_fips_matrix_style(&key);
+ print_aes_block256_as_matrix(&key);
aes256_expand_key_schedule(&key, &key_schedule);
@@ -36,7 +36,7 @@ int main()
cipher = aes256ecb_encrypt(plain, &key_schedule);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
aes256_invert_key_schedule(&key_schedule, &inverted_schedule);
@@ -48,7 +48,7 @@ int main()
decrypted = aes256ecb_decrypt(cipher, &inverted_schedule);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
return 0;
}
diff --git a/examples/aes256ofb.c b/examples/aes256ofb.c
index 6ed4621..0ef42fd 100644
--- a/examples/aes256ofb.c
+++ b/examples/aes256ofb.c
@@ -21,15 +21,15 @@ int main()
iv = make_aes_block128(0xfedcba98, 0x76543210, 0xfedcba98, 0x76543210);
printf("Plain: %s\n", format_aes_block128(&plain).str);
- print_aes_block128_fips_matrix_style(&plain);
+ print_aes_block128_as_matrix(&plain);
printf("\n");
printf("Key: %s\n", format_aes_block256(&key).str);
- print_aes_block256_fips_matrix_style(&key);
+ print_aes_block256_as_matrix(&key);
printf("\n");
printf("Initialization vector: %s\n", format_aes_block128(&iv).str);
- print_aes_block128_fips_matrix_style(&iv);
+ print_aes_block128_as_matrix(&iv);
aes256_expand_key_schedule(&key, &key_schedule);
@@ -41,20 +41,20 @@ int main()
cipher = aes256ofb_encrypt(plain, &key_schedule, iv, &next_iv);
printf("\n");
printf("Cipher: %s\n", format_aes_block128(&cipher).str);
- print_aes_block128_fips_matrix_style(&cipher);
+ print_aes_block128_as_matrix(&cipher);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
decrypted = aes256ofb_decrypt(cipher, &key_schedule, iv, &next_iv);
printf("\n");
printf("Decrypted: %s\n", format_aes_block128(&decrypted).str);
- print_aes_block128_fips_matrix_style(&decrypted);
+ print_aes_block128_as_matrix(&decrypted);
printf("\n");
printf("Next initialization vector: %s\n", format_aes_block128(&next_iv).str);
- print_aes_block128_fips_matrix_style(&next_iv);
+ print_aes_block128_as_matrix(&next_iv);
return 0;
}