[dpdk-dev] [PATCH 07/12] examples/fips: keep digest after crypto text

michaelsh at marvell.com michaelsh at marvell.com
Mon Aug 26 11:41:15 CEST 2019


From: Michael Shamis <michaelsh at marvell.com>

Fix of GCM FIPS bug: ICV was not copied after the crypto text
in decryption operation so SAM failed to check authentication
in GCM mode.

Signed-off-by: Michael Shamis <michaelsh at marvell.com>
---
 examples/fips_validation/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 895bfa7d8..1d621f60a 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -636,6 +636,10 @@ prepare_aead_op(void)
 		}
 
 		memcpy(ct, vec.ct.val, vec.ct.len);
+
+		/* keep digest after crypto text */
+		memcpy(ct + vec.ct.len, vec.aead.digest.val,
+			vec.aead.digest.len);
 		sym->aead.data.length = vec.ct.len;
 		sym->aead.digest.data = vec.aead.digest.val;
 		sym->aead.digest.phys_addr = rte_malloc_virt2iova(
-- 
2.23.0



More information about the dev mailing list