DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/5] test/crypto: add ZUC256 chained tests
@ 2023-03-01 16:39 Ciara Power
  2023-03-01 16:39 ` [PATCH 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power

This patchset adds chained testcases for each ZUC256 digest size:
 - cipher-auth
 - auth-cipher
 - auth-cipher-verify

 To add these tests, some improvements were made to the existing code,
 allowing for the user to easily differentiate ZUC256 and ZUC128 tests.

 Some fixes are also included, that were highlighted when these new tests
 were added. 

Ciara Power (5):
  test/crypto: improve readability of ZUC256 tests
  test/crypto: fix ZUC digest length in comparison
  test/crypto: fix auth op parameter for ZUC256 tests
  test/crypto: fix capability check for ZUC cipher auth
  test/crypto: add chained ZUC256 testcases

 app/test/test_cryptodev.c                  | 280 +++++---
 app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
 2 files changed, 913 insertions(+), 81 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/5] test/crypto: improve readability of ZUC256 tests
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
@ 2023-03-01 16:39 ` Ciara Power
  2023-03-01 16:39 ` [PATCH 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang; +Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power

There were some ZUC256 tests for hash generate and hash verify mixed in
with the ZUC128 tests, with no indication in the test name that they
were for ZUC256.

These are now grouped with other ZUC256 tests, and all ZUC256 hash test
names are modified to be more uniform, and indicate the digest length
as this can vary with ZUC256.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 125 +++++++++++++++++++-------------------
 1 file changed, 62 insertions(+), 63 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index aa831d79a2..ca7f10557c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7385,27 +7385,6 @@ test_zuc_hash_generate_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
-static int
-test_zuc_hash_generate_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
 static int
 test_zuc_hash_verify_test_case_1(void)
 {
@@ -7462,27 +7441,6 @@ test_zuc_hash_verify_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
-static int
-test_zuc_hash_verify_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
 static int
 test_zuc_cipher_auth_test_case_1(void)
 {
@@ -7608,29 +7566,71 @@ test_zuc256_decryption_test_case_2(void)
 }
 
 static int
-test_zuc256_authentication_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
 }
 
 static int
-test_zuc256_authentication_test_case_2(void)
+test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_2(void)
+test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
 }
 
+static int
+test_zuc256_hash_verify_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
 static int
 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata)
 {
@@ -16409,12 +16409,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_generate_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_generate_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_11),
 
 		/** ZUC verify (EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16433,13 +16427,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_verify_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_verify_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_11),
-
 
 		/** ZUC alg-chain (EEA3/EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16489,15 +16476,27 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 
 		/** ZUC-256 authentication only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_1),
+			test_zuc256_hash_generate_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_4b_tag_test_case_2),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_2),
+			test_zuc256_hash_generate_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_16b_tag_test_case_1),
 
 		/** ZUC-256 authentication verify only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_1),
+			test_zuc256_hash_verify_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_8b_tag_test_case_1),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_2),
+			test_zuc256_hash_verify_16b_tag_test_case_1),
 
 		TEST_CASES_END()
 	}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/5] test/crypto: fix ZUC digest length in comparison
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
  2023-03-01 16:39 ` [PATCH 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
@ 2023-03-01 16:39 ` Ciara Power
  2023-03-01 16:39 ` [PATCH 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, vvelumuri, stable

The digest length used in ZUC tests for verifying the digest was
hardcoded at 4 bytes, which was suitable for ZUC128 only.
Now that ZUC256 is supported by these test functions, the digest length
can vary.

Using the test vector digest length directly in these
comparisons allows for variable digest length.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")
Fixes: fa5bf9345d4e ("test/crypto: add ZUC cases with 256-bit keys")
Cc: vvelumuri@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ca7f10557c..72d359dd91 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4853,7 +4853,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			4,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	return 0;
 }
@@ -6499,7 +6499,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
@@ -6706,7 +6706,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 3/5] test/crypto: fix auth op parameter for ZUC256 tests
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
  2023-03-01 16:39 ` [PATCH 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
  2023-03-01 16:39 ` [PATCH 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
@ 2023-03-01 16:39 ` Ciara Power
  2023-03-01 16:39 ` [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang; +Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power

The incorrect value was being passed to the ZUC authentication test
function, indicating the opposite of the intended GENERATE/VERIFY op.
This is fixed to use the auth op enum rather than a value.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 72d359dd91..9b90bae206 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7568,13 +7568,15 @@ test_zuc256_decryption_test_case_2(void)
 static int
 test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
@@ -7601,13 +7603,15 @@ test_zuc256_hash_generate_16b_tag_test_case_1(void)
 static int
 test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
                   ` (2 preceding siblings ...)
  2023-03-01 16:39 ` [PATCH 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
@ 2023-03-01 16:39 ` Ciara Power
  2023-03-01 16:39 ` [PATCH 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, stable

The cipher-auth test function for ZUC was not using the improved cipher
and auth capability check functions. This meant the required key and IV
lengths were not being checked, leading to problems with ZUC256 tests
running, and failing, on devices that only support ZUC128.

Fixes: 27b787132484 ("test/crypto: check cipher parameters")
Fixes: f93fce6de4aa ("test/crypto: check auth parameters")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9b90bae206..80e98ed2c7 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -136,6 +136,17 @@ security_proto_supported(enum rte_security_session_action_type action,
 static int
 dev_configure_and_start(uint64_t ff_disable);
 
+static int
+check_cipher_capability(const struct crypto_testsuite_params *ts_params,
+			const enum rte_crypto_cipher_algorithm cipher_algo,
+			const uint16_t key_size, const uint16_t iv_size);
+
+static int
+check_auth_capability(const struct crypto_testsuite_params *ts_params,
+			const enum rte_crypto_auth_algorithm auth_algo,
+			const uint16_t key_size, const uint16_t iv_size,
+			const uint16_t tag_size);
+
 static struct rte_mbuf *
 setup_test_string(struct rte_mempool *mpool,
 		const char *string, size_t len, uint8_t blocksize)
@@ -4761,7 +4772,6 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	unsigned int plaintext_len;
 
 	struct rte_cryptodev_info dev_info;
-	struct rte_cryptodev_sym_capability_idx cap_idx;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -4783,19 +4793,14 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 		return TEST_SKIPPED;
 
 	/* Check if device supports ZUC EEA3 */
-	cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3;
-
-	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
-			&cap_idx) == NULL)
+	if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3,
+			tdata->key.len, tdata->cipher_iv.len) < 0)
 		return TEST_SKIPPED;
 
 	/* Check if device supports ZUC EIA3 */
-	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-	cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3;
-
-	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
-			&cap_idx) == NULL)
+	if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3,
+			tdata->key.len, tdata->auth_iv.len,
+			tdata->digest.len) < 0)
 		return TEST_SKIPPED;
 
 	/* Create ZUC session */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 5/5] test/crypto: add chained ZUC256 testcases
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
                   ` (3 preceding siblings ...)
  2023-03-01 16:39 ` [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
@ 2023-03-01 16:39 ` Ciara Power
  2023-03-02  9:56   ` De Lara Guarch, Pablo
  2023-03-02 10:07 ` [PATCH 0/5] test/crypto: add ZUC256 chained tests Dooley, Brian
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
  6 siblings, 1 reply; 17+ messages in thread
From: Ciara Power @ 2023-03-01 16:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang; +Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power

Testcases are added for ZUC256 cipher-auth, auth-cipher,
and auth-cipher-verify.
4 byte, 8 byte, and 16 byte tags are tested for each chained type.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c                  | 110 ++++
 app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
 2 files changed, 824 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 80e98ed2c7..776e025270 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7640,6 +7640,86 @@ test_zuc256_hash_verify_16b_tag_test_case_1(void)
 			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
+static int
+test_zuc256_cipher_auth_4b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_1);
+}
+
+static int
+test_zuc256_cipher_auth_4b_tag_test_case_2(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_2);
+}
+
+static int
+test_zuc256_cipher_auth_8b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_3);
+}
+
+static int
+test_zuc256_cipher_auth_16b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_4);
+}
+
+static int
+test_zuc256_auth_cipher_4b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_4b_tag_test_case_2(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_2, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_8b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_3, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_16b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_4, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_verify_4b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_1, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_4b_tag_test_case_2(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_2, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_8b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_3, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_16b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_4, IN_PLACE, 1);
+}
+
 static int
 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata)
 {
@@ -16507,6 +16587,36 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc256_hash_verify_16b_tag_test_case_1),
 
+		/** ZUC-256 encrypt and authenticate **/
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_16b_tag_test_case_1),
+
+		/** ZUC-256 generate auth, then encrypt */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_16b_tag_test_case_1),
+
+		/** ZUC-256 decrypt, then verify auth */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_16b_tag_test_case_1),
+
 		TEST_CASES_END()
 	}
 };
diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index 25297a2f8b..374068b846 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -1602,4 +1602,718 @@ static struct wireless_test_data zuc256_test_case_auth_2 = {
 	}
 };
 
+static struct wireless_test_data zuc256_test_case_cipher_auth_1 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 1024
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 1024
+	},
+	.validDataLenInBits = {
+		.len = 1024
+	},
+	.validCipherLenInBits = {
+		.len = 1024
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0x95, 0x86, 0xe4, 0x46},
+		.len  = 4
+	},
+	.validAuthLenInBits = {
+		.len = 1024
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_2 = {
+	.key = {
+		.data = {
+			0x1d, 0x0f, 0x0e, 0x75, 0x86, 0xb3, 0xfc, 0x65,
+			0x94, 0xbf, 0xaa, 0xa8, 0xf5, 0xd0, 0x0f, 0xe8,
+			0x14, 0x7a, 0x96, 0x61, 0x15, 0x49, 0x79, 0x71,
+			0x13, 0x82, 0xb4, 0xae, 0x34, 0x04, 0x75, 0x51
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x98, 0xcc, 0x89, 0x9f, 0xaf, 0x6d, 0x64, 0xb6,
+			0xb1, 0xe8, 0x21, 0x72, 0xee, 0xb6, 0xcc, 0xe3,
+			0xcf, 0x32, 0x28, 0x21, 0x21, 0x0d, 0x1e, 0x1c,
+			0x34
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0xa4, 0xcb, 0x6e, 0x76, 0x99, 0xfb, 0x0c, 0xab,
+			0x6d, 0x57, 0xb1, 0x69, 0xc0, 0x47, 0x80, 0x63,
+			0x00, 0xe1, 0xf9, 0x51, 0x10, 0xbe, 0xc0, 0x0f,
+			0x99, 0x62, 0x2d, 0x71, 0xca, 0x75, 0xa0, 0x6e,
+			0x41, 0x0e, 0xe4, 0xda, 0x09, 0xf1, 0x86, 0x76,
+			0x48, 0x37, 0xe0, 0x08, 0x7e, 0x60, 0x6c, 0x7f,
+			0x41, 0x65, 0xd0, 0x51, 0x24, 0x91, 0x61, 0xbd,
+			0xf3, 0x8e, 0x2e, 0xbd, 0x04, 0xce, 0x2b, 0x45,
+			0xdc, 0x0f, 0x1f, 0xe5, 0x00, 0xa5, 0x5c, 0x48,
+			0xdd, 0x3c, 0x51, 0x5b, 0x9c, 0xbd, 0xda, 0xde,
+			0x22, 0xab, 0x2f, 0x46, 0x3c, 0x90, 0x03, 0x2f,
+			0x1f, 0x31, 0xec, 0x23, 0xff, 0x17, 0x68, 0xdb,
+			0x26, 0x87, 0xc1, 0x27, 0x2d, 0x1d, 0x6f, 0x0a,
+			0x59, 0xc0, 0x65, 0xf5, 0x7d, 0x40, 0xd3, 0xa0,
+			0xeb, 0x03, 0xe6, 0x27, 0x93, 0xea, 0x56, 0xb2,
+			0x1b, 0x42, 0xd5, 0x1b, 0x59, 0x3d, 0xf6, 0x7f,
+			0xc5, 0xb7, 0xa6, 0xf2, 0xd4, 0x16, 0xfc, 0x2d,
+			0xd6, 0x61, 0x23, 0x54, 0xa1, 0xf6, 0xf4, 0x8c,
+			0xf9, 0xda, 0xb3, 0x8d, 0xc4, 0x09, 0x3f, 0xe0,
+			0x4b, 0x15, 0xfb, 0xa4, 0x52, 0xf1, 0x24, 0x17,
+			0xa9, 0xca, 0x09, 0x7d, 0xe0, 0x05, 0xab, 0xb7,
+			0x67, 0xce, 0x0b, 0x08, 0xc4, 0xff, 0x95, 0xbe,
+			0xd9, 0x48, 0x4b, 0x9e, 0x52, 0x8a, 0x7e, 0x9d,
+			0x9f, 0x79, 0x42, 0xf2, 0x6a, 0x66, 0x09, 0x13,
+			0x30, 0x13, 0x91, 0x11, 0x18, 0x3c, 0xc8, 0x7f,
+			0x0a, 0xd3, 0x88, 0xce, 0xd2, 0x1d, 0x8c, 0xab,
+			0x65, 0xd7, 0x49, 0xb7, 0x62, 0xc7, 0x55, 0x01,
+			0x40, 0x97, 0xf3, 0xab, 0xfd, 0xfd, 0xbe, 0x2d,
+			0x10, 0x4f, 0x3e, 0x28, 0x8b, 0x06, 0xa8, 0x95,
+			0xd9, 0x30, 0x64, 0xab, 0x4d, 0xf0, 0x57, 0xb2,
+			0xc8
+		},
+		.len = 1928
+	},
+	.ciphertext = {
+		.data = {
+			0xd0, 0xf9, 0xff, 0xce, 0x03, 0x81, 0x14, 0x9c,
+			0xd5, 0xf2, 0xbf, 0xe5, 0xff, 0xc8, 0x15, 0x4a,
+			0x9c, 0x06, 0x2b, 0x17, 0x99, 0xe3, 0x48, 0x70,
+			0x37, 0x01, 0x5e, 0x24, 0x80, 0x9a, 0x46, 0x4e,
+			0xa8, 0xc0, 0x59, 0xd7, 0x03, 0x74, 0x28, 0x91,
+			0x79, 0xb4, 0xb5, 0xd6, 0x52, 0x92, 0x04, 0x77,
+			0x5b, 0x4f, 0x34, 0xd1, 0xbe, 0xaa, 0x74, 0xd9,
+			0x01, 0x40, 0x24, 0xc7, 0x8c, 0x62, 0x2a, 0x51,
+			0x5a, 0x58, 0x0e, 0xc8, 0x70, 0x12, 0x06, 0x1c,
+			0x62, 0x7f, 0xf5, 0x23, 0xcb, 0x3c, 0xc1, 0xbe,
+			0x8b, 0x7f, 0x9d, 0x12, 0xb8, 0x26, 0xc8, 0xa3,
+			0x77, 0x7e, 0x83, 0xda, 0x83, 0xe1, 0x9f, 0xef,
+			0x33, 0x62, 0x17, 0xa7, 0x74, 0x68, 0x34, 0x5e,
+			0x16, 0xcc, 0xbc, 0x6c, 0x33, 0x2f, 0x73, 0xf0,
+			0xfc, 0xe5, 0x2c, 0x2d, 0xfb, 0x81, 0xbe, 0x1e,
+			0x6e, 0x4f, 0xf4, 0x14, 0x37, 0x7c, 0x97, 0xac,
+			0xa9, 0xac, 0x68, 0x95, 0xf3, 0x55, 0xb3, 0xfb,
+			0xf6, 0x64, 0xd9, 0x1b, 0xe1, 0x54, 0x79, 0x6e,
+			0xfa, 0x21, 0xa4, 0x19, 0x9f, 0xb4, 0x4b, 0xb7,
+			0xef, 0x52, 0xd8, 0x44, 0x75, 0x99, 0x07, 0x6d,
+			0xa9, 0xcf, 0x32, 0xc5, 0xc1, 0x31, 0x0c, 0xa8,
+			0x86, 0x40, 0x75, 0xeb, 0x12, 0xcf, 0x26, 0x5c,
+			0x5f, 0xa3, 0x3c, 0xb6, 0x12, 0x45, 0xf3, 0x0a,
+			0x38, 0x09, 0xa8, 0x36, 0x32, 0x4a, 0x2f, 0xad,
+			0x50, 0x11, 0x38, 0xba, 0x8f, 0xdd, 0xd1, 0x58,
+			0xd7, 0x3d, 0x3a, 0x40, 0x7c, 0x3f, 0xa7, 0x98,
+			0xf3, 0x12, 0x7f, 0x9f, 0x89, 0xcf, 0x48, 0x58,
+			0x01, 0xeb, 0x98, 0x7c, 0x59, 0x11, 0x9f, 0x57,
+			0x74, 0x5f, 0x70, 0x72, 0x74, 0xa4, 0x82, 0x3c,
+			0x36, 0xe6, 0x31, 0x9e, 0xba, 0x7b, 0x53, 0xfc,
+			0x56
+		},
+		.len = 1928
+	},
+	.validDataLenInBits = {
+		.len = 1928
+	},
+	.validCipherLenInBits = {
+		.len = 1928
+	},
+	.auth_iv = {
+		.data = {
+			0x60, 0xaa, 0xd2, 0xb2, 0xd0, 0x85, 0xfa, 0x54,
+			0xd8, 0x35, 0xe8, 0xd4, 0x66, 0x82, 0x64, 0x98,
+			0xd9, 0x2a, 0x08, 0x1d, 0x35, 0x19, 0x17, 0x01,
+			0x1A
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0x2c, 0x48, 0x3a, 0xe5},
+		.len  = 4
+	},
+	.validAuthLenInBits = {
+		.len = 1928
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_3 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 1024
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 1024
+	},
+	.validDataLenInBits = {
+		.len = 1024
+	},
+	.validCipherLenInBits = {
+		.len = 1024
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0xD5, 0x2F, 0xC4, 0x2B, 0xC2, 0x03, 0xAC, 0xF7},
+		.len  = 8
+	},
+	.validAuthLenInBits = {
+		.len = 1024
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_4 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 1024
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 1024
+	},
+	.validDataLenInBits = {
+		.len = 1024
+	},
+	.validCipherLenInBits = {
+		.len = 1024
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {
+			0x8B, 0x31, 0x9E, 0x86, 0x7F, 0xB1, 0x94, 0xE5,
+			0xA5, 0x53, 0x73, 0xC5, 0x59, 0xD5, 0x6D, 0x37
+		},
+		.len  = 16
+	},
+	.validAuthLenInBits = {
+		.len = 1024
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_1 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E, 0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8, 0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7, 0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99, 0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3, 0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9, 0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D, 0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6, 0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50, 0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59, 0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF, 0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F, 0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0, 0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73, 0xA7, 0xE3, 0xC9, 0xD2,
+			0x08, 0x33, 0x73, 0x13, 0xEC, 0x56, 0x59, 0x11,
+			0xC9, 0x8A, 0x4B, 0x7A, 0xB1, 0xDD, 0x55, 0x9B
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 124 << 3
+	},
+	.digest = {
+		.data = {0xB1, 0xDD, 0x55, 0x9B},
+		.len  = 4,
+		.offset_bytes = 124
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_2 = {
+	.key = {
+		.data = {
+			0x6a, 0x7e, 0x4c, 0x7e, 0x51, 0x25, 0xb3, 0x48,
+			0x84, 0x53, 0x3a, 0x94, 0xfb, 0x31, 0x99, 0x90,
+			0x32, 0x57, 0x44, 0xee, 0x9b, 0xbc, 0xe9, 0xe5,
+			0x25, 0xcf, 0x08, 0xf5, 0xe9, 0xe2, 0x5e, 0x53
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x98, 0xcc, 0x89, 0x9f, 0xaf, 0x6d, 0x64, 0xb6,
+			0xb1, 0xe8, 0x21, 0x72, 0xee, 0xb6, 0xcc, 0xe3,
+			0xcf, 0x32, 0x28, 0x21, 0x21, 0x0d, 0x1e, 0x1c,
+			0x34
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0x60, 0xaa, 0xd2, 0xb2, 0xd0, 0x85, 0xfa, 0x54,
+			0xd8, 0x35, 0xe8, 0xd4, 0x66, 0x82, 0x64, 0x98,
+			0xd9, 0x2a, 0x08, 0x1d, 0x35, 0x19, 0x17, 0x01,
+			0x1A
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
+			0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
+			0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07, 0xE4, 0x67,
+			0xC4, 0xE5, 0x60, 0x00, 0xBA, 0x33, 0x8F, 0x5D,
+			0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
+			0x46, 0xC8, 0x0D, 0x3B, 0x38, 0xF0, 0x7F, 0x4B,
+			0xE2, 0xD8, 0xFF, 0x58, 0x05, 0xF5, 0x13, 0x22,
+			0x29, 0xBD, 0xE9, 0x3B, 0xBB, 0xDC, 0xAF, 0x38,
+			0x2B, 0xF1, 0xEE, 0x97, 0x2F, 0xBF, 0x99, 0x77,
+			0xBA, 0xDA, 0x89, 0x45, 0x84, 0x7A, 0x2A, 0x6C,
+			0x9A, 0xD3, 0x4A, 0x66, 0x75, 0x54, 0xE0, 0x4D,
+			0x1F, 0x7F, 0xA2, 0xC3, 0x32, 0x41, 0xBD, 0x8F,
+			0x01, 0xBA, 0x22, 0x0D
+		},
+		.len = 96 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0x52, 0x4E, 0x50, 0x7A, 0x90, 0x37, 0x65, 0x66,
+			0xD5, 0x46, 0x04, 0x68, 0x2A, 0x42, 0xD1, 0xE9,
+			0x73, 0x9F, 0xE9, 0x53, 0x8C, 0x0E, 0x72, 0x05,
+			0x05, 0xA9, 0xDB, 0x8C, 0x2A, 0x18, 0xFD, 0x73,
+			0xB9, 0x2C, 0x45, 0x48, 0xA4, 0x54, 0xF7, 0x62,
+			0xB9, 0x8B, 0x42, 0x62, 0x0B, 0xA8, 0xE7, 0x79,
+			0x67, 0x3C, 0x96, 0xB6, 0x4B, 0x23, 0x66, 0x13,
+			0xC9, 0x74, 0x71, 0x3E, 0x23, 0x0D, 0x4B, 0x08,
+			0x78, 0x36, 0x9E, 0xAC, 0x82, 0xDF, 0xDE, 0xE9,
+			0xF4, 0xD6, 0x62, 0x28, 0x44, 0x86, 0x6C, 0xEA,
+			0xD0, 0x59, 0x34, 0x83, 0x67, 0x28, 0xDE, 0xC8,
+			0x89, 0xFE, 0x21, 0x9B, 0x87, 0x88, 0x8D, 0xAB,
+			0x51, 0x05, 0x0F, 0x5C
+		},
+		.len = 100 << 3
+	},
+	.validDataLenInBits = {
+		.len = 100 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 100 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 96 << 3
+	},
+	.digest = {
+		.data = {0x51, 0x05, 0x0F, 0x5C},
+		.len  = 4,
+		.offset_bytes = 96
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_3 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E,	0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8,	0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7,	0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99,	0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3,	0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9,	0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D,	0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6,	0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50,	0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59,	0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF,	0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F,	0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0,	0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73,	0xA7, 0xE3, 0xC9, 0xD2,
+			0x08, 0x33, 0x73, 0x13,	0xEC, 0x56, 0x59, 0x11,
+			0x4C, 0x7C, 0x4D, 0xC7, 0x3E, 0x81, 0x35, 0x20
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 120 << 3
+	},
+	.digest = {
+		.data = {0x4C, 0x7C, 0x4D, 0xC7, 0x3E, 0x81, 0x35, 0x20},
+		.len  = 8,
+		.offset_bytes = 120
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_4 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E, 0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8, 0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7, 0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99, 0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3, 0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9, 0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D, 0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6, 0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50, 0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59, 0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF, 0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F, 0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0, 0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73, 0xA7, 0xE3, 0xC9, 0xD2,
+			0x96, 0x2B, 0x25, 0x9F, 0xDD, 0x6E, 0x72, 0xE3,
+			0x86, 0x01, 0xA5, 0x56, 0x66, 0x90, 0xAE, 0xC2
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 112 << 3
+	},
+	.digest = {
+		.data = {
+			0x96, 0x2B, 0x25, 0x9F, 0xDD, 0x6E, 0x72, 0xE3,
+			0x86, 0x01, 0xA5, 0x56, 0x66, 0x90, 0xAE, 0xC2
+		},
+		.len  = 16,
+		.offset_bytes = 112
+	}
+};
+
 #endif /* TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 5/5] test/crypto: add chained ZUC256 testcases
  2023-03-01 16:39 ` [PATCH 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
@ 2023-03-02  9:56   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 17+ messages in thread
From: De Lara Guarch, Pablo @ 2023-03-02  9:56 UTC (permalink / raw)
  To: Power, Ciara, Akhil Goyal, Fan Zhang; +Cc: dev, Ji, Kai

Hi Ciara,

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Wednesday, March 1, 2023 5:39 PM
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>
> Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH 5/5] test/crypto: add chained ZUC256 testcases
> 
> Testcases are added for ZUC256 cipher-auth, auth-cipher, and auth-cipher-
> verify.
> 4 byte, 8 byte, and 16 byte tags are tested for each chained type.
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>

...

> --- a/app/test/test_cryptodev_zuc_test_vectors.h
> +++ b/app/test/test_cryptodev_zuc_test_vectors.h
> @@ -1602,4 +1602,718 @@ static struct wireless_test_data
> zuc256_test_case_auth_2 = {
>  	}
>  };
> 
> +static struct wireless_test_data zuc256_test_case_cipher_auth_1 = {
> +	.key = {
> +		.data = {
> +			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
> +			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
> +			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
> +			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
> +		},
> +		.len = 32
> +	},
> +	.cipher_iv = {
> +		.data = {
> +			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
> +			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
> +			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
> +			0x12
> +		},
> +		.len = 25
> +	},
> +	.plaintext = {
> +		.data = {
> +			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
> +			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
> +			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
> +			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
> +			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
> +			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
> +			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
> +			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
> +			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
> +			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
> +			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
> +			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
> +			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
> +			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
> +			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
> +			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
> +		},
> +		.len = 1024

My only comment is that you could use "128 << 3", same as you did with other vectors below, so it's clear that these is 128 bytes passed as bits (same for the lengths below).


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 0/5] test/crypto: add ZUC256 chained tests
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
                   ` (4 preceding siblings ...)
  2023-03-01 16:39 ` [PATCH 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
@ 2023-03-02 10:07 ` Dooley, Brian
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
  6 siblings, 0 replies; 17+ messages in thread
From: Dooley, Brian @ 2023-03-02 10:07 UTC (permalink / raw)
  To: Power, Ciara; +Cc: dev, Ji, Kai, De Lara Guarch, Pablo, Power, Ciara

Hi Ciara,

> -----Original Message-----
> From: Ciara Power <ciara.power@intel.com>
> Sent: Wednesday 1 March 2023 16:39
> Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH 0/5] test/crypto: add ZUC256 chained tests
> 
> This patchset adds chained testcases for each ZUC256 digest size:
>  - cipher-auth
>  - auth-cipher
>  - auth-cipher-verify
> 
>  To add these tests, some improvements were made to the existing code,
> allowing for the user to easily differentiate ZUC256 and ZUC128 tests.
> 
>  Some fixes are also included, that were highlighted when these new tests
> were added.
> 
> Ciara Power (5):
>   test/crypto: improve readability of ZUC256 tests
>   test/crypto: fix ZUC digest length in comparison
>   test/crypto: fix auth op parameter for ZUC256 tests
>   test/crypto: fix capability check for ZUC cipher auth
>   test/crypto: add chained ZUC256 testcases
> 
>  app/test/test_cryptodev.c                  | 280 +++++---
>  app/test/test_cryptodev_zuc_test_vectors.h | 714
> +++++++++++++++++++++
>  2 files changed, 913 insertions(+), 81 deletions(-)
> 
> --
> 2.25.1

Series-acked-by: Brian Dooley <brian.dooley@intel.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
  2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
                   ` (5 preceding siblings ...)
  2023-03-02 10:07 ` [PATCH 0/5] test/crypto: add ZUC256 chained tests Dooley, Brian
@ 2023-03-03  9:38 ` Ciara Power
  2023-03-03  9:38   ` [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
                     ` (6 more replies)
  6 siblings, 7 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power

This patchset adds chained testcases for each ZUC256 digest size:
 - cipher-auth
 - auth-cipher
 - auth-cipher-verify

 To add these tests, some improvements were made to the existing code,
 allowing for the user to easily differentiate ZUC256 and ZUC128 tests.

 Some fixes are also included, that were highlighted when these new tests
 were added. 

 v2: changed bit lengths to byte length representation.

Ciara Power (5):
  test/crypto: improve readability of ZUC256 tests
  test/crypto: fix ZUC digest length in comparison
  test/crypto: fix auth op parameter for ZUC256 tests
  test/crypto: fix capability check for ZUC cipher auth
  test/crypto: add chained ZUC256 testcases

 app/test/test_cryptodev.c                  | 280 +++++---
 app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
 2 files changed, 913 insertions(+), 81 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
@ 2023-03-03  9:38   ` Ciara Power
  2023-03-03  9:38   ` [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, Brian Dooley

There were some ZUC256 tests for hash generate and hash verify mixed in
with the ZUC128 tests, with no indication in the test name that they
were for ZUC256.

These are now grouped with other ZUC256 tests, and all ZUC256 hash test
names are modified to be more uniform, and indicate the digest length
as this can vary with ZUC256.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 125 +++++++++++++++++++-------------------
 1 file changed, 62 insertions(+), 63 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index aa831d79a2..ca7f10557c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7385,27 +7385,6 @@ test_zuc_hash_generate_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
-static int
-test_zuc_hash_generate_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
-static int
-test_zuc_hash_generate_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_GENERATE);
-}
-
 static int
 test_zuc_hash_verify_test_case_1(void)
 {
@@ -7462,27 +7441,6 @@ test_zuc_hash_verify_test_case_8(void)
 			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
-static int
-test_zuc_hash_verify_test_case_9(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_10(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
-static int
-test_zuc_hash_verify_test_case_11(void)
-{
-	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
-			RTE_CRYPTO_AUTH_OP_VERIFY);
-}
-
 static int
 test_zuc_cipher_auth_test_case_1(void)
 {
@@ -7608,29 +7566,71 @@ test_zuc256_decryption_test_case_2(void)
 }
 
 static int
-test_zuc256_authentication_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
 }
 
 static int
-test_zuc256_authentication_test_case_2(void)
+test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_1(void)
+test_zuc256_hash_generate_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_generate_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
+}
+
+static int
+test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
 }
 
 static int
