[v3,6/7] test/crypto: add short MAC-I test vector for zuc

Message ID 20220520042104.3784908-7-g.singh@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series Crypto related changes in sample/test apps |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Gagandeep Singh May 20, 2022, 4:21 a.m. UTC
  Add a ZUC based short MAC-I test vector.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 ...est_cryptodev_security_pdcp_test_vectors.h | 20 +++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
  

Comments

Akhil Goyal May 26, 2022, 1:59 p.m. UTC | #1
> Add a ZUC based short MAC-I test vector.
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>
  

Patch

diff --git a/app/test/test_cryptodev_security_pdcp_test_vectors.h b/app/test/test_cryptodev_security_pdcp_test_vectors.h
index 81fd6e606b..585c10b423 100644
--- a/app/test/test_cryptodev_security_pdcp_test_vectors.h
+++ b/app/test/test_cryptodev_security_pdcp_test_vectors.h
@@ -1,7 +1,7 @@ 
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (C) 2015-2016 Freescale Semiconductor,Inc.
- * Copyright 2018-2021 NXP
+ * Copyright 2018-2022 NXP
  */
 
 #ifndef SECURITY_PDCP_TEST_VECTOR_H_
@@ -128,7 +128,23 @@  static const struct pdcp_short_mac_test list_pdcp_smac_tests[] = {
 		.data_out = (uint8_t[]){ 0x33, 0x32, 0x34, 0x62, 0x63, 0x39,
 					 0x38, 0x00, 0x00, 0x00, 0x00 },
 	},
-
+	{
+		.test_idx = 6,
+		.param = {.name = "PDCP-SMAC ZUC",
+			.auth_alg = RTE_CRYPTO_AUTH_ZUC_EIA3,
+			.domain = RTE_SECURITY_PDCP_MODE_SHORT_MAC,
+			.auth_key_len = 16,
+		},
+		.auth_key = (uint8_t[]){ 0xB2, 0xA4, 0x73, 0xB6, 0x78, 0x5C,
+					0x51, 0x8E, 0x9C, 0x1E, 0x9B, 0xC6,
+					0x66, 0xE4, 0x84, 0x24
+		},
+		.data_in = (uint8_t[]){ 0x00, 0x40, 0x00, 0x00, 0x00, 0x05,
+					0x09, 0xe4 },
+		.in_len = 8,
+		.data_out = (uint8_t[]){ 0x00, 0x40, 0x00, 0x00, 0x00, 0x05,
+					0x09, 0xe4, 0xCC, 0x7D, 0xD0, 0xE4 },
+	},
 };
 
 static struct pdcp_test_param pdcp_test_params[] = {