[PATCH v3] examples/ipsec-secgw: set AES-CTR IV length to 16

Tejasree Kondoj ktejasree at marvell.com
Thu Feb 23 16:43:06 CET 2023


Set AES-CTR IV length to 16 which includes
8B per packet IV, 4B nonce and 4B counter
as populated in datapath.

Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
---

v3:
* Changed IV length in initialization.
v2:
* Rebased v1

 examples/ipsec-secgw/sa.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7da9444a7b..eb485e6b2b 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -96,7 +96,10 @@ const struct supported_cipher_algo cipher_algos[] = {
 	{
 		.keyword = "aes-128-ctr",
 		.algo = RTE_CRYPTO_CIPHER_AES_CTR,
-		.iv_len = 8,
+		/* iv_len includes 8B per packet IV, 4B nonce
+		 * and 4B counter
+		 */
+		.iv_len = 16,
 		.block_size = 4,
 		.key_len = 20
 	},
-- 
2.25.1



More information about the dev mailing list