-test_zuc256_authentication_verify_test_case_2(void)
+test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
 	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
 }
 
+static int
+test_zuc256_hash_verify_4b_tag_test_case_3(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_32b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_8b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_64b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
+static int
+test_zuc256_hash_verify_16b_tag_test_case_1(void)
+{
+	return test_zuc_authentication(&zuc_test_case_auth_4000b_mac_128b,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
+}
+
 static int
 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata)
 {
@@ -16409,12 +16409,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_generate_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_generate_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_generate_test_case_11),
 
 		/** ZUC verify (EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16433,13 +16427,6 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 			test_zuc_hash_verify_test_case_7),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc_hash_verify_test_case_8),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_9),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_10),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc_hash_verify_test_case_11),
-
 
 		/** ZUC alg-chain (EEA3/EIA3) */
 		TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16489,15 +16476,27 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 
 		/** ZUC-256 authentication only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_1),
+			test_zuc256_hash_generate_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_4b_tag_test_case_2),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_test_case_2),
+			test_zuc256_hash_generate_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_generate_16b_tag_test_case_1),
 
 		/** ZUC-256 authentication verify only **/
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_1),
+			test_zuc256_hash_verify_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_4b_tag_test_case_3),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_hash_verify_8b_tag_test_case_1),
 		TEST_CASE_ST(ut_setup, ut_teardown,
-			test_zuc256_authentication_verify_test_case_2),
+			test_zuc256_hash_verify_16b_tag_test_case_1),
 
 		TEST_CASES_END()
 	}
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
  2023-03-03  9:38   ` [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
@ 2023-03-03  9:38   ` Ciara Power
  2023-03-03  9:38   ` [PATCH v2 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, vvelumuri,
	stable, Brian Dooley

The digest length used in ZUC tests for verifying the digest was
hardcoded at 4 bytes, which was suitable for ZUC128 only.
Now that ZUC256 is supported by these test functions, the digest length
can vary.

Using the test vector digest length directly in these
comparisons allows for variable digest length.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")
Fixes: fa5bf9345d4e ("test/crypto: add ZUC cases with 256-bit keys")
Cc: vvelumuri@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ca7f10557c..72d359dd91 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4853,7 +4853,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			4,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	return 0;
 }
@@ -6499,7 +6499,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			ut_params->digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
@@ -6706,7 +6706,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 			digest,
 			tdata->digest.data,
-			DIGEST_BYTE_LENGTH_KASUMI_F9,
+			tdata->digest.len,
 			"ZUC Generated auth tag not as expected");
 	}
 	return 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 3/5] test/crypto: fix auth op parameter for ZUC256 tests
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
  2023-03-03  9:38   ` [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
  2023-03-03  9:38   ` [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
@ 2023-03-03  9:38   ` Ciara Power
  2023-03-03  9:38   ` [PATCH v2 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, Brian Dooley

The incorrect value was being passed to the ZUC authentication test
function, indicating the opposite of the intended GENERATE/VERIFY op.
This is fixed to use the auth op enum rather than a value.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 72d359dd91..9b90bae206 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7568,13 +7568,15 @@ test_zuc256_decryption_test_case_2(void)
 static int
 test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
@@ -7601,13 +7603,15 @@ test_zuc256_hash_generate_16b_tag_test_case_1(void)
 static int
 test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 4/5] test/crypto: fix capability check for ZUC cipher auth
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
                     ` (2 preceding siblings ...)
  2023-03-03  9:38   ` [PATCH v2 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
@ 2023-03-03  9:38   ` Ciara Power
  2023-03-03  9:38   ` [PATCH v2 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, stable, Brian Dooley

The cipher-auth test function for ZUC was not using the improved cipher
and auth capability check functions. This meant the required key and IV
lengths were not being checked, leading to problems with ZUC256 tests
running, and failing, on devices that only support ZUC128.

Fixes: 27b787132484 ("test/crypto: check cipher parameters")
Fixes: f93fce6de4aa ("test/crypto: check auth parameters")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9b90bae206..80e98ed2c7 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -136,6 +136,17 @@ security_proto_supported(enum rte_security_session_action_type action,
 static int
 dev_configure_and_start(uint64_t ff_disable);
 
+static int
+check_cipher_capability(const struct crypto_testsuite_params *ts_params,
+			const enum rte_crypto_cipher_algorithm cipher_algo,
+			const uint16_t key_size, const uint16_t iv_size);
+
+static int
+check_auth_capability(const struct crypto_testsuite_params *ts_params,
+			const enum rte_crypto_auth_algorithm auth_algo,
+			const uint16_t key_size, const uint16_t iv_size,
+			const uint16_t tag_size);
+
 static struct rte_mbuf *
 setup_test_string(struct rte_mempool *mpool,
 		const char *string, size_t len, uint8_t blocksize)
@@ -4761,7 +4772,6 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 	unsigned int plaintext_len;
 
 	struct rte_cryptodev_info dev_info;
-	struct rte_cryptodev_sym_capability_idx cap_idx;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -4783,19 +4793,14 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
 		return TEST_SKIPPED;
 
 	/* Check if device supports ZUC EEA3 */
-	cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3;
-
-	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
-			&cap_idx) == NULL)
+	if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3,
+			tdata->key.len, tdata->cipher_iv.len) < 0)
 		return TEST_SKIPPED;
 
 	/* Check if device supports ZUC EIA3 */
-	cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-	cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3;
-
-	if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
-			&cap_idx) == NULL)
+	if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3,
+			tdata->key.len, tdata->auth_iv.len,
+			tdata->digest.len) < 0)
 		return TEST_SKIPPED;
 
 	/* Create ZUC session */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 5/5] test/crypto: add chained ZUC256 testcases
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
                     ` (3 preceding siblings ...)
  2023-03-03  9:38   ` [PATCH v2 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
@ 2023-03-03  9:38   ` Ciara Power
  2023-03-03 16:37   ` [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests Tejasree Kondoj
  2023-03-06  9:32   ` De Lara Guarch, Pablo
  6 siblings, 0 replies; 17+ messages in thread
From: Ciara Power @ 2023-03-03  9:38 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang
  Cc: dev, kai.ji, pablo.de.lara.guarch, Ciara Power, Brian Dooley

Testcases are added for ZUC256 cipher-auth, auth-cipher,
and auth-cipher-verify.
4 byte, 8 byte, and 16 byte tags are tested for each chained type.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>

---
v2: changed from bit to byte length representation
---
 app/test/test_cryptodev.c                  | 110 ++++
 app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
 2 files changed, 824 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 80e98ed2c7..776e025270 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7640,6 +7640,86 @@ test_zuc256_hash_verify_16b_tag_test_case_1(void)
 			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
+static int
+test_zuc256_cipher_auth_4b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_1);
+}
+
+static int
+test_zuc256_cipher_auth_4b_tag_test_case_2(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_2);
+}
+
+static int
+test_zuc256_cipher_auth_8b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_3);
+}
+
+static int
+test_zuc256_cipher_auth_16b_tag_test_case_1(void)
+{
+	return test_zuc_cipher_auth(&zuc256_test_case_cipher_auth_4);
+}
+
+static int
+test_zuc256_auth_cipher_4b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_4b_tag_test_case_2(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_2, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_8b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_3, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_16b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_4, IN_PLACE, 0);
+}
+
+static int
+test_zuc256_auth_cipher_verify_4b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_1, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_4b_tag_test_case_2(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_2, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_8b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_3, IN_PLACE, 1);
+}
+
+static int
+test_zuc256_auth_cipher_verify_16b_tag_test_case_1(void)
+{
+	return test_zuc_auth_cipher(
+		&zuc256_auth_cipher_test_case_4, IN_PLACE, 1);
+}
+
 static int
 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata)
 {
@@ -16507,6 +16587,36 @@ static struct unit_test_suite cryptodev_zuc_testsuite  = {
 		TEST_CASE_ST(ut_setup, ut_teardown,
 			test_zuc256_hash_verify_16b_tag_test_case_1),
 
+		/** ZUC-256 encrypt and authenticate **/
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_cipher_auth_16b_tag_test_case_1),
+
+		/** ZUC-256 generate auth, then encrypt */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_16b_tag_test_case_1),
+
+		/** ZUC-256 decrypt, then verify auth */
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_4b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_4b_tag_test_case_2),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_8b_tag_test_case_1),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+			test_zuc256_auth_cipher_verify_16b_tag_test_case_1),
+
 		TEST_CASES_END()
 	}
 };
diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h
index 25297a2f8b..cb1b51e1fd 100644
--- a/app/test/test_cryptodev_zuc_test_vectors.h
+++ b/app/test/test_cryptodev_zuc_test_vectors.h
@@ -1602,4 +1602,718 @@ static struct wireless_test_data zuc256_test_case_auth_2 = {
 	}
 };
 
+static struct wireless_test_data zuc256_test_case_cipher_auth_1 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0x95, 0x86, 0xe4, 0x46},
+		.len  = 4
+	},
+	.validAuthLenInBits = {
+		.len = 128 << 3
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_2 = {
+	.key = {
+		.data = {
+			0x1d, 0x0f, 0x0e, 0x75, 0x86, 0xb3, 0xfc, 0x65,
+			0x94, 0xbf, 0xaa, 0xa8, 0xf5, 0xd0, 0x0f, 0xe8,
+			0x14, 0x7a, 0x96, 0x61, 0x15, 0x49, 0x79, 0x71,
+			0x13, 0x82, 0xb4, 0xae, 0x34, 0x04, 0x75, 0x51
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x98, 0xcc, 0x89, 0x9f, 0xaf, 0x6d, 0x64, 0xb6,
+			0xb1, 0xe8, 0x21, 0x72, 0xee, 0xb6, 0xcc, 0xe3,
+			0xcf, 0x32, 0x28, 0x21, 0x21, 0x0d, 0x1e, 0x1c,
+			0x34
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0xa4, 0xcb, 0x6e, 0x76, 0x99, 0xfb, 0x0c, 0xab,
+			0x6d, 0x57, 0xb1, 0x69, 0xc0, 0x47, 0x80, 0x63,
+			0x00, 0xe1, 0xf9, 0x51, 0x10, 0xbe, 0xc0, 0x0f,
+			0x99, 0x62, 0x2d, 0x71, 0xca, 0x75, 0xa0, 0x6e,
+			0x41, 0x0e, 0xe4, 0xda, 0x09, 0xf1, 0x86, 0x76,
+			0x48, 0x37, 0xe0, 0x08, 0x7e, 0x60, 0x6c, 0x7f,
+			0x41, 0x65, 0xd0, 0x51, 0x24, 0x91, 0x61, 0xbd,
+			0xf3, 0x8e, 0x2e, 0xbd, 0x04, 0xce, 0x2b, 0x45,
+			0xdc, 0x0f, 0x1f, 0xe5, 0x00, 0xa5, 0x5c, 0x48,
+			0xdd, 0x3c, 0x51, 0x5b, 0x9c, 0xbd, 0xda, 0xde,
+			0x22, 0xab, 0x2f, 0x46, 0x3c, 0x90, 0x03, 0x2f,
+			0x1f, 0x31, 0xec, 0x23, 0xff, 0x17, 0x68, 0xdb,
+			0x26, 0x87, 0xc1, 0x27, 0x2d, 0x1d, 0x6f, 0x0a,
+			0x59, 0xc0, 0x65, 0xf5, 0x7d, 0x40, 0xd3, 0xa0,
+			0xeb, 0x03, 0xe6, 0x27, 0x93, 0xea, 0x56, 0xb2,
+			0x1b, 0x42, 0xd5, 0x1b, 0x59, 0x3d, 0xf6, 0x7f,
+			0xc5, 0xb7, 0xa6, 0xf2, 0xd4, 0x16, 0xfc, 0x2d,
+			0xd6, 0x61, 0x23, 0x54, 0xa1, 0xf6, 0xf4, 0x8c,
+			0xf9, 0xda, 0xb3, 0x8d, 0xc4, 0x09, 0x3f, 0xe0,
+			0x4b, 0x15, 0xfb, 0xa4, 0x52, 0xf1, 0x24, 0x17,
+			0xa9, 0xca, 0x09, 0x7d, 0xe0, 0x05, 0xab, 0xb7,
+			0x67, 0xce, 0x0b, 0x08, 0xc4, 0xff, 0x95, 0xbe,
+			0xd9, 0x48, 0x4b, 0x9e, 0x52, 0x8a, 0x7e, 0x9d,
+			0x9f, 0x79, 0x42, 0xf2, 0x6a, 0x66, 0x09, 0x13,
+			0x30, 0x13, 0x91, 0x11, 0x18, 0x3c, 0xc8, 0x7f,
+			0x0a, 0xd3, 0x88, 0xce, 0xd2, 0x1d, 0x8c, 0xab,
+			0x65, 0xd7, 0x49, 0xb7, 0x62, 0xc7, 0x55, 0x01,
+			0x40, 0x97, 0xf3, 0xab, 0xfd, 0xfd, 0xbe, 0x2d,
+			0x10, 0x4f, 0x3e, 0x28, 0x8b, 0x06, 0xa8, 0x95,
+			0xd9, 0x30, 0x64, 0xab, 0x4d, 0xf0, 0x57, 0xb2,
+			0xc8
+		},
+		.len = 241 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xd0, 0xf9, 0xff, 0xce, 0x03, 0x81, 0x14, 0x9c,
+			0xd5, 0xf2, 0xbf, 0xe5, 0xff, 0xc8, 0x15, 0x4a,
+			0x9c, 0x06, 0x2b, 0x17, 0x99, 0xe3, 0x48, 0x70,
+			0x37, 0x01, 0x5e, 0x24, 0x80, 0x9a, 0x46, 0x4e,
+			0xa8, 0xc0, 0x59, 0xd7, 0x03, 0x74, 0x28, 0x91,
+			0x79, 0xb4, 0xb5, 0xd6, 0x52, 0x92, 0x04, 0x77,
+			0x5b, 0x4f, 0x34, 0xd1, 0xbe, 0xaa, 0x74, 0xd9,
+			0x01, 0x40, 0x24, 0xc7, 0x8c, 0x62, 0x2a, 0x51,
+			0x5a, 0x58, 0x0e, 0xc8, 0x70, 0x12, 0x06, 0x1c,
+			0x62, 0x7f, 0xf5, 0x23, 0xcb, 0x3c, 0xc1, 0xbe,
+			0x8b, 0x7f, 0x9d, 0x12, 0xb8, 0x26, 0xc8, 0xa3,
+			0x77, 0x7e, 0x83, 0xda, 0x83, 0xe1, 0x9f, 0xef,
+			0x33, 0x62, 0x17, 0xa7, 0x74, 0x68, 0x34, 0x5e,
+			0x16, 0xcc, 0xbc, 0x6c, 0x33, 0x2f, 0x73, 0xf0,
+			0xfc, 0xe5, 0x2c, 0x2d, 0xfb, 0x81, 0xbe, 0x1e,
+			0x6e, 0x4f, 0xf4, 0x14, 0x37, 0x7c, 0x97, 0xac,
+			0xa9, 0xac, 0x68, 0x95, 0xf3, 0x55, 0xb3, 0xfb,
+			0xf6, 0x64, 0xd9, 0x1b, 0xe1, 0x54, 0x79, 0x6e,
+			0xfa, 0x21, 0xa4, 0x19, 0x9f, 0xb4, 0x4b, 0xb7,
+			0xef, 0x52, 0xd8, 0x44, 0x75, 0x99, 0x07, 0x6d,
+			0xa9, 0xcf, 0x32, 0xc5, 0xc1, 0x31, 0x0c, 0xa8,
+			0x86, 0x40, 0x75, 0xeb, 0x12, 0xcf, 0x26, 0x5c,
+			0x5f, 0xa3, 0x3c, 0xb6, 0x12, 0x45, 0xf3, 0x0a,
+			0x38, 0x09, 0xa8, 0x36, 0x32, 0x4a, 0x2f, 0xad,
+			0x50, 0x11, 0x38, 0xba, 0x8f, 0xdd, 0xd1, 0x58,
+			0xd7, 0x3d, 0x3a, 0x40, 0x7c, 0x3f, 0xa7, 0x98,
+			0xf3, 0x12, 0x7f, 0x9f, 0x89, 0xcf, 0x48, 0x58,
+			0x01, 0xeb, 0x98, 0x7c, 0x59, 0x11, 0x9f, 0x57,
+			0x74, 0x5f, 0x70, 0x72, 0x74, 0xa4, 0x82, 0x3c,
+			0x36, 0xe6, 0x31, 0x9e, 0xba, 0x7b, 0x53, 0xfc,
+			0x56
+		},
+		.len = 241 << 3
+	},
+	.validDataLenInBits = {
+		.len = 241 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 241 << 3
+	},
+	.auth_iv = {
+		.data = {
+			0x60, 0xaa, 0xd2, 0xb2, 0xd0, 0x85, 0xfa, 0x54,
+			0xd8, 0x35, 0xe8, 0xd4, 0x66, 0x82, 0x64, 0x98,
+			0xd9, 0x2a, 0x08, 0x1d, 0x35, 0x19, 0x17, 0x01,
+			0x1A
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0x2c, 0x48, 0x3a, 0xe5},
+		.len  = 4
+	},
+	.validAuthLenInBits = {
+		.len = 241 << 3
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_3 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {0xD5, 0x2F, 0xC4, 0x2B, 0xC2, 0x03, 0xAC, 0xF7},
+		.len  = 8
+	},
+	.validAuthLenInBits = {
+		.len = 128 << 3
+	}
+};
+
+static struct wireless_test_data zuc256_test_case_cipher_auth_4 = {
+	.key = {
+		.data = {
+			0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
+			0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
+			0xd5, 0xf7, 0x4b, 0x68, 0x48, 0x6b, 0x92, 0x6a,
+			0x34, 0x1f, 0x86, 0x66, 0x60, 0x0a, 0xfc, 0x57
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x36, 0xdb, 0x63, 0x68, 0xb5, 0x1f, 0x4e, 0x92,
+			0x46, 0x1f, 0xde, 0xdb, 0xc2, 0xec, 0xfa, 0x7e,
+			0x49, 0x85, 0x77, 0xaa, 0x46, 0x98, 0x30, 0x2d,
+			0x3b, 0xc4, 0x11, 0x24, 0x98, 0x20, 0xa9, 0xce,
+			0xfb, 0x0d, 0x36, 0xb0, 0x2c, 0x85, 0x42, 0x72,
+			0xa4, 0x21, 0x4e, 0x66, 0x0d, 0x48, 0xe4, 0x57,
+			0xce, 0x5b, 0x01, 0x14, 0xf3, 0x31, 0x42, 0x2e,
+			0xf5, 0x53, 0x52, 0x8d, 0x73, 0xfc, 0x5c, 0x6e,
+			0x09, 0x92, 0x1e, 0x35, 0x17, 0x60, 0xa8, 0xbb,
+			0x81, 0xf6, 0x21, 0x8f, 0x3e, 0x05, 0xe6, 0x0c,
+			0x60, 0xe7, 0x21, 0x53, 0x18, 0x63, 0x81, 0x0d,
+			0xb6, 0xd4, 0x9a, 0x29, 0xd0, 0xf6, 0x97, 0xd9,
+			0x89, 0xb5, 0x0e, 0xa0, 0x15, 0xb6, 0x5c, 0x97,
+			0xac, 0x7d, 0x26, 0xeb, 0x83, 0x0c, 0xf7, 0xe3,
+			0xf3, 0x18, 0x37, 0x0b, 0x7b, 0xb8, 0x18, 0x31,
+			0x8c, 0xb2, 0x5a, 0x5c, 0xa9, 0xf1, 0x35, 0x32
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xa6, 0xe5, 0x71, 0x58, 0x5c, 0xcf, 0x5d, 0x0d,
+			0x59, 0xb5, 0x51, 0xab, 0xf5, 0xfa, 0x31, 0xf9,
+			0x8d, 0x4f, 0xf0, 0x3c, 0x7d, 0x61, 0x8d, 0x7a,
+			0x6b, 0xcb, 0x2c, 0x79, 0xca, 0x99, 0x06, 0x6f,
+			0xff, 0x5d, 0x12, 0x5f, 0x0e, 0x7a, 0x33, 0x6b,
+			0x51, 0xbc, 0x58, 0x53, 0xff, 0xbd, 0x85, 0xc9,
+			0xac, 0x5f, 0x33, 0xc2, 0xa2, 0xf1, 0x17, 0x7a,
+			0xd9, 0x3f, 0x81, 0x82, 0x2f, 0x0a, 0xb0, 0xaf,
+			0xb9, 0x19, 0x3b, 0xfa, 0xcd, 0xa4, 0x06, 0x81,
+			0x2a, 0x7a, 0xbf, 0x2c, 0x07, 0xde, 0xc1, 0xa4,
+			0x8c, 0x15, 0x85, 0x81, 0xa6, 0xd3, 0x73, 0x1c,
+			0x29, 0x0b, 0xee, 0x3c, 0x57, 0xfa, 0x82, 0xad,
+			0x6f, 0xe0, 0xa1, 0x54, 0x8d, 0xa4, 0x92, 0x29,
+			0xf4, 0xfa, 0x6d, 0x01, 0xe3, 0x6c, 0xb9, 0x76,
+			0x80, 0x53, 0xbb, 0x27, 0xb8, 0x18, 0x47, 0x6c,
+			0xae, 0xb5, 0x44, 0x60, 0x43, 0x9d, 0xa7, 0x3f
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.digest = {
+		.data = {
+			0x8B, 0x31, 0x9E, 0x86, 0x7F, 0xB1, 0x94, 0xE5,
+			0xA5, 0x53, 0x73, 0xC5, 0x59, 0xD5, 0x6D, 0x37
+		},
+		.len  = 16
+	},
+	.validAuthLenInBits = {
+		.len = 128 << 3
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_1 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E, 0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8, 0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7, 0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99, 0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3, 0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9, 0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D, 0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6, 0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50, 0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59, 0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF, 0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F, 0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0, 0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73, 0xA7, 0xE3, 0xC9, 0xD2,
+			0x08, 0x33, 0x73, 0x13, 0xEC, 0x56, 0x59, 0x11,
+			0xC9, 0x8A, 0x4B, 0x7A, 0xB1, 0xDD, 0x55, 0x9B
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 124 << 3
+	},
+	.digest = {
+		.data = {0xB1, 0xDD, 0x55, 0x9B},
+		.len  = 4,
+		.offset_bytes = 124
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_2 = {
+	.key = {
+		.data = {
+			0x6a, 0x7e, 0x4c, 0x7e, 0x51, 0x25, 0xb3, 0x48,
+			0x84, 0x53, 0x3a, 0x94, 0xfb, 0x31, 0x99, 0x90,
+			0x32, 0x57, 0x44, 0xee, 0x9b, 0xbc, 0xe9, 0xe5,
+			0x25, 0xcf, 0x08, 0xf5, 0xe9, 0xe2, 0x5e, 0x53
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x98, 0xcc, 0x89, 0x9f, 0xaf, 0x6d, 0x64, 0xb6,
+			0xb1, 0xe8, 0x21, 0x72, 0xee, 0xb6, 0xcc, 0xe3,
+			0xcf, 0x32, 0x28, 0x21, 0x21, 0x0d, 0x1e, 0x1c,
+			0x34
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0x60, 0xaa, 0xd2, 0xb2, 0xd0, 0x85, 0xfa, 0x54,
+			0xd8, 0x35, 0xe8, 0xd4, 0x66, 0x82, 0x64, 0x98,
+			0xd9, 0x2a, 0x08, 0x1d, 0x35, 0x19, 0x17, 0x01,
+			0x1A
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
+			0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
+			0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07, 0xE4, 0x67,
+			0xC4, 0xE5, 0x60, 0x00, 0xBA, 0x33, 0x8F, 0x5D,
+			0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
+			0x46, 0xC8, 0x0D, 0x3B, 0x38, 0xF0, 0x7F, 0x4B,
+			0xE2, 0xD8, 0xFF, 0x58, 0x05, 0xF5, 0x13, 0x22,
+			0x29, 0xBD, 0xE9, 0x3B, 0xBB, 0xDC, 0xAF, 0x38,
+			0x2B, 0xF1, 0xEE, 0x97, 0x2F, 0xBF, 0x99, 0x77,
+			0xBA, 0xDA, 0x89, 0x45, 0x84, 0x7A, 0x2A, 0x6C,
+			0x9A, 0xD3, 0x4A, 0x66, 0x75, 0x54, 0xE0, 0x4D,
+			0x1F, 0x7F, 0xA2, 0xC3, 0x32, 0x41, 0xBD, 0x8F,
+			0x01, 0xBA, 0x22, 0x0D
+		},
+		.len = 96 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0x52, 0x4E, 0x50, 0x7A, 0x90, 0x37, 0x65, 0x66,
+			0xD5, 0x46, 0x04, 0x68, 0x2A, 0x42, 0xD1, 0xE9,
+			0x73, 0x9F, 0xE9, 0x53, 0x8C, 0x0E, 0x72, 0x05,
+			0x05, 0xA9, 0xDB, 0x8C, 0x2A, 0x18, 0xFD, 0x73,
+			0xB9, 0x2C, 0x45, 0x48, 0xA4, 0x54, 0xF7, 0x62,
+			0xB9, 0x8B, 0x42, 0x62, 0x0B, 0xA8, 0xE7, 0x79,
+			0x67, 0x3C, 0x96, 0xB6, 0x4B, 0x23, 0x66, 0x13,
+			0xC9, 0x74, 0x71, 0x3E, 0x23, 0x0D, 0x4B, 0x08,
+			0x78, 0x36, 0x9E, 0xAC, 0x82, 0xDF, 0xDE, 0xE9,
+			0xF4, 0xD6, 0x62, 0x28, 0x44, 0x86, 0x6C, 0xEA,
+			0xD0, 0x59, 0x34, 0x83, 0x67, 0x28, 0xDE, 0xC8,
+			0x89, 0xFE, 0x21, 0x9B, 0x87, 0x88, 0x8D, 0xAB,
+			0x51, 0x05, 0x0F, 0x5C
+		},
+		.len = 100 << 3
+	},
+	.validDataLenInBits = {
+		.len = 100 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 100 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 96 << 3
+	},
+	.digest = {
+		.data = {0x51, 0x05, 0x0F, 0x5C},
+		.len  = 4,
+		.offset_bytes = 96
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_3 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E,	0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8,	0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7,	0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99,	0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3,	0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9,	0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D,	0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6,	0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50,	0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59,	0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF,	0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F,	0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0,	0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73,	0xA7, 0xE3, 0xC9, 0xD2,
+			0x08, 0x33, 0x73, 0x13,	0xEC, 0x56, 0x59, 0x11,
+			0x4C, 0x7C, 0x4D, 0xC7, 0x3E, 0x81, 0x35, 0x20
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 120 << 3
+	},
+	.digest = {
+		.data = {0x4C, 0x7C, 0x4D, 0xC7, 0x3E, 0x81, 0x35, 0x20},
+		.len  = 8,
+		.offset_bytes = 120
+	}
+};
+
+struct wireless_test_data zuc256_auth_cipher_test_case_4 = {
+	.key = {
+		.data = {
+			0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
+			0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
+			0xbe, 0x3c, 0xd2, 0x68, 0x80, 0x10, 0x1e, 0x71,
+			0xfd, 0xb2, 0xbb, 0xad, 0x25, 0x0f, 0x06, 0x08
+		},
+		.len = 32
+	},
+	.cipher_iv = {
+		.data = {
+			0x8e, 0x5d, 0xbc, 0x3f, 0xb9, 0xae, 0x66, 0xa3,
+			0xb9, 0x5c, 0x12, 0x14, 0xdb, 0xc5, 0xbc, 0x18,
+			0x48, 0x12, 0x09, 0x06, 0x25, 0x33, 0x2e, 0x12,
+			0x12
+		},
+		.len = 25
+	},
+	.auth_iv = {
+		.data = {
+			0xf5, 0x8d, 0x08, 0x26, 0x94, 0x14, 0xc7, 0x4d,
+			0xf5, 0x7c, 0x9c, 0xaa, 0x45, 0x53, 0xfd, 0x85,
+			0x23, 0x0b, 0x00, 0x0e, 0x26, 0x2b, 0x0f, 0x01,
+			0x26
+		},
+		.len = 25
+	},
+	.plaintext = {
+		.data = {
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+			0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+		},
+		.len = 128 << 3
+	},
+	.ciphertext = {
+		.data = {
+			0xF8, 0xBA, 0xBD, 0x3E, 0x52, 0xC7, 0xF9, 0x86,
+			0x5F, 0xA3, 0x84, 0xE8, 0x20, 0xE1, 0xBB, 0x80,
+			0xDB, 0x2D, 0x02, 0xA7, 0x35, 0x6A, 0x54, 0x98,
+			0x90, 0x32, 0xCE, 0x99, 0xE7, 0x66, 0x0E, 0x5D,
+			0x43, 0xBB, 0x4D, 0xF3, 0x4A, 0xB7, 0x9F, 0x3B,
+			0x44, 0xFF, 0x0D, 0xB9, 0xAE, 0xEA, 0xAB, 0x95,
+			0x5F, 0xA7, 0x39, 0x6D, 0xBC, 0x72, 0x59, 0x8B,
+			0x75, 0xD3, 0x7E, 0xC6, 0x90, 0x7B, 0xE7, 0x3C,
+			0x12, 0x38, 0xDD, 0x50, 0xD6, 0x74, 0x91, 0x02,
+			0x66, 0x3D, 0xBA, 0x59, 0x1B, 0x93, 0xED, 0x87,
+			0xAB, 0xD7, 0x2E, 0xEF, 0xFF, 0x80, 0x98, 0x7E,
+			0x0F, 0x2A, 0x4E, 0x5F, 0xEB, 0x3A, 0x0E, 0xCC,
+			0xBF, 0xDA, 0x67, 0xA0, 0x54, 0xC6, 0x56, 0x29,
+			0x5D, 0x3C, 0x1A, 0x73, 0xA7, 0xE3, 0xC9, 0xD2,
+			0x96, 0x2B, 0x25, 0x9F, 0xDD, 0x6E, 0x72, 0xE3,
+			0x86, 0x01, 0xA5, 0x56, 0x66, 0x90, 0xAE, 0xC2
+		},
+		.len = 128 << 3
+	},
+	.validDataLenInBits = {
+		.len = 128 << 3
+	},
+	.validCipherLenInBits = {
+		.len = 128 << 3
+	},
+	.validAuthLenInBits = {
+		.len = 112 << 3
+	},
+	.digest = {
+		.data = {
+			0x96, 0x2B, 0x25, 0x9F, 0xDD, 0x6E, 0x72, 0xE3,
+			0x86, 0x01, 0xA5, 0x56, 0x66, 0x90, 0xAE, 0xC2
+		},
+		.len  = 16,
+		.offset_bytes = 112
+	}
+};
+
 #endif /* TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
                     ` (4 preceding siblings ...)
  2023-03-03  9:38   ` [PATCH v2 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
@ 2023-03-03 16:37   ` Tejasree Kondoj
  2023-03-06  9:32   ` De Lara Guarch, Pablo
  6 siblings, 0 replies; 17+ messages in thread
From: Tejasree Kondoj @ 2023-03-03 16:37 UTC (permalink / raw)
  To: Ciara Power; +Cc: dev, kai.ji, pablo.de.lara.guarch

Acked-by: Tejasree Kondoj <ktejasree@marvell.com>

> -----Original Message-----
> From: Ciara Power <ciara.power@intel.com>
> Sent: Friday, March 3, 2023 3:08 PM
> Cc: dev@dpdk.org; kai.ji@intel.com; pablo.de.lara.guarch@intel.com; Ciara
> Power <ciara.power@intel.com>
> Subject: [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
> 
> External Email
> 
> ----------------------------------------------------------------------
> This patchset adds chained testcases for each ZUC256 digest size:
>  - cipher-auth
>  - auth-cipher
>  - auth-cipher-verify
> 
>  To add these tests, some improvements were made to the existing code,
> allowing for the user to easily differentiate ZUC256 and ZUC128 tests.
> 
>  Some fixes are also included, that were highlighted when these new tests
> were added.
> 
>  v2: changed bit lengths to byte length representation.
> 
> Ciara Power (5):
>   test/crypto: improve readability of ZUC256 tests
>   test/crypto: fix ZUC digest length in comparison
>   test/crypto: fix auth op parameter for ZUC256 tests
>   test/crypto: fix capability check for ZUC cipher auth
>   test/crypto: add chained ZUC256 testcases
> 
>  app/test/test_cryptodev.c                  | 280 +++++---
>  app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
>  2 files changed, 913 insertions(+), 81 deletions(-)
> 
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
  2023-03-03  9:38 ` [PATCH v2 " Ciara Power
                     ` (5 preceding siblings ...)
  2023-03-03 16:37   ` [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests Tejasree Kondoj
@ 2023-03-06  9:32   ` De Lara Guarch, Pablo
  2023-03-14 10:27     ` Akhil Goyal
  6 siblings, 1 reply; 17+ messages in thread
From: De Lara Guarch, Pablo @ 2023-03-06  9:32 UTC (permalink / raw)
  To: Power, Ciara; +Cc: dev, Ji, Kai



> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Friday, March 3, 2023 10:38 AM
> Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
> 
> This patchset adds chained testcases for each ZUC256 digest size:
>  - cipher-auth
>  - auth-cipher
>  - auth-cipher-verify
> 
>  To add these tests, some improvements were made to the existing code,
> allowing for the user to easily differentiate ZUC256 and ZUC128 tests.
> 
>  Some fixes are also included, that were highlighted when these new tests
> were added.
> 
>  v2: changed bit lengths to byte length representation.
> 
> Ciara Power (5):
>   test/crypto: improve readability of ZUC256 tests
>   test/crypto: fix ZUC digest length in comparison
>   test/crypto: fix auth op parameter for ZUC256 tests
>   test/crypto: fix capability check for ZUC cipher auth
>   test/crypto: add chained ZUC256 testcases
> 
>  app/test/test_cryptodev.c                  | 280 +++++---
>  app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
>  2 files changed, 913 insertions(+), 81 deletions(-)
> 
> --
> 2.25.1

Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
  2023-03-06  9:32   ` De Lara Guarch, Pablo
@ 2023-03-14 10:27     ` Akhil Goyal
  0 siblings, 0 replies; 17+ messages in thread
From: Akhil Goyal @ 2023-03-14 10:27 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Power, Ciara; +Cc: dev, Ji, Kai

> > Subject: [PATCH v2 0/5] test/crypto: add ZUC256 chained tests
> >
> > This patchset adds chained testcases for each ZUC256 digest size:
> >  - cipher-auth
> >  - auth-cipher
> >  - auth-cipher-verify
> >
> >  To add these tests, some improvements were made to the existing code,
> > allowing for the user to easily differentiate ZUC256 and ZUC128 tests.
> >
> >  Some fixes are also included, that were highlighted when these new tests
> > were added.
> >
> >  v2: changed bit lengths to byte length representation.
> >
> > Ciara Power (5):
> >   test/crypto: improve readability of ZUC256 tests
> >   test/crypto: fix ZUC digest length in comparison
> >   test/crypto: fix auth op parameter for ZUC256 tests
> >   test/crypto: fix capability check for ZUC cipher auth
> >   test/crypto: add chained ZUC256 testcases
> >
> >  app/test/test_cryptodev.c                  | 280 +++++---
> >  app/test/test_cryptodev_zuc_test_vectors.h | 714 +++++++++++++++++++++
> >  2 files changed, 913 insertions(+), 81 deletions(-)
> >
> > --
> > 2.25.1
> 
> Series-acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-03-14 10:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 16:39 [PATCH 0/5] test/crypto: add ZUC256 chained tests Ciara Power
2023-03-01 16:39 ` [PATCH 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
2023-03-01 16:39 ` [PATCH 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
2023-03-01 16:39 ` [PATCH 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
2023-03-01 16:39 ` [PATCH 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
2023-03-01 16:39 ` [PATCH 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
2023-03-02  9:56   ` De Lara Guarch, Pablo
2023-03-02 10:07 ` [PATCH 0/5] test/crypto: add ZUC256 chained tests Dooley, Brian
2023-03-03  9:38 ` [PATCH v2 " Ciara Power
2023-03-03  9:38   ` [PATCH v2 1/5] test/crypto: improve readability of ZUC256 tests Ciara Power
2023-03-03  9:38   ` [PATCH v2 2/5] test/crypto: fix ZUC digest length in comparison Ciara Power
2023-03-03  9:38   ` [PATCH v2 3/5] test/crypto: fix auth op parameter for ZUC256 tests Ciara Power
2023-03-03  9:38   ` [PATCH v2 4/5] test/crypto: fix capability check for ZUC cipher auth Ciara Power
2023-03-03  9:38   ` [PATCH v2 5/5] test/crypto: add chained ZUC256 testcases Ciara Power
2023-03-03 16:37   ` [EXT] [PATCH v2 0/5] test/crypto: add ZUC256 chained tests Tejasree Kondoj
2023-03-06  9:32   ` De Lara Guarch, Pablo
2023-03-14 10:27     ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).