summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/crypto/aes_gcm.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-02-04 09:36:04 +0000
committerDamjan Marion <dmarion@me.com>2020-02-11 23:07:38 +0000
commitefcad1a9d22c4a664f3004cafe09d9c3a68e1620 (patch)
tree5d0668c307083f096f6034d5ae8a608078640d18 /src/plugins/unittest/crypto/aes_gcm.c
parent16d974ec59776f0103ad62d0d04dc57989eef7ed (diff)
ipsec: add support for chained buffers
Type: feature Change-Id: Ie072a7c2bbb1e4a77f7001754f01897efd30fc53 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/unittest/crypto/aes_gcm.c')
-rw-r--r--src/plugins/unittest/crypto/aes_gcm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/unittest/crypto/aes_gcm.c b/src/plugins/unittest/crypto/aes_gcm.c
index 0a7aafca100..764ca9e97c5 100644
--- a/src/plugins/unittest/crypto/aes_gcm.c
+++ b/src/plugins/unittest/crypto/aes_gcm.c
@@ -244,6 +244,26 @@ UNITTEST_REGISTER_CRYPTO_TEST (aes_gcm256_tc4) = {
.aad = TEST_DATA(tc4_aad),
.tag = TEST_DATA (tc4_tag256),
};
+
+UNITTEST_REGISTER_CRYPTO_TEST (aes_gcm256_tc4_chain) = {
+ .name = "256-GCM Spec. TC4 [chained]",
+ .alg = VNET_CRYPTO_ALG_AES_256_GCM,
+ .iv = TEST_DATA (tc3_iv),
+ .key = TEST_DATA (tc3_key256),
+ .aad = TEST_DATA(tc4_aad),
+ .tag = TEST_DATA (tc4_tag256),
+ .is_chained = 1,
+ .pt_chunks = {
+ TEST_DATA_CHUNK (tc4_plaintext, 0, 20),
+ TEST_DATA_CHUNK (tc4_plaintext, 20, 20),
+ TEST_DATA_CHUNK (tc4_plaintext, 40, 20),
+ },
+ .ct_chunks = {
+ TEST_DATA_CHUNK (tc4_ciphertext256, 0, 20),
+ TEST_DATA_CHUNK (tc4_ciphertext256, 20, 20),
+ TEST_DATA_CHUNK (tc4_ciphertext256, 40, 20),
+ },
+};
/* *INDENT-ON* */
/*