[8/8] test/crypto: add short MAC-I test vector for zuc

Message ID 20220425041423.2232034-8-g.singh@nxp.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series [1/8] app/test-crypto-perf: improve dequeue logic |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-abi-testing success Testing PASS

Commit Message

Gagandeep Singh April 25, 2022, 4:14 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 13, 2022, 10:46 a.m. UTC | #1
> Add a ZUC based short MAC-I test vector.
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>

Only test vector, where is the test case calling this?
> ---
>  ...est_cryptodev_security_pdcp_test_vectors.h | 20 +++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> 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[] = {
> --
> 2.25.1
  
Gagandeep Singh May 16, 2022, 7:27 a.m. UTC | #2
Hi

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Friday, May 13, 2022 4:16 PM
> To: Gagandeep Singh <G.Singh@nxp.com>; dev@dpdk.org
> Subject: RE: [EXT] [PATCH 8/8] test/crypto: add short MAC-I test vector for zuc
> 
> > Add a ZUC based short MAC-I test vector.
> >
> > Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> 
> Only test vector, where is the test case calling this?

There is test case available in "test_PDCP_PROTO_short_mac"
Which is running all the vectors available in "list_pdcp_smac_tests"

> > ---
> >  ...est_cryptodev_security_pdcp_test_vectors.h | 20
> > +++++++++++++++++--
> >  1 file changed, 18 insertions(+), 2 deletions(-)
> >
> > 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[] = {
> > --
> > 2.25.1
  

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[] = {