aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/aes128cbc_decrypt_block.c3
-rw-r--r--test/aes128cbc_encrypt_block.c2
-rw-r--r--test/aes128cfb_decrypt_block.c3
-rw-r--r--test/aes128cfb_encrypt_block.c2
-rw-r--r--test/aes128ofb_decrypt_block.c3
-rw-r--r--test/aes128ofb_encrypt_block.c3
-rw-r--r--test/aes192cbc_decrypt_block.c3
-rw-r--r--test/aes192cbc_encrypt_block.c2
-rw-r--r--test/aes192cfb_decrypt_block.c3
-rw-r--r--test/aes192cfb_encrypt_block.c2
-rw-r--r--test/aes192ofb_decrypt_block.c3
-rw-r--r--test/aes192ofb_encrypt_block.c3
-rw-r--r--test/aes256cbc_decrypt_block.c3
-rw-r--r--test/aes256cbc_encrypt_block.c2
-rw-r--r--test/aes256cfb_decrypt_block.c3
-rw-r--r--test/aes256cfb_encrypt_block.c2
-rw-r--r--test/aes256ofb_decrypt_block.c3
-rw-r--r--test/aes256ofb_encrypt_block.c3
18 files changed, 18 insertions, 30 deletions
diff --git a/test/aes128cbc_decrypt_block.c b/test/aes128cbc_decrypt_block.c
index f0d95ee..791110a 100644
--- a/test/aes128cbc_decrypt_block.c
+++ b/test/aes128cbc_decrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes128cbc_decrypt(cipher, &inverted_schedule, iv);
- iv = cipher;
+ plain = aes128cbc_decrypt(cipher, &inverted_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes128cbc_encrypt_block.c b/test/aes128cbc_encrypt_block.c
index 14e7df7..a4a1675 100644
--- a/test/aes128cbc_encrypt_block.c
+++ b/test/aes128cbc_encrypt_block.c
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes128cbc_encrypt(plain, &key_schedule, iv);
+ cipher = aes128cbc_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes128cfb_decrypt_block.c b/test/aes128cfb_decrypt_block.c
index 90d0fca..bfc7ea7 100644
--- a/test/aes128cfb_decrypt_block.c
+++ b/test/aes128cfb_decrypt_block.c
@@ -46,8 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes128cfb_decrypt(cipher, &key_schedule, iv);
- iv = cipher;
+ plain = aes128cfb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes128cfb_encrypt_block.c b/test/aes128cfb_encrypt_block.c
index d1e30d0..b4e2885 100644
--- a/test/aes128cfb_encrypt_block.c
+++ b/test/aes128cfb_encrypt_block.c
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes128cfb_encrypt(plain, &key_schedule, iv);
+ cipher = aes128cfb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes128ofb_decrypt_block.c b/test/aes128ofb_decrypt_block.c
index 92add4b..74fb314 100644
--- a/test/aes128ofb_decrypt_block.c
+++ b/test/aes128ofb_decrypt_block.c
@@ -46,8 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes128cfb_decrypt(cipher, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ plain = aes128ofb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes128ofb_encrypt_block.c b/test/aes128ofb_encrypt_block.c
index ef32a59..df30777 100644
--- a/test/aes128ofb_encrypt_block.c
+++ b/test/aes128ofb_encrypt_block.c
@@ -46,8 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes128ofb_encrypt(plain, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ cipher = aes128ofb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes192cbc_decrypt_block.c b/test/aes192cbc_decrypt_block.c
index 57786ef..6a953ad 100644
--- a/test/aes192cbc_decrypt_block.c
+++ b/test/aes192cbc_decrypt_block.c
@@ -48,8 +48,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes192cbc_decrypt(cipher, &inverted_schedule, iv);
- iv = cipher;
+ plain = aes192cbc_decrypt(cipher, &inverted_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes192cbc_encrypt_block.c b/test/aes192cbc_encrypt_block.c
index 8a5a9b8..a1269b4 100644
--- a/test/aes192cbc_encrypt_block.c
+++ b/test/aes192cbc_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes192cbc_encrypt(plain, &key_schedule, iv);
+ cipher = aes192cbc_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes192cfb_decrypt_block.c b/test/aes192cfb_decrypt_block.c
index 55db87e..906ecf9 100644
--- a/test/aes192cfb_decrypt_block.c
+++ b/test/aes192cfb_decrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes192cfb_decrypt(cipher, &key_schedule, iv);
- iv = cipher;
+ plain = aes192cfb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes192cfb_encrypt_block.c b/test/aes192cfb_encrypt_block.c
index 70d1505..3261a03 100644
--- a/test/aes192cfb_encrypt_block.c
+++ b/test/aes192cfb_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes192cfb_encrypt(plain, &key_schedule, iv);
+ cipher = aes192cfb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes192ofb_decrypt_block.c b/test/aes192ofb_decrypt_block.c
index 19c873f..268b00c 100644
--- a/test/aes192ofb_decrypt_block.c
+++ b/test/aes192ofb_decrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes192cfb_decrypt(cipher, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ plain = aes192ofb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes192ofb_encrypt_block.c b/test/aes192ofb_encrypt_block.c
index a3fb944..8c866c3 100644
--- a/test/aes192ofb_encrypt_block.c
+++ b/test/aes192ofb_encrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes192cfb_encrypt(plain, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ cipher = aes192ofb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes256cbc_decrypt_block.c b/test/aes256cbc_decrypt_block.c
index f7c5fbc..52abaff 100644
--- a/test/aes256cbc_decrypt_block.c
+++ b/test/aes256cbc_decrypt_block.c
@@ -48,8 +48,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes256cbc_decrypt(cipher, &inverted_schedule, iv);
- iv = cipher;
+ plain = aes256cbc_decrypt(cipher, &inverted_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes256cbc_encrypt_block.c b/test/aes256cbc_encrypt_block.c
index 9e1ada7..0b10f54 100644
--- a/test/aes256cbc_encrypt_block.c
+++ b/test/aes256cbc_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes256cbc_encrypt(plain, &key_schedule, iv);
+ cipher = aes256cbc_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes256cfb_decrypt_block.c b/test/aes256cfb_decrypt_block.c
index f0b7fa0..d3f6075 100644
--- a/test/aes256cfb_decrypt_block.c
+++ b/test/aes256cfb_decrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes256cfb_decrypt(cipher, &key_schedule, iv);
- iv = cipher;
+ plain = aes256cfb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes256cfb_encrypt_block.c b/test/aes256cfb_encrypt_block.c
index 948b658..c14e931 100644
--- a/test/aes256cfb_encrypt_block.c
+++ b/test/aes256cfb_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- iv = cipher = aes256cfb_encrypt(plain, &key_schedule, iv);
+ cipher = aes256cfb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes256ofb_decrypt_block.c b/test/aes256ofb_decrypt_block.c
index 45dcd7b..282dc6a 100644
--- a/test/aes256ofb_decrypt_block.c
+++ b/test/aes256ofb_decrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- plain = aes256cfb_decrypt(cipher, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ plain = aes256ofb_decrypt(cipher, &key_schedule, iv, &iv);
print_aes_block128(&plain);
}
diff --git a/test/aes256ofb_encrypt_block.c b/test/aes256ofb_encrypt_block.c
index 4498bc8..b74f29f 100644
--- a/test/aes256ofb_encrypt_block.c
+++ b/test/aes256ofb_encrypt_block.c
@@ -47,8 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes256cfb_encrypt(plain, &key_schedule, iv);
- iv = _mm_xor_si128(cipher, plain);
+ cipher = aes256ofb_encrypt(plain, &key_schedule, iv, &iv);
print_aes_block128(&cipher);
}