test/crypto: add AES-CCM test vectors
PATCH 1/1 test/crypto: add AES-CCM test vectors
From: Archana Muniganti <[email protected]>
Added ESP tunnel mode known vectors for AES-CCM along with combined mode support.
Signed-off-by Archana Muniganti <[email protected]>
--- app/test/test_cryptodev.c | 8 ++ app/test/test_cryptodev_security_ipsec.c | 3 + app/test/test_cryptodev_security_ipsec.h | 5 + ...st_cryptodev_security_ipsec_test_vectors.h | 101 ++++++++++++++++++ 4 files changed, 117 insertions(+)
app/test/test_cryptodev.c +8 -0
@@ -15292,6 +15292,10 @@ static struct unit_test_suite ipsec_proto_testsuite = { "Outbound known vector (ESP tunnel mode IPv4 AES-GCM 256)", ut_setup_security, ut_teardown, test_ipsec_proto_known_vec, &pkt_aes_256_gcm), +TEST_CASE_NAMED_WITH_DATA ( +"Outbound known vector (ESP tunnel mode IPv4 AES-CCM 256)" , + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, &pkt_aes_256_ccm), TEST_CASE_NAMED_WITH_DATA( "Outbound known vector (ESP tunnel mode IPv4 AES-CBC 128 HMAC-SHA256 [16B ICV])", ut_setup_security, ut_teardown,
@@ -15353,6 +15357,10 @@ static struct unit_test_suite ipsec_proto_testsuite = { "Inbound known vector (ESP tunnel mode IPv4 AES-GCM 256)", ut_setup_security, ut_teardown, test_ipsec_proto_known_vec_inb, &pkt_aes_256_gcm), +TEST_CASE_NAMED_WITH_DATA ( +"Inbound known vector (ESP tunnel mode IPv4 AES-CCM 256)" , + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, &pkt_aes_256_ccm), TEST_CASE_NAMED_WITH_DATA( "Inbound known vector (ESP tunnel mode IPv4 AES-CBC 128)", ut_setup_security, ut_teardown,
app/test/test_cryptodev_security_ipsec.c +3 -0
@@ -392,6 +392,9 @@ test_ipsec_td_prepare(const struct crypto_param *param1,else memcpy (td, &pkt_aes_256_gcm,sizeof (*td)); +if (param1->alg.aead ==RTE_CRYPTO_AEAD_AES_CCM ) + td->salt.len =3 ; + td->aead = true; td->xform.aead.aead.algo = param1->alg.aead; td->xform.aead.aead.key.length = param1->key_length;
app/test/test_cryptodev_security_ipsec.h +5 -0
@@ -132,6 +132,11 @@ static const struct crypto_param aead_list[] = { { .type = RTE_CRYPTO_SYM_XFORM_AEAD, .alg.aead = RTE_CRYPTO_AEAD_AES_GCM, + .key_length = 32, + }, + { + .type = RTE_CRYPTO_SYM_XFORM_AEAD, + .alg.aead = RTE_CRYPTO_AEAD_AES_CCM, .key_length = 32 }, };
app/test/test_cryptodev_security_ipsec_test_vectors.h +101 -0
107 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 8 lines
Subject: [PATCH] test/crypto: add AES-CCM test vectors
From: Archana Muniganti <[email protected]>
Added ESP tunnel mode known vectors for AES-CCM along with combined mode support.
Signed-off-by Archana Muniganti <[email protected]>
Acked-by Akhil Goyal <[email protected]>
Akhil Goyal
AppliedQuoted 7 lines
From: Archana Muniganti <[email protected]>
Added ESP tunnel mode known vectors for AES-CCM along with combined mode support.
Signed-off-by Archana Muniganti <[email protected]>
Applied to dpdk-next-crypto
Thanks.