crypto: add support for testing quad loops in crypto algos
[vpp.git] / src / plugins / unittest / crypto / aes_cbc.c
index b52f728..05a16c2 100644 (file)
@@ -122,6 +122,35 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_cbc) = {
   .ciphertext = TEST_DATA (ciphertext256),
 };
 
+UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_cbc_chained) = {
+  .name = "NIST SP 800-38A [chained]",
+  .alg = VNET_CRYPTO_ALG_AES_256_CBC,
+  .iv = TEST_DATA (iv),
+  .key = TEST_DATA (key256),
+  .is_chained = 1,
+  .pt_chunks = {
+    TEST_DATA_CHUNK (plaintext, 0, 32),
+    TEST_DATA_CHUNK (plaintext, 32, 32),
+  },
+  .ct_chunks = {
+    TEST_DATA_CHUNK (ciphertext256, 0, 32),
+    TEST_DATA_CHUNK (ciphertext256, 32, 32),
+  },
+};
+
+UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_incr) = {
+  .name = "NIST SP 800-38A incr (1024 B)",
+  .alg = VNET_CRYPTO_ALG_AES_256_CBC,
+  .key.length = 32,
+  .plaintext_incremental = 1024,
+};
+
+UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_incr2) = {
+  .name = "NIST SP 800-38A incr (1056 B)",
+  .alg = VNET_CRYPTO_ALG_AES_256_CBC,
+  .key.length = 32,
+  .plaintext_incremental = 1056,
+};
 /* *INDENT-ON* */
 
 /*