examples/ipsec-secgw: support 192/256 AES key sizes
Checks
Commit Message
Adding support for the following,
1. AES-192-GCM
2. AES-256-GCM
3. AES-192-CBC
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/sa.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
Comments
>
> Adding support for the following,
> 1. AES-192-GCM
> 2. AES-256-GCM
> 3. AES-192-CBC
>
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> ---
> examples/ipsec-secgw/ipsec.h | 2 +-
> examples/ipsec-secgw/sa.c | 25 +++++++++++++++++++++++++
> 2 files changed, 26 insertions(+), 1 deletion(-)
>
This would also need update in "doc/guides/sample_app_ug/ipsec_secgw.rst"
Hi Akhil,
> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: Thursday, March 26, 2020 12:07 AM
> To: Anoob Joseph <anoobj@marvell.com>; Radu Nicolau
> <radu.nicolau@intel.com>
> Cc: Narayana Prasad Raju Athreya <pathreya@marvell.com>; Tejasree Kondoj
> <ktejasree@marvell.com>; dev@dpdk.org
> Subject: [EXT] RE: [PATCH] examples/ipsec-secgw: support 192/256 AES key
> sizes
>
> External Email
>
> ----------------------------------------------------------------------
>
> >
> > Adding support for the following,
> > 1. AES-192-GCM
> > 2. AES-256-GCM
> > 3. AES-192-CBC
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> > ---
> > examples/ipsec-secgw/ipsec.h | 2 +-
> > examples/ipsec-secgw/sa.c | 25 +++++++++++++++++++++++++
> > 2 files changed, 26 insertions(+), 1 deletion(-)
> >
>
> This would also need update in "doc/guides/sample_app_ug/ipsec_secgw.rst"
Will update in v2. Do I need to update release notes as well?
Thanks,
Anoob
> > >
> > > Adding support for the following,
> > > 1. AES-192-GCM
> > > 2. AES-256-GCM
> > > 3. AES-192-CBC
> > >
> > > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> > > ---
> > > examples/ipsec-secgw/ipsec.h | 2 +-
> > > examples/ipsec-secgw/sa.c | 25 +++++++++++++++++++++++++
> > > 2 files changed, 26 insertions(+), 1 deletion(-)
> > >
> >
> > This would also need update in "doc/guides/sample_app_ug/ipsec_secgw.rst"
>
> Will update in v2. Do I need to update release notes as well?
>
Yes you can add it.
@@ -72,7 +72,7 @@ struct ip_addr {
} ip;
};
-#define MAX_KEY_SIZE 32
+#define MAX_KEY_SIZE 36
/*
* application wide SA parameters
@@ -77,6 +77,13 @@ const struct supported_cipher_algo cipher_algos[] = {
.key_len = 16
},
{
+ .keyword = "aes-192-cbc",
+ .algo = RTE_CRYPTO_CIPHER_AES_CBC,
+ .iv_len = 16,
+ .block_size = 16,
+ .key_len = 24
+ },
+ {
.keyword = "aes-256-cbc",
.algo = RTE_CRYPTO_CIPHER_AES_CBC,
.iv_len = 16,
@@ -130,6 +137,24 @@ const struct supported_aead_algo aead_algos[] = {
.key_len = 20,
.digest_len = 16,
.aad_len = 8,
+ },
+ {
+ .keyword = "aes-192-gcm",
+ .algo = RTE_CRYPTO_AEAD_AES_GCM,
+ .iv_len = 8,
+ .block_size = 4,
+ .key_len = 28,
+ .digest_len = 16,
+ .aad_len = 8,
+ },
+ {
+ .keyword = "aes-256-gcm",
+ .algo = RTE_CRYPTO_AEAD_AES_GCM,
+ .iv_len = 8,
+ .block_size = 4,
+ .key_len = 36,
+ .digest_len = 16,
+ .aad_len = 8,
}
};