examples/ipsec-secgw: fix SHA256-HMAC digest length

Message ID 20191106095322.25881-1-akhil.goyal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series examples/ipsec-secgw: fix SHA256-HMAC digest length |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Akhil Goyal Nov. 6, 2019, 9:53 a.m. UTC
  From: Vakul Garg <vakul.garg@nxp.com>

As per RFC4868, SHA-256 should use 128 bits of ICV.
Fixes: b5350285ce6e ("examples/ipsec-secgw: support SHA256 HMAC")
Cc: stable@dpdk.org

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/sa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Akhil Goyal Nov. 6, 2019, 1:17 p.m. UTC | #1
> 
> From: Vakul Garg <vakul.garg@nxp.com>
> 
> As per RFC4868, SHA-256 should use 128 bits of ICV.
> Fixes: b5350285ce6e ("examples/ipsec-secgw: support SHA256 HMAC")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
Applied to dpdk-next-crypto
  

Patch

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 4cb90857c..d0ae8ac9a 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -115,7 +115,7 @@  const struct supported_auth_algo auth_algos[] = {
 	{
 		.keyword = "sha256-hmac",
 		.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
-		.digest_len = 12,
+		.digest_len = 16,
 		.key_len = 32
 	}
 };