Skip to contentSkip to conversation

test/crypto: fix IPsec AES CCM test vector

PATCH Superseded Tejasree Kondoj 3 participants 5 messages May 12, 2023 – May 24, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/crypto: fix IPsec AES CCM test vector

Fixing IPsec AES-CCM test vector IV length.

Fixes d314299950de ("test/crypto: add AES-CCM vectors")
---
 app/test/test_cryptodev_security_ipsec_test_vectors.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_cryptodev_security_ipsec_test_vectors.h +1 -1
index 2686bbeb62..462cef6785 100644
@@ -417,7 +417,7 @@ struct ipsec_test_data pkt_aes_256_ccm = {
 				.op = RTE_CRYPTO_AEAD_OP_ENCRYPT,
 				.algo = RTE_CRYPTO_AEAD_AES_CCM,
 				.key.length = 32,
-				.iv.length = 12,
+				.iv.length = 11,
 				.iv.offset = IV_OFFSET,
 				.digest_length = 16,
 				.aad_length = 12,
Signature · 1 line
2.25.1
#2 lore raw
In reply to Tejasree Kondoj
Quoted 3 lines

Subject: [PATCH] test/crypto: fix IPsec AES CCM test vector

Fixing IPsec AES-CCM test vector IV length.

Please add appropriate description.

Quoted 15 lines
Fixes d314299950de ("test/crypto: add AES-CCM vectors")
---
 app/test/test_cryptodev_security_ipsec_test_vectors.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_cryptodev_security_ipsec_test_vectors.h +0 -0
index 2686bbeb62..462cef6785 100644

app/test/test_cryptodev_security_ipsec_test_vectors.h struct ipsec_test_data pkt_aes_256_ccm = { · line 420

Quoted 5 lines
app/test/test_cryptodev_security_ipsec_test_vectors.h +1 -1
@@ -417,7 +417,7 @@ struct ipsec_test_data pkt_aes_256_ccm = {
 				.op = RTE_CRYPTO_AEAD_OP_ENCRYPT,
 				.algo = RTE_CRYPTO_AEAD_AES_CCM,
 				.key.length = 32,
-				.iv.length = 12,
+				.iv.length = 11,

Add a comment here that IV includes 3 bytes of salt and 8 bytes of IV.

Quoted 5 lines
app/test/test_cryptodev_security_ipsec_test_vectors.h +0 -1
 				.iv.offset = IV_OFFSET,
 				.digest_length = 16,
 				.aad_length = 12,
--

2.25.1

#3 lore raw

PATCH v2 1/1 test/crypto: fix IPsec AES CCM test vector

In reply to Tejasree Kondoj

Set IPsec AES-CCM test vector IV length to 11
instead of 12 as it includes only 3B salt and
8B per packet IV.

Fixes d314299950de ("test/crypto: add AES-CCM vectors")
---
 app/test/test_cryptodev_security_ipsec_test_vectors.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
app/test/test_cryptodev_security_ipsec_test_vectors.h +2 -1
index 2686bbeb62..6e60e32b9d 100644
@@ -417,7 +417,8 @@ struct ipsec_test_data pkt_aes_256_ccm = {
 				.op = RTE_CRYPTO_AEAD_OP_ENCRYPT,
 				.algo = RTE_CRYPTO_AEAD_AES_CCM,
 				.key.length = 32,
-				.iv.length = 12,
+				/* IV includes 3B salt and 8B per packet IV */
+				.iv.length = 11,
 				.iv.offset = IV_OFFSET,
 				.digest_length = 16,
 				.aad_length = 12,
Signature · 1 line
2.25.1