* [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms
@ 2026-01-07 10:56 Radu Nicolau
2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau
` (7 more replies)
0 siblings, 8 replies; 27+ messages in thread
From: Radu Nicolau @ 2026-01-07 10:56 UTC (permalink / raw)
To: dev; +Cc: nkaithakadan, kai.ji, anoobj, Radu Nicolau, Akhil Goyal,
Fan Zhang
Add support for
NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes
NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes
NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
doc/guides/cryptodevs/features/default.ini | 9 ++++++++
lib/cryptodev/rte_crypto_sym.h | 24 +++++++++++++++++++++-
lib/cryptodev/rte_cryptodev.c | 13 +++++++++++-
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 64198f013a..d8026c3750 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -68,6 +68,9 @@ SM4 CTR =
SM4 CFB =
SM4 OFB =
SM4 XTS =
+SNOW5G NEA4 =
+AES NEA5 =
+ZUC-256 NEA6 =
;
; Supported authentication algorithms of a default crypto driver.
@@ -106,6 +109,9 @@ SM3 =
SM3 HMAC =
SHAKE_128 =
SHAKE_256 =
+SNOW5G NIA4 =
+AES NIA5 =
+ZUC-256 NIA6 =
;
; Supported AEAD algorithms of a default crypto driver.
@@ -119,6 +125,9 @@ AES CCM (192) =
AES CCM (256) =
CHACHA20-POLY1305 =
SM4 GCM =
+SNOW5G NCA4 =
+AES NCA5 =
+ZUC-256 NCA6 =
;
; Supported Asymmetric algorithms of a default crypto driver.
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 6268bab327..f7b29ccf9a 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm {
/**< ShangMi 4 (SM4) algorithm in OFB mode */
RTE_CRYPTO_CIPHER_SM4_CFB,
/**< ShangMi 4 (SM4) algorithm in CFB mode */
- RTE_CRYPTO_CIPHER_SM4_XTS
+ RTE_CRYPTO_CIPHER_SM4_XTS,
/**< ShangMi 4 (SM4) algorithm in XTS mode */
+
+ RTE_CRYPTO_CIPHER_SNOW5G_NEA4,
+ /**< Snow 5G algorithm in NEA4 mode */
+ RTE_CRYPTO_CIPHER_AES_NEA5,
+ /**< AES algorithm in NEA4 mode */
+ RTE_CRYPTO_CIPHER_ZUC_NEA6,
+ /**< ZUC-256 algorithm in NEA4 mode */
};
/** Symmetric Cipher Direction */
@@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm {
/**< 256 bit SHAKE algorithm. */
RTE_CRYPTO_AUTH_SM3_HMAC,
/** < HMAC using ShangMi 3 (SM3) algorithm */
+
+ RTE_CRYPTO_AUTH_SNOW5G_NIA4,
+ /**< Snow 5G algorithm in NIA4 mode */
+ RTE_CRYPTO_AUTH_AES_NIA5,
+ /**< AES algorithm in NIA4 mode */
+ RTE_CRYPTO_AUTH_ZUC_NIA6,
+ /**< ZUC-256 algorithm in NIA4 mode */
+
};
/** Symmetric Authentication / Hash Operations */
@@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm {
/**< Chacha20 cipher with poly1305 authenticator */
RTE_CRYPTO_AEAD_SM4_GCM,
/**< SM4 cipher in GCM mode */
+
+ RTE_CRYPTO_AEAD_SNOW5G_NCA4,
+ /**< Snow 5G algorithm in NCA4 mode */
+ RTE_CRYPTO_AEAD_AES_NCA5,
+ /**< AES algorithm in NCA4 mode */
+ RTE_CRYPTO_AEAD_ZUC_NCA6,
+ /**< ZUC-256 algorithm in NCA4 mode */
};
/** Symmetric AEAD Operations */
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index f4c6f692f0..7bddb154c2 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = {
[RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr",
[RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb",
[RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb",
- [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts"
+ [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts",
+ [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4",
+ [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5",
+ [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6",
};
/**
@@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = {
[RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128",
[RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256",
+
+ [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4",
+ [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5",
+ [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6",
};
/**
@@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = {
[RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
[RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305",
[RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm",
+
+ [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4",
+ [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5",
+ [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6",
};
--
2.50.1
^ permalink raw reply related [flat|nested] 27+ messages in thread* [PATCH 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau @ 2026-01-07 10:56 ` Radu Nicolau 2026-01-19 8:12 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-01-19 11:28 ` [PATCH v2 1/2] cryptodev: add support " Radu Nicolau ` (6 subsequent siblings) 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-07 10:56 UTC (permalink / raw) To: dev; +Cc: nkaithakadan, kai.ji, anoobj, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- app/test/test_cryptodev.c | 1107 +++++++++++ app/test/test_cryptodev_nxan_test_vectors.h | 1962 +++++++++++++++++++ 2 files changed, 3069 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..28045ad424 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,1103 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval < 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval < 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(struct nxa_256_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval < 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size >> 3, + 0); + if (retval < 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + +static int +test_NEA4_case_1_encrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_1_decrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_2_encrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_2_decrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_3_encrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_3_decrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA5_case_1_encrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_1_decrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_2_encrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_2_decrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_3_encrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_3_decrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_4_encrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_4_decrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_5_encrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_5_decrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA6_case_1_encrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_1_decrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_2_encrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_2_decrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_3_encrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_3_decrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_4_encrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_4_decrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_5_encrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_5_decrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_6_encrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_6_decrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_7_encrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_7_decrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NIA4_case_1(void) +{ + return test_NIA_helper(&nia4_test_1); +} +static int +test_NIA4_case_2(void) +{ + return test_NIA_helper(&nia4_test_2); +} +static int +test_NIA4_case_3(void) +{ + return test_NIA_helper(&nia4_test_3); +} +static int +test_NIA4_case_4(void) +{ + return test_NIA_helper(&nia4_test_4); +} +static int +test_NIA4_case_5(void) +{ + return test_NIA_helper(&nia4_test_5); +} +static int +test_NIA4_case_6(void) +{ + return test_NIA_helper(&nia4_test_6); +} +static int +test_NIA4_case_7(void) +{ + return test_NIA_helper(&nia4_test_7); +} + +static int +test_NIA5_case_1(void) +{ + return test_NIA_helper(&nia5_test_1); +} +static int +test_NIA5_case_2(void) +{ + return test_NIA_helper(&nia5_test_2); +} +static int +test_NIA5_case_3(void) +{ + return test_NIA_helper(&nia5_test_3); +} +static int +test_NIA5_case_4(void) +{ + return test_NIA_helper(&nia5_test_4); +} +static int +test_NIA5_case_5(void) +{ + return test_NIA_helper(&nia5_test_5); +} +static int +test_NIA5_case_6(void) +{ + return test_NIA_helper(&nia5_test_6); +} +static int +test_NIA5_case_7(void) +{ + return test_NIA_helper(&nia5_test_7); +} + +static int +test_NIA6_case_1(void) +{ + return test_NIA_helper(&nia6_test_1); +} +static int +test_NIA6_case_2(void) +{ + return test_NIA_helper(&nia6_test_2); +} +static int +test_NIA6_case_3(void) +{ + return test_NIA_helper(&nia6_test_3); +} +static int +test_NIA6_case_4(void) +{ + return test_NIA_helper(&nia6_test_4); +} +static int +test_NIA6_case_5(void) +{ + return test_NIA_helper(&nia6_test_5); +} +static int +test_NIA6_case_6(void) +{ + return test_NIA_helper(&nia6_test_6); +} +static int +test_NIA6_case_7(void) +{ + return test_NIA_helper(&nia6_test_7); +} + +static int +test_NCA4_case_1_encrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_1_decrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_2_encrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_2_decrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_3_encrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_3_decrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_4_encrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_4_decrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_5_encrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_5_decrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_6_encrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_6_decrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_7_encrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_7_decrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_8_encrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_8_decrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_9_encrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_9_decrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_10_encrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_10_decrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + + +static int +test_NCA5_case_1_encrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_1_decrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_2_encrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_2_decrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_3_encrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_3_decrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_4_encrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_4_decrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_5_encrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_5_decrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_6_encrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_6_decrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_7_encrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_7_decrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_8_encrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_8_decrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_9_encrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_9_decrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_10_encrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_10_decrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NCA6_case_1_encrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_1_decrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_2_encrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_2_decrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_3_encrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_3_decrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_4_encrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_4_decrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_5_encrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_5_decrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_6_encrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_6_decrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_7_encrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_7_decrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_8_encrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_8_decrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_9_encrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_9_decrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_10_encrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_10_decrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_decrypt), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..95c5e9b27f --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,1962 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + + +struct nxa_256_test_data nea6_test_9 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-19 8:12 ` Nithinsen Kaithakadan 0 siblings, 0 replies; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-01-19 8:12 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, Akhil Goyal, Fan Zhang Hi Radu, Please see my comments inline. Regards, Nithin Sen > +static int > +test_NEA_helper( > + struct nxa_256_test_data *tdata, > + enum rte_crypto_cipher_operation op) > +{ > + struct crypto_testsuite_params *ts_params = &testsuite_params; > + struct crypto_unittest_params *ut_params = &unittest_params; > + > + int retval; > + uint8_t *input, *output; > + uint32_t pad_len; > + uint32_t len; > + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); > + > + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) > + return TEST_SKIPPED; > + > + /* Create session */ > + retval = create_wireless_algo_cipher_session(ts_params- > >valid_devs[0], > + RTE_CRYPTO_CIPHER_OP_ENCRYPT, > + tdata->cipher_algo, tdata->key, 32, > 16); > + if (retval < 0) [Nithinsen] Could this be retval != 0, since the TEST_SKIPPED macro value is positive ? > + return retval; > + > + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); > + > +static int > +test_NIA_helper(struct nxa_256_test_data *tdata) > +{ > + struct crypto_testsuite_params *ts_params = &testsuite_params; > + struct crypto_unittest_params *ut_params = &unittest_params; > + > + int retval; > + uint32_t plaintext_pad_len; > + uint32_t plaintext_len; > + uint8_t *plaintext; > + > + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) > + return TEST_SKIPPED; > + > + /* Create auth session */ > + retval = create_wireless_algo_hash_session(ts_params- > >valid_devs[0], > + tdata->key, 32, > + 16, tdata->tag_size >> 3, > + RTE_CRYPTO_AUTH_OP_VERIFY, > + tdata->auth_algo); > + if (retval < 0) [Nithinsen] Could this be retval != 0, since the TEST_SKIPPED macro value is positive ? > + return retval; > + /* alloc mbuf and set payload */ > + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); > + > + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, > + rte_pktmbuf_tailroom(ut_params->ibuf)); > + > + plaintext_len = ceil_byte_length(tdata->msg_size); > + /* Append data which is padded to a multiple */ > + /* of the algorithms block size */ > + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); > + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, > + plaintext_pad_len); > + memcpy(plaintext, tdata->plaintext, plaintext_len); > + > + /* Create auth operation */ > + retval = create_wireless_algo_hash_operation(tdata->tag, > + tdata->tag_size >> 3, > + tdata->iv, 16, > + plaintext_pad_len, > + RTE_CRYPTO_AUTH_OP_VERIFY, > + tdata->msg_size >> 3, [Nithinsen] Isn't this api expecting length in bits ? As in other pdcp cases. > + 0); > + if (retval < 0) > + return retval; > + > + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { > + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], > 0, ut_params->op, 0, 1, 1, > + 0); > + if (retval != TEST_SUCCESS) > + return retval; > + } else > + ut_params->op = process_crypto_request(ts_params- > >valid_devs[0], > + ut_params->op); > + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); > + ut_params->obuf = ut_params->op->sym->m_src; > + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, > + uint8_t *, > + plaintext_pad_len); > + > + /* Validate obuf */ > + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) > + return 0; > + else > + return -1; > + > + return 0; > +} > + ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau 2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-19 11:28 ` Radu Nicolau 2026-01-19 11:28 ` [PATCH v2 2/2] test/crypto: add tests " Radu Nicolau 2026-01-21 10:18 ` [PATCH v3 1/2] cryptodev: add support " Radu Nicolau ` (5 subsequent siblings) 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-19 11:28 UTC (permalink / raw) To: dev; +Cc: nkaithakadan, kai.ji, anoobj, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v2: specify bit length algorithms doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..b8e3b22842 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA4 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA4 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA4 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-19 11:28 ` [PATCH v2 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-19 11:28 ` Radu Nicolau 2026-01-19 17:05 ` Stephen Hemminger 0 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-19 11:28 UTC (permalink / raw) To: dev; +Cc: nkaithakadan, kai.ji, anoobj, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v2: updated after review app/test/test_cryptodev.c | 1107 +++++++++++ app/test/test_cryptodev_nxan_test_vectors.h | 1962 +++++++++++++++++++ 2 files changed, 3069 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..bd7f60c201 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,1103 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval < 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(struct nxa_256_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval < 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + +static int +test_NEA4_case_1_encrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_1_decrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_2_encrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_2_decrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_3_encrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_3_decrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA5_case_1_encrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_1_decrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_2_encrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_2_decrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_3_encrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_3_decrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_4_encrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_4_decrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_5_encrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_5_decrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA6_case_1_encrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_1_decrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_2_encrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_2_decrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_3_encrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_3_decrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_4_encrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_4_decrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_5_encrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_5_decrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_6_encrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_6_decrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_7_encrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_7_decrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NIA4_case_1(void) +{ + return test_NIA_helper(&nia4_test_1); +} +static int +test_NIA4_case_2(void) +{ + return test_NIA_helper(&nia4_test_2); +} +static int +test_NIA4_case_3(void) +{ + return test_NIA_helper(&nia4_test_3); +} +static int +test_NIA4_case_4(void) +{ + return test_NIA_helper(&nia4_test_4); +} +static int +test_NIA4_case_5(void) +{ + return test_NIA_helper(&nia4_test_5); +} +static int +test_NIA4_case_6(void) +{ + return test_NIA_helper(&nia4_test_6); +} +static int +test_NIA4_case_7(void) +{ + return test_NIA_helper(&nia4_test_7); +} + +static int +test_NIA5_case_1(void) +{ + return test_NIA_helper(&nia5_test_1); +} +static int +test_NIA5_case_2(void) +{ + return test_NIA_helper(&nia5_test_2); +} +static int +test_NIA5_case_3(void) +{ + return test_NIA_helper(&nia5_test_3); +} +static int +test_NIA5_case_4(void) +{ + return test_NIA_helper(&nia5_test_4); +} +static int +test_NIA5_case_5(void) +{ + return test_NIA_helper(&nia5_test_5); +} +static int +test_NIA5_case_6(void) +{ + return test_NIA_helper(&nia5_test_6); +} +static int +test_NIA5_case_7(void) +{ + return test_NIA_helper(&nia5_test_7); +} + +static int +test_NIA6_case_1(void) +{ + return test_NIA_helper(&nia6_test_1); +} +static int +test_NIA6_case_2(void) +{ + return test_NIA_helper(&nia6_test_2); +} +static int +test_NIA6_case_3(void) +{ + return test_NIA_helper(&nia6_test_3); +} +static int +test_NIA6_case_4(void) +{ + return test_NIA_helper(&nia6_test_4); +} +static int +test_NIA6_case_5(void) +{ + return test_NIA_helper(&nia6_test_5); +} +static int +test_NIA6_case_6(void) +{ + return test_NIA_helper(&nia6_test_6); +} +static int +test_NIA6_case_7(void) +{ + return test_NIA_helper(&nia6_test_7); +} + +static int +test_NCA4_case_1_encrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_1_decrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_2_encrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_2_decrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_3_encrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_3_decrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_4_encrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_4_decrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_5_encrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_5_decrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_6_encrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_6_decrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_7_encrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_7_decrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_8_encrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_8_decrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_9_encrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_9_decrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_10_encrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_10_decrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + + +static int +test_NCA5_case_1_encrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_1_decrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_2_encrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_2_decrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_3_encrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_3_decrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_4_encrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_4_decrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_5_encrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_5_decrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_6_encrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_6_decrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_7_encrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_7_decrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_8_encrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_8_decrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_9_encrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_9_decrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_10_encrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_10_decrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NCA6_case_1_encrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_1_decrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_2_encrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_2_decrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_3_encrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_3_decrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_4_encrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_4_decrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_5_encrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_5_decrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_6_encrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_6_decrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_7_encrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_7_decrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_8_encrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_8_decrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_9_encrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_9_decrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_10_encrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_10_decrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_decrypt), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..95c5e9b27f --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,1962 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + + +struct nxa_256_test_data nea6_test_9 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH v2 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-19 11:28 ` [PATCH v2 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-19 17:05 ` Stephen Hemminger 0 siblings, 0 replies; 27+ messages in thread From: Stephen Hemminger @ 2026-01-19 17:05 UTC (permalink / raw) To: Radu Nicolau; +Cc: dev, nkaithakadan, kai.ji, anoobj, Akhil Goyal, Fan Zhang On Mon, 19 Jan 2026 11:28:56 +0000 Radu Nicolau <radu.nicolau@intel.com> wrote: > +struct nxa_256_test_data nea4_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, Could all these test vectors be declared static and const to avoid any possibility of link mixups and corruption by crypto. ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v3 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau 2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau 2026-01-19 11:28 ` [PATCH v2 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-21 10:18 ` Radu Nicolau 2026-01-21 10:18 ` [PATCH v3 2/2] test/crypto: add tests " Radu Nicolau 2026-01-21 15:15 ` [PATCH v4 1/2] cryptodev: add support " Radu Nicolau ` (4 subsequent siblings) 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-21 10:18 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..b8e3b22842 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA4 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA4 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA4 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v3 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-21 10:18 ` [PATCH v3 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-21 10:18 ` Radu Nicolau 0 siblings, 0 replies; 27+ messages in thread From: Radu Nicolau @ 2026-01-21 10:18 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v3: declare test vectorts as static const app/test/test_cryptodev.c | 1107 ++++++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2029 +++++++++++++++++++ 2 files changed, 3136 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..d8253cff90 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,1103 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval < 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const struct nxa_256_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval < 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + +static int +test_NEA4_case_1_encrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_1_decrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_2_encrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_2_decrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_3_encrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_3_decrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA5_case_1_encrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_1_decrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_2_encrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_2_decrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_3_encrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_3_decrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_4_encrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_4_decrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_5_encrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_5_decrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA6_case_1_encrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_1_decrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_2_encrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_2_decrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_3_encrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_3_decrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_4_encrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_4_decrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_5_encrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_5_decrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_6_encrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_6_decrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_7_encrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_7_decrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NIA4_case_1(void) +{ + return test_NIA_helper(&nia4_test_1); +} +static int +test_NIA4_case_2(void) +{ + return test_NIA_helper(&nia4_test_2); +} +static int +test_NIA4_case_3(void) +{ + return test_NIA_helper(&nia4_test_3); +} +static int +test_NIA4_case_4(void) +{ + return test_NIA_helper(&nia4_test_4); +} +static int +test_NIA4_case_5(void) +{ + return test_NIA_helper(&nia4_test_5); +} +static int +test_NIA4_case_6(void) +{ + return test_NIA_helper(&nia4_test_6); +} +static int +test_NIA4_case_7(void) +{ + return test_NIA_helper(&nia4_test_7); +} + +static int +test_NIA5_case_1(void) +{ + return test_NIA_helper(&nia5_test_1); +} +static int +test_NIA5_case_2(void) +{ + return test_NIA_helper(&nia5_test_2); +} +static int +test_NIA5_case_3(void) +{ + return test_NIA_helper(&nia5_test_3); +} +static int +test_NIA5_case_4(void) +{ + return test_NIA_helper(&nia5_test_4); +} +static int +test_NIA5_case_5(void) +{ + return test_NIA_helper(&nia5_test_5); +} +static int +test_NIA5_case_6(void) +{ + return test_NIA_helper(&nia5_test_6); +} +static int +test_NIA5_case_7(void) +{ + return test_NIA_helper(&nia5_test_7); +} + +static int +test_NIA6_case_1(void) +{ + return test_NIA_helper(&nia6_test_1); +} +static int +test_NIA6_case_2(void) +{ + return test_NIA_helper(&nia6_test_2); +} +static int +test_NIA6_case_3(void) +{ + return test_NIA_helper(&nia6_test_3); +} +static int +test_NIA6_case_4(void) +{ + return test_NIA_helper(&nia6_test_4); +} +static int +test_NIA6_case_5(void) +{ + return test_NIA_helper(&nia6_test_5); +} +static int +test_NIA6_case_6(void) +{ + return test_NIA_helper(&nia6_test_6); +} +static int +test_NIA6_case_7(void) +{ + return test_NIA_helper(&nia6_test_7); +} + +static int +test_NCA4_case_1_encrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_1_decrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_2_encrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_2_decrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_3_encrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_3_decrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_4_encrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_4_decrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_5_encrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_5_decrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_6_encrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_6_decrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_7_encrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_7_decrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_8_encrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_8_decrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_9_encrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_9_decrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_10_encrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_10_decrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + + +static int +test_NCA5_case_1_encrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_1_decrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_2_encrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_2_decrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_3_encrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_3_decrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_4_encrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_4_decrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_5_encrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_5_decrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_6_encrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_6_decrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_7_encrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_7_decrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_8_encrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_8_decrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_9_encrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_9_decrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_10_encrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_10_decrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NCA6_case_1_encrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_1_decrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_2_encrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_2_decrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_3_encrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_3_decrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_4_encrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_4_decrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_5_encrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_5_decrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_6_encrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_6_decrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_7_encrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_7_decrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_8_encrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_8_decrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_9_encrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_9_decrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_10_encrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_10_decrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_decrypt), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..237cfde28a --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2029 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + + +static const +struct nxa_256_test_data nea6_test_9 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v4 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau ` (2 preceding siblings ...) 2026-01-21 10:18 ` [PATCH v3 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-21 15:15 ` Radu Nicolau 2026-01-21 15:15 ` [PATCH v4 2/2] test/crypto: add tests " Radu Nicolau 2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau ` (3 subsequent siblings) 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-21 15:15 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v4: fix wrong algorithm names in comments doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..630fd153bd 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA5 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA6 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA5 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA6 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA5 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA6 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v4 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-21 15:15 ` [PATCH v4 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-21 15:15 ` Radu Nicolau 2026-01-22 7:02 ` [EXTERNAL] " Nithinsen Kaithakadan 0 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-21 15:15 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v4: declare test vectors as static const app/test/test_cryptodev.c | 1107 ++++++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2029 +++++++++++++++++++ 2 files changed, 3136 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..d8253cff90 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,1103 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval < 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const struct nxa_256_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval < 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + +static int +test_NEA4_case_1_encrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_1_decrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_2_encrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_2_decrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_3_encrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_3_decrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA5_case_1_encrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_1_decrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_2_encrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_2_decrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_3_encrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_3_decrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_4_encrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_4_decrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_5_encrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_5_decrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA6_case_1_encrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_1_decrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_2_encrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_2_decrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_3_encrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_3_decrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_4_encrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_4_decrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_5_encrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_5_decrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_6_encrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_6_decrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_7_encrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_7_decrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NIA4_case_1(void) +{ + return test_NIA_helper(&nia4_test_1); +} +static int +test_NIA4_case_2(void) +{ + return test_NIA_helper(&nia4_test_2); +} +static int +test_NIA4_case_3(void) +{ + return test_NIA_helper(&nia4_test_3); +} +static int +test_NIA4_case_4(void) +{ + return test_NIA_helper(&nia4_test_4); +} +static int +test_NIA4_case_5(void) +{ + return test_NIA_helper(&nia4_test_5); +} +static int +test_NIA4_case_6(void) +{ + return test_NIA_helper(&nia4_test_6); +} +static int +test_NIA4_case_7(void) +{ + return test_NIA_helper(&nia4_test_7); +} + +static int +test_NIA5_case_1(void) +{ + return test_NIA_helper(&nia5_test_1); +} +static int +test_NIA5_case_2(void) +{ + return test_NIA_helper(&nia5_test_2); +} +static int +test_NIA5_case_3(void) +{ + return test_NIA_helper(&nia5_test_3); +} +static int +test_NIA5_case_4(void) +{ + return test_NIA_helper(&nia5_test_4); +} +static int +test_NIA5_case_5(void) +{ + return test_NIA_helper(&nia5_test_5); +} +static int +test_NIA5_case_6(void) +{ + return test_NIA_helper(&nia5_test_6); +} +static int +test_NIA5_case_7(void) +{ + return test_NIA_helper(&nia5_test_7); +} + +static int +test_NIA6_case_1(void) +{ + return test_NIA_helper(&nia6_test_1); +} +static int +test_NIA6_case_2(void) +{ + return test_NIA_helper(&nia6_test_2); +} +static int +test_NIA6_case_3(void) +{ + return test_NIA_helper(&nia6_test_3); +} +static int +test_NIA6_case_4(void) +{ + return test_NIA_helper(&nia6_test_4); +} +static int +test_NIA6_case_5(void) +{ + return test_NIA_helper(&nia6_test_5); +} +static int +test_NIA6_case_6(void) +{ + return test_NIA_helper(&nia6_test_6); +} +static int +test_NIA6_case_7(void) +{ + return test_NIA_helper(&nia6_test_7); +} + +static int +test_NCA4_case_1_encrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_1_decrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_2_encrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_2_decrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_3_encrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_3_decrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_4_encrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_4_decrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_5_encrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_5_decrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_6_encrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_6_decrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_7_encrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_7_decrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_8_encrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_8_decrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_9_encrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_9_decrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_10_encrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_10_decrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + + +static int +test_NCA5_case_1_encrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_1_decrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_2_encrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_2_decrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_3_encrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_3_decrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_4_encrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_4_decrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_5_encrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_5_decrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_6_encrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_6_decrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_7_encrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_7_decrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_8_encrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_8_decrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_9_encrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_9_decrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_10_encrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_10_decrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NCA6_case_1_encrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_1_decrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_2_encrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_2_decrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_3_encrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_3_decrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_4_encrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_4_decrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_5_encrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_5_decrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_6_encrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_6_decrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_7_encrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_7_decrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_8_encrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_8_decrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_9_encrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_9_decrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_10_encrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_10_decrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_decrypt), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..237cfde28a --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2029 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + + +static const +struct nxa_256_test_data nea6_test_9 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v4 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-21 15:15 ` [PATCH v4 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-22 7:02 ` Nithinsen Kaithakadan 0 siblings, 0 replies; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-01-22 7:02 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Hi Rado, Please find my comments inline. Regards, Nithin Sen > +static int > +test_NIA_helper(const struct nxa_256_test_data *tdata) > +{ > + struct crypto_testsuite_params *ts_params = &testsuite_params; > + struct crypto_unittest_params *ut_params = &unittest_params; > + > + int retval; > + uint32_t plaintext_pad_len; > + uint32_t plaintext_len; > + uint8_t *plaintext; > + > + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) > + return TEST_SKIPPED; > + > + /* Create auth session */ > + retval = create_wireless_algo_hash_session(ts_params- > >valid_devs[0], > + tdata->key, 32, > + 16, tdata->tag_size >> 3, > + RTE_CRYPTO_AUTH_OP_VERIFY, > + tdata->auth_algo); > + if (retval < 0) [Nithinsen] It looks like this comment might be missing. Could this be retval != 0, since the TEST_SKIPPED macro value is positive ? > + return retval; > + /* alloc mbuf and set payload */ > + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); > + > + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, > + rte_pktmbuf_tailroom(ut_params->ibuf)); > + > + plaintext_len = ceil_byte_length(tdata->msg_size); > + /* Append data which is padded to a multiple */ > + /* of the algorithms block size */ > + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); > + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, > + plaintext_pad_len); > + memcpy(plaintext, tdata->plaintext, plaintext_len); > + > + /* Create auth operation */ > + retval = create_wireless_algo_hash_operation(tdata->tag, > + tdata->tag_size >> 3, > + tdata->iv, 16, > + plaintext_pad_len, > + RTE_CRYPTO_AUTH_OP_VERIFY, > + tdata->msg_size, > + 0); > + if (retval) > + return retval; > + > + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { > + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], > 0, ut_params->op, 0, 1, 1, > + 0); > + if (retval != TEST_SUCCESS) > + return retval; > + } else > + ut_params->op = process_crypto_request(ts_params- > >valid_devs[0], > + ut_params->op); > + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); > + ut_params->obuf = ut_params->op->sym->m_src; > + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, > + uint8_t *, > + plaintext_pad_len); > + > + /* Validate obuf */ > + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) > + return 0; > + else > + return -1; > + > + return 0; > +} > + > +static int > +test_NCA_helper( > + const struct nxa_256_test_data *tdata, > + enum rte_crypto_cipher_operation op) > +{ > + struct aead_test_data aead_tdata = { > + .algo = tdata->aead_algo, > + .key = { > + .len = 32, > + }, > + .iv = { > + .len = 16, > + }, > + .aad = { > + .data = (uint8_t *)(uintptr_t)tdata->aad, > + .len = tdata->aad_size >> 3, > + }, > + .plaintext = { > + .len = tdata->msg_size >> 3, > + }, > + .ciphertext = { > + .len = tdata->msg_size >> 3, > + }, > + .auth_tag = { > + .len = tdata->tag_size >> 3, > + }, > + }; > + > + memcpy(aead_tdata.key.data, tdata->key, 32); > + memcpy(aead_tdata.iv.data, tdata->iv, 16); > + memcpy(aead_tdata.plaintext.data, tdata->plaintext, > + tdata->msg_size >> 3); > + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, > + tdata->msg_size >> 3); > + memcpy(aead_tdata.auth_tag.data, tdata->tag, > + tdata->tag_size >> 3); > + > + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) > + return test_authenticated_encryption_helper(&aead_tdata, > false); > + else > + return test_authenticated_decryption_helper(&aead_tdata, > false); > +} > + > +static int > +test_NEA4_case_1_encrypt(void) > +{ > + return test_NEA_helper(&nea4_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA4_case_1_decrypt(void) > +{ > + return test_NEA_helper(&nea4_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA4_case_2_encrypt(void) > +{ > + return test_NEA_helper(&nea4_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA4_case_2_decrypt(void) > +{ > + return test_NEA_helper(&nea4_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA4_case_3_encrypt(void) > +{ > + return test_NEA_helper(&nea4_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA4_case_3_decrypt(void) > +{ > + return test_NEA_helper(&nea4_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > +static int > +test_NEA5_case_1_encrypt(void) > +{ > + return test_NEA_helper(&nea5_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA5_case_1_decrypt(void) > +{ > + return test_NEA_helper(&nea5_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA5_case_2_encrypt(void) > +{ > + return test_NEA_helper(&nea5_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA5_case_2_decrypt(void) > +{ > + return test_NEA_helper(&nea5_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA5_case_3_encrypt(void) > +{ > + return test_NEA_helper(&nea5_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA5_case_3_decrypt(void) > +{ > + return test_NEA_helper(&nea5_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA5_case_4_encrypt(void) > +{ > + return test_NEA_helper(&nea5_test_4, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA5_case_4_decrypt(void) > +{ > + return test_NEA_helper(&nea5_test_4, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA5_case_5_encrypt(void) > +{ > + return test_NEA_helper(&nea5_test_5, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA5_case_5_decrypt(void) > +{ > + return test_NEA_helper(&nea5_test_5, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > +static int > +test_NEA6_case_1_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_1_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_2_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_2_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_3_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_3_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_4_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_4, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_4_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_4, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_5_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_5, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_5_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_5, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_6_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_6, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_6_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_6, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NEA6_case_7_encrypt(void) > +{ > + return test_NEA_helper(&nea6_test_7, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NEA6_case_7_decrypt(void) > +{ > + return test_NEA_helper(&nea6_test_7, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > +static int > +test_NIA4_case_1(void) > +{ > + return test_NIA_helper(&nia4_test_1); > +} > +static int > +test_NIA4_case_2(void) > +{ > + return test_NIA_helper(&nia4_test_2); > +} > +static int > +test_NIA4_case_3(void) > +{ > + return test_NIA_helper(&nia4_test_3); > +} > +static int > +test_NIA4_case_4(void) > +{ > + return test_NIA_helper(&nia4_test_4); > +} > +static int > +test_NIA4_case_5(void) > +{ > + return test_NIA_helper(&nia4_test_5); > +} > +static int > +test_NIA4_case_6(void) > +{ > + return test_NIA_helper(&nia4_test_6); > +} > +static int > +test_NIA4_case_7(void) > +{ > + return test_NIA_helper(&nia4_test_7); > +} > + > +static int > +test_NIA5_case_1(void) > +{ > + return test_NIA_helper(&nia5_test_1); > +} > +static int > +test_NIA5_case_2(void) > +{ > + return test_NIA_helper(&nia5_test_2); > +} > +static int > +test_NIA5_case_3(void) > +{ > + return test_NIA_helper(&nia5_test_3); > +} > +static int > +test_NIA5_case_4(void) > +{ > + return test_NIA_helper(&nia5_test_4); > +} > +static int > +test_NIA5_case_5(void) > +{ > + return test_NIA_helper(&nia5_test_5); > +} > +static int > +test_NIA5_case_6(void) > +{ > + return test_NIA_helper(&nia5_test_6); > +} > +static int > +test_NIA5_case_7(void) > +{ > + return test_NIA_helper(&nia5_test_7); > +} > + > +static int > +test_NIA6_case_1(void) > +{ > + return test_NIA_helper(&nia6_test_1); > +} > +static int > +test_NIA6_case_2(void) > +{ > + return test_NIA_helper(&nia6_test_2); > +} > +static int > +test_NIA6_case_3(void) > +{ > + return test_NIA_helper(&nia6_test_3); > +} > +static int > +test_NIA6_case_4(void) > +{ > + return test_NIA_helper(&nia6_test_4); > +} > +static int > +test_NIA6_case_5(void) > +{ > + return test_NIA_helper(&nia6_test_5); > +} > +static int > +test_NIA6_case_6(void) > +{ > + return test_NIA_helper(&nia6_test_6); > +} > +static int > +test_NIA6_case_7(void) > +{ > + return test_NIA_helper(&nia6_test_7); > +} > + > +static int > +test_NCA4_case_1_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_1_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_2_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_2_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_3_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_3_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_4_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_4, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_4_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_4, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_5_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_5, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_5_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_5, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_6_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_6, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_6_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_6, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_7_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_7, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_7_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_7, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_8_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_8, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_8_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_8, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_9_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_9, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_9_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_9, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA4_case_10_encrypt(void) > +{ > + return test_NCA_helper(&nca4_test_10, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA4_case_10_decrypt(void) > +{ > + return test_NCA_helper(&nca4_test_10, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > + > +static int > +test_NCA5_case_1_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_1_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_2_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_2_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_3_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_3_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_4_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_4, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_4_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_4, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_5_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_5, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_5_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_5, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_6_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_6, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_6_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_6, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_7_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_7, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_7_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_7, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_8_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_8, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_8_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_8, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_9_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_9, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_9_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_9, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA5_case_10_encrypt(void) > +{ > + return test_NCA_helper(&nca5_test_10, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA5_case_10_decrypt(void) > +{ > + return test_NCA_helper(&nca5_test_10, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > +static int > +test_NCA6_case_1_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_1, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_1_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_1, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_2_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_2, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_2_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_2, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_3_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_3, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_3_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_3, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_4_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_4, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_4_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_4, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_5_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_5, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_5_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_5, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_6_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_6, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_6_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_6, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_7_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_7, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_7_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_7, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_8_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_8, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_8_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_8, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_9_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_9, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_9_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_9, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > +static int > +test_NCA6_case_10_encrypt(void) > +{ > + return test_NCA_helper(&nca6_test_10, > RTE_CRYPTO_CIPHER_OP_ENCRYPT); > +} > +static int > +test_NCA6_case_10_decrypt(void) > +{ > + return test_NCA_helper(&nca6_test_10, > RTE_CRYPTO_CIPHER_OP_DECRYPT); > +} > + > +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { > + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA4_case_3_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { > + .suite_name = "256 NEA5 (AES 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_3_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_4_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_4_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_5_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA5_case_5_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { > + .suite_name = "256 NEA6 (ZUC 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_3_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_4_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_4_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_5_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_5_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_6_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_6_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_7_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NEA6_case_7_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { > + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_1), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_2), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_3), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_4), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_5), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_6), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA4_case_7), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { > + .suite_name = "256 NIA5 (AES 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_1), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_2), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_3), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_4), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_5), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_6), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA5_case_7), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { > + .suite_name = "256 NIA6 (ZUC 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_1), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_2), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_3), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_4), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_5), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_6), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NIA6_case_7), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { > + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_3_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_4_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_4_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_5_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_5_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_6_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_6_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_7_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_7_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_8_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_8_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_9_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_9_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_10_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA4_case_10_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { > + .suite_name = "256 NCA5 (AES 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_3_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_4_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_4_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_5_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_5_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_6_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_6_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_7_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_7_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_8_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_8_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_9_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_9_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_10_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA5_case_10_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { > + .suite_name = "256 NCA6 (ZUC 256) Test Suite", > + .setup = nxan_testsuite_setup, > + .unit_test_cases = { > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_1_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_1_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_2_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_2_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_3_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_3_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_4_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_4_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_5_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_5_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_6_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_6_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_7_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_7_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_8_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_8_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_9_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_9_decrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_10_encrypt), > + TEST_CASE_ST(ut_setup, ut_teardown, > + test_NCA6_case_10_decrypt), > + > + TEST_CASES_END() > + } > +}; > + > static int > run_cryptodev_testsuite(const char *pmd_name) > { > @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char > *pmd_name) > &cryptodev_negative_hmac_sha1_testsuite, > &cryptodev_gen_testsuite, > &cryptodev_sm4_gcm_testsuite, > + &cryptodev_256_NEA4_testsuite, > + &cryptodev_256_NEA5_testsuite, > + &cryptodev_256_NEA6_testsuite, > + &cryptodev_256_NIA4_testsuite, > + &cryptodev_256_NIA5_testsuite, > + &cryptodev_256_NIA6_testsuite, > + &cryptodev_256_NCA4_testsuite, > + &cryptodev_256_NCA5_testsuite, > + &cryptodev_256_NCA6_testsuite, > #ifdef RTE_LIB_SECURITY > &ipsec_proto_testsuite, > &pdcp_proto_testsuite, > diff --git a/app/test/test_cryptodev_nxan_test_vectors.h > b/app/test/test_cryptodev_nxan_test_vectors.h > new file mode 100644 > index 0000000000..237cfde28a > --- /dev/null > +++ b/app/test/test_cryptodev_nxan_test_vectors.h > @@ -0,0 +1,2029 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2025 Intel Corporation > + */ > + > +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ > +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ > + > +#define MAX_DATA_SZ 1024 > +struct nxa_256_test_data { > + uint8_t key[32]; > + uint8_t iv[16]; > + uint8_t plaintext[MAX_DATA_SZ]; > + uint8_t ciphertext[MAX_DATA_SZ]; > + uint8_t aad[MAX_DATA_SZ]; > + uint8_t tag[MAX_DATA_SZ]; > + size_t msg_size; > + size_t aad_size; > + size_t tag_size; > + enum rte_crypto_cipher_algorithm cipher_algo; > + enum rte_crypto_auth_algorithm auth_algo; > + enum rte_crypto_aead_algorithm aead_algo; > +}; > + > +static const > +struct nxa_256_test_data nea4_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .ciphertext = { > + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, > + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, > + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, > + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, > + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, > + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, > + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, > + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef > + }, > + .msg_size = 512, > + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 > +}; > +static const > +struct nxa_256_test_data nea4_test_2 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .plaintext = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .ciphertext = { > + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, > + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, > + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, > + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, > + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, > + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, > + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, > + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 > + > + }, > + .msg_size = 512, > + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 > +}; > +static const > +struct nxa_256_test_data nea4_test_3 = { > + .key = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, > + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, > + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff > + }, > + .iv = { > + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, > + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe > + }, > + .plaintext = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .ciphertext = { > + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, > + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, > + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, > + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, > + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, > + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, > + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, > + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 > + }, > + .msg_size = 512, > + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 > +}; > + > +static const > +struct nxa_256_test_data nea5_test_1 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .ciphertext = { > + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, > + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, > + 0x46, 0x73 > + }, > + .msg_size = 144, > + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 > +}; > +static const > +struct nxa_256_test_data nea5_test_2 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0xe2 > + }, > + .msg_size = 8, > + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 > +}; > +static const > +struct nxa_256_test_data nea5_test_3 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .ciphertext = { > + 0x88, 0x3a, 0x10 > + }, > + .msg_size = 24, > + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 > +}; > +static const > +struct nxa_256_test_data nea5_test_4 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0xe2 > + }, > + .msg_size = 8, > + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 > +}; > +static const > +struct nxa_256_test_data nea5_test_5 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .ciphertext = { > + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, > + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, > + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, > + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, > + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, > + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, > + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, > + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, > + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, > + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, > + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, > + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, > + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, > + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, > + 0x47, 0x35, 0x65, 0x5a, 0xaf > + }, > + .msg_size = 936, > + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 > +}; > + > +static const > +struct nxa_256_test_data nea6_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0x4b > + }, > + .msg_size = 8, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_2 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .ciphertext = { > + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, > + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, > + 0x58, 0xb6 > + }, > + .msg_size = 144, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_3 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .ciphertext = { > + 0x4f, 0x62, 0x4d > + }, > + .msg_size = 24, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_4 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .ciphertext = { > + 0x18, 0xd4, 0xbd, 0xf2 > + }, > + .msg_size = 32, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_5 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .ciphertext = { > + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, > + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, > + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, > + 0x78, 0xba, 0xd0 > + }, > + .msg_size = 216, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_6 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .ciphertext = { > + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, > + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, > + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, > + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, > + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, > + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, > + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, > + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, > + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, > + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, > + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, > + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, > + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, > + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, > + 0x76, 0x48, 0x85, 0x2f, 0xd0 > + }, > + .msg_size = 936, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > +static const > +struct nxa_256_test_data nea6_test_7 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff > + }, > + .ciphertext = { > + 0xde > + }, > + .msg_size = 8, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > + > + > +static const > +struct nxa_256_test_data nea6_test_9 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff > + }, > + .ciphertext = { > + 0xde > + }, > + .msg_size = 8, > + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 > +}; > + > +static const > +struct nxa_256_test_data nca4_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0xeb, 0xc1, 0xd9, 0x5b > + }, > + .msg_size = 0, > + .aad_size = 0, > + .tag_size = 32, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_2 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0x6d > + }, > + .tag = { > + 0x7a, 0x68, 0x38, 0x39, 0x4f > + }, > + .msg_size = 8, > + .aad_size = 0, > + .tag_size = 40, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_3 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .ciphertext = { > + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, > + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, > + 0x0c, 0x48 > + }, > + .tag = { > + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 > + }, > + .msg_size = 144, > + .aad_size = 0, > + .tag_size = 48, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_4 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 > + }, > + .iv = { > + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x00 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 > + }, > + .msg_size = 0, > + .aad_size = 8, > + .tag_size = 48, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_5 = { > + .key = { > + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 > + }, > + .iv = { > + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b > + }, > + .msg_size = 0, > + .aad_size = 168, > + .tag_size = 48, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_6 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .ciphertext = { > + 0x1c, 0xb0, 0x8d > + }, > + .tag = { > + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, > + 0x8b > + }, > + .msg_size = 24, > + .aad_size = 168, > + .tag_size = 72, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_7 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .ciphertext = { > + 0x14, 0x74, 0x3c, 0x3b > + }, > + .tag = { > + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, > + 0x3d, 0x20, 0x01, 0x67 > + }, > + .msg_size = 32, > + .aad_size = 168, > + .tag_size = 96, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_8 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, > + 0x19, 0x20, 0x21 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .ciphertext = { > + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, > + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, > + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, > + 0x38, 0x7e, 0x34 > + }, > + .tag = { > + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, > + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b > + }, > + .msg_size = 216, > + .aad_size = 216, > + .tag_size = 120, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_9 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, > + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, > + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, > + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, > + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, > + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, > + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, > + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, > + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, > + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, > + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, > + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, > + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, > + 0xdb > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .ciphertext = { > + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, > + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, > + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, > + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, > + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, > + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, > + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, > + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, > + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, > + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, > + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, > + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, > + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, > + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, > + 0x01, 0x57, 0xb7, 0x84, 0x62 > + }, > + .tag = { > + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, > + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 > + }, > + .msg_size = 936, > + .aad_size = 840, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > +static const > +struct nxa_256_test_data nca4_test_10 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xff, 0xff > + }, > + .plaintext = { > + 0xff > + }, > + .ciphertext = { > + 0xff > + }, > + .tag = { > + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, > + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 > + }, > + .msg_size = 8, > + .aad_size = 16, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 > +}; > + > +static const > +struct nxa_256_test_data nca5_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0xa3, 0xb4, 0xcc, 0x5a > + }, > + .msg_size = 0, > + .aad_size = 0, > + .tag_size = 32, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_2 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0x8e > + }, > + .tag = { > + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe > + }, > + .msg_size = 8, > + .aad_size = 0, > + .tag_size = 32, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_3 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .ciphertext = { > + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, > + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, > + 0x22, 0x2d > + }, > + .tag = { > + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec > + }, > + .msg_size = 144, > + .aad_size = 0, > + .tag_size = 48, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_4 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 > + }, > + .iv = { > + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x00 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa > + }, > + .msg_size = 0, > + .aad_size = 8, > + .tag_size = 56, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_5 = { > + .key = { > + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 > + }, > + .iv = { > + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 > + }, > + .msg_size = 0, > + .aad_size = 168, > + .tag_size = 64, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_6 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .ciphertext = { > + 0xfe, 0xd2, 0xc8 > + }, > + .tag = { > + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, > + 0xe4 > + }, > + .msg_size = 24, > + .aad_size = 168, > + .tag_size = 72, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_7 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .ciphertext = { > + 0x6a, 0xdc, 0x2f, 0xc2 > + }, > + .tag = { > + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, > + 0x04, 0x5e, 0x81, 0xc0 > + }, > + .msg_size = 32, > + .aad_size = 168, > + .tag_size = 96, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_8 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, > + 0x19, 0x20, 0x21 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .ciphertext = { > + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, > + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, > + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, > + 0x19, 0xa4, 0x37 > + }, > + .tag = { > + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, > + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 > + }, > + .msg_size = 216, > + .aad_size = 216, > + .tag_size = 120, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_9 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, > + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, > + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, > + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, > + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, > + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, > + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, > + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, > + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, > + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, > + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, > + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, > + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, > + 0xdb > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .ciphertext = { > + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, > + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, > + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, > + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, > + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, > + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, > + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, > + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, > + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, > + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, > + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, > + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, > + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, > + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, > + 0xc7, 0xf2, 0x3b, 0x31, 0x15 > + }, > + .tag = { > + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, > + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 > + }, > + .msg_size = 936, > + .aad_size = 840, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > +static const > +struct nxa_256_test_data nca5_test_10 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xff, 0xff > + }, > + .plaintext = { > + 0xff > + }, > + .ciphertext = { > + 0xff > + }, > + .tag = { > + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, > + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa > + }, > + .msg_size = 8, > + .aad_size = 16, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 > +}; > + > +static const > +struct nxa_256_test_data nca6_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0xe0, 0xa4, 0x71, 0x85 > + }, > + .msg_size = 0, > + .aad_size = 0, > + .tag_size = 32, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_2 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x00 > + }, > + .ciphertext = { > + 0x6b > + }, > + .tag = { > + 0x13, 0x64, 0xe2, 0xce, 0xc8 > + }, > + .msg_size = 8, > + .aad_size = 0, > + .tag_size = 40, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_3 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { 0 }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .ciphertext = { > + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, > + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, > + 0xc1, 0x21 > + }, > + .tag = { > + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f > + }, > + .msg_size = 144, > + .aad_size = 0, > + .tag_size = 48, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_4 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 > + }, > + .iv = { > + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x00 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb > + }, > + .msg_size = 0, > + .aad_size = 8, > + .tag_size = 56, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_5 = { > + .key = { > + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 > + }, > + .iv = { > + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { 0 }, > + .ciphertext = { 0 }, > + .tag = { > + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a > + }, > + .msg_size = 0, > + .aad_size = 168, > + .tag_size = 64, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_6 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .ciphertext = { > + 0x96, 0x1a, 0x27 > + }, > + .tag = { > + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, > + 0xde > + }, > + .msg_size = 24, > + .aad_size = 168, > + .tag_size = 72, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_7 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .ciphertext = { > + 0xbf, 0xdb, 0xae, 0x6d > + }, > + .tag = { > + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, > + 0xd9, 0xd8, 0xa5, 0x23 > + }, > + .msg_size = 32, > + .aad_size = 168, > + .tag_size = 96, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_8 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, > + 0x19, 0x20, 0x21 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .ciphertext = { > + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, > + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, > + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, > + 0xc1, 0xa3, 0x5e > + }, > + .tag = { > + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, > + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f > + }, > + .msg_size = 216, > + .aad_size = 216, > + .tag_size = 120, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_9 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, > + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, > + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, > + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, > + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, > + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, > + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, > + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, > + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, > + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, > + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, > + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, > + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, > + 0xdb > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .ciphertext = { > + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, > + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, > + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, > + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, > + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, > + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, > + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, > + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, > + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, > + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, > + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, > + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, > + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, > + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, > + 0x17, 0x92, 0x38, 0xc5, 0x8d > + }, > + .tag = { > + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, > + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 > + }, > + .msg_size = 936, > + .aad_size = 840, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > +static const > +struct nxa_256_test_data nca6_test_10 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .aad = { > + 0xff, 0xff > + }, > + .plaintext = { > + 0xff > + }, > + .ciphertext = { > + 0x36 > + }, > + .tag = { > + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, > + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b > + }, > + .msg_size = 8, > + .aad_size = 16, > + .tag_size = 128, > + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 > +}; > + > +static const > +struct nxa_256_test_data nia4_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .tag = { > + 0x51, 0x52, 0x9f, 0xd4, 0xe2 > + }, > + .msg_size = 8, > + .tag_size = 40, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_2 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .tag = { > + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 > + }, > + .msg_size = 144, > + .tag_size = 48, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_3 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .tag = { > + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, > + 0xf8 > + }, > + .msg_size = 24, > + .tag_size = 72, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_4 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .tag = { > + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, > + 0xaa, 0xd2, 0x4d, 0x25 > + }, > + .msg_size = 32, > + .tag_size = 96, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_5 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .tag = { > + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, > + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c > + }, > + .msg_size = 216, > + .tag_size = 120, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_6 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .tag = { > + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, > + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb > + }, > + .msg_size = 936, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > +static const > +struct nxa_256_test_data nia4_test_7 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff > + }, > + .tag = { > + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, > + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c > + }, > + .msg_size = 8, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 > +}; > + > +static const > +struct nxa_256_test_data nia5_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .tag = { > + 0xa8, 0x10, 0x5e, 0xcb, 0x39 > + }, > + .msg_size = 8, > + .tag_size = 40, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_2 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .tag = { > + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 > + }, > + .msg_size = 144, > + .tag_size = 48, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_3 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .tag = { > + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, > + 0x39 > + }, > + .msg_size = 24, > + .tag_size = 72, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_4 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .tag = { > + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, > + 0xbe, 0x7c, 0xe0, 0xaf > + }, > + .msg_size = 32, > + .tag_size = 96, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_5 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .tag = { > + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, > + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 > + }, > + .msg_size = 216, > + .tag_size = 120, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_6 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .tag = { > + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, > + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 > + }, > + .msg_size = 936, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > +static const > +struct nxa_256_test_data nia5_test_7 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff > + }, > + .tag = { > + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, > + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 > + }, > + .msg_size = 8, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 > +}; > + > +static const > +struct nxa_256_test_data nia6_test_1 = { > + .key = { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x00 > + }, > + .tag = { > + 0x41, 0x53, 0x90, 0x61, 0xeb > + }, > + .msg_size = 8, > + .tag_size = 40, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_2 = { > + .key = { > + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .iv = { > + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12 > + }, > + .tag = { > + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 > + }, > + .msg_size = 144, > + .tag_size = 48, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_3 = { > + .key = { > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00 > + }, > + .tag = { > + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, > + 0xd5 > + }, > + .msg_size = 24, > + .tag_size = 72, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_4 = { > + .key = { > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, > + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 > + }, > + .iv = { > + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff, 0xff, 0x00, 0xff > + }, > + .tag = { > + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, > + 0x8f, 0xf0, 0x8f, 0x12 > + }, > + .msg_size = 32, > + .tag_size = 96, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_5 = { > + .key = { > + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, > + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, > + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, > + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff > + }, > + .iv = { > + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, > + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, > + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, > + 0xad, 0xae, 0xaf > + }, > + .tag = { > + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, > + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 > + }, > + .msg_size = 216, > + .tag_size = 120, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_6 = { > + .key = { > + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, > + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, > + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, > + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, > + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, > + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, > + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, > + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, > + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, > + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, > + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, > + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, > + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, > + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, > + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, > + 0xb7, 0xf9, 0x54, 0xd2, 0xda > + }, > + .tag = { > + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, > + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c > + }, > + .msg_size = 936, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > +static const > +struct nxa_256_test_data nia6_test_7 = { > + .key = { > + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, > + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, > + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, > + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 > + }, > + .iv = { > + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, > + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 > + }, > + .plaintext = { > + 0xff > + }, > + .tag = { > + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, > + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b > + }, > + .msg_size = 8, > + .tag_size = 128, > + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 > +}; > + > +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ > -- > 2.50.1 ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v5 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau ` (3 preceding siblings ...) 2026-01-21 15:15 ` [PATCH v4 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-22 10:25 ` Radu Nicolau 2026-01-22 10:25 ` [PATCH v5 2/2] test/crypto: add tests " Radu Nicolau 2026-01-23 0:23 ` [PATCH v5 1/2] cryptodev: add support " Stephen Hemminger 2026-01-23 12:48 ` [PATCH v6 " Radu Nicolau ` (2 subsequent siblings) 7 siblings, 2 replies; 27+ messages in thread From: Radu Nicolau @ 2026-01-22 10:25 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..630fd153bd 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA5 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA6 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA5 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA6 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA5 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA6 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v5 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-22 10:25 ` Radu Nicolau 2026-01-23 0:23 ` [PATCH v5 1/2] cryptodev: add support " Stephen Hemminger 1 sibling, 0 replies; 27+ messages in thread From: Radu Nicolau @ 2026-01-22 10:25 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v5: address all retval cases app/test/test_cryptodev.c | 1107 ++++++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2029 +++++++++++++++++++ 2 files changed, 3136 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..9361c46fc2 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,1103 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval != 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const struct nxa_256_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval != 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + +static int +test_NEA4_case_1_encrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_1_decrypt(void) +{ + return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_2_encrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_2_decrypt(void) +{ + return test_NEA_helper(&nea4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA4_case_3_encrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA4_case_3_decrypt(void) +{ + return test_NEA_helper(&nea4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA5_case_1_encrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_1_decrypt(void) +{ + return test_NEA_helper(&nea5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_2_encrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_2_decrypt(void) +{ + return test_NEA_helper(&nea5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_3_encrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_3_decrypt(void) +{ + return test_NEA_helper(&nea5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_4_encrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_4_decrypt(void) +{ + return test_NEA_helper(&nea5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA5_case_5_encrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA5_case_5_decrypt(void) +{ + return test_NEA_helper(&nea5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NEA6_case_1_encrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_1_decrypt(void) +{ + return test_NEA_helper(&nea6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_2_encrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_2_decrypt(void) +{ + return test_NEA_helper(&nea6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_3_encrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_3_decrypt(void) +{ + return test_NEA_helper(&nea6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_4_encrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_4_decrypt(void) +{ + return test_NEA_helper(&nea6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_5_encrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_5_decrypt(void) +{ + return test_NEA_helper(&nea6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_6_encrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_6_decrypt(void) +{ + return test_NEA_helper(&nea6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NEA6_case_7_encrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NEA6_case_7_decrypt(void) +{ + return test_NEA_helper(&nea6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NIA4_case_1(void) +{ + return test_NIA_helper(&nia4_test_1); +} +static int +test_NIA4_case_2(void) +{ + return test_NIA_helper(&nia4_test_2); +} +static int +test_NIA4_case_3(void) +{ + return test_NIA_helper(&nia4_test_3); +} +static int +test_NIA4_case_4(void) +{ + return test_NIA_helper(&nia4_test_4); +} +static int +test_NIA4_case_5(void) +{ + return test_NIA_helper(&nia4_test_5); +} +static int +test_NIA4_case_6(void) +{ + return test_NIA_helper(&nia4_test_6); +} +static int +test_NIA4_case_7(void) +{ + return test_NIA_helper(&nia4_test_7); +} + +static int +test_NIA5_case_1(void) +{ + return test_NIA_helper(&nia5_test_1); +} +static int +test_NIA5_case_2(void) +{ + return test_NIA_helper(&nia5_test_2); +} +static int +test_NIA5_case_3(void) +{ + return test_NIA_helper(&nia5_test_3); +} +static int +test_NIA5_case_4(void) +{ + return test_NIA_helper(&nia5_test_4); +} +static int +test_NIA5_case_5(void) +{ + return test_NIA_helper(&nia5_test_5); +} +static int +test_NIA5_case_6(void) +{ + return test_NIA_helper(&nia5_test_6); +} +static int +test_NIA5_case_7(void) +{ + return test_NIA_helper(&nia5_test_7); +} + +static int +test_NIA6_case_1(void) +{ + return test_NIA_helper(&nia6_test_1); +} +static int +test_NIA6_case_2(void) +{ + return test_NIA_helper(&nia6_test_2); +} +static int +test_NIA6_case_3(void) +{ + return test_NIA_helper(&nia6_test_3); +} +static int +test_NIA6_case_4(void) +{ + return test_NIA_helper(&nia6_test_4); +} +static int +test_NIA6_case_5(void) +{ + return test_NIA_helper(&nia6_test_5); +} +static int +test_NIA6_case_6(void) +{ + return test_NIA_helper(&nia6_test_6); +} +static int +test_NIA6_case_7(void) +{ + return test_NIA_helper(&nia6_test_7); +} + +static int +test_NCA4_case_1_encrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_1_decrypt(void) +{ + return test_NCA_helper(&nca4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_2_encrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_2_decrypt(void) +{ + return test_NCA_helper(&nca4_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_3_encrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_3_decrypt(void) +{ + return test_NCA_helper(&nca4_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_4_encrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_4_decrypt(void) +{ + return test_NCA_helper(&nca4_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_5_encrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_5_decrypt(void) +{ + return test_NCA_helper(&nca4_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_6_encrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_6_decrypt(void) +{ + return test_NCA_helper(&nca4_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_7_encrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_7_decrypt(void) +{ + return test_NCA_helper(&nca4_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_8_encrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_8_decrypt(void) +{ + return test_NCA_helper(&nca4_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_9_encrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_9_decrypt(void) +{ + return test_NCA_helper(&nca4_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA4_case_10_encrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA4_case_10_decrypt(void) +{ + return test_NCA_helper(&nca4_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + + +static int +test_NCA5_case_1_encrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_1_decrypt(void) +{ + return test_NCA_helper(&nca5_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_2_encrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_2_decrypt(void) +{ + return test_NCA_helper(&nca5_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_3_encrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_3_decrypt(void) +{ + return test_NCA_helper(&nca5_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_4_encrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_4_decrypt(void) +{ + return test_NCA_helper(&nca5_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_5_encrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_5_decrypt(void) +{ + return test_NCA_helper(&nca5_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_6_encrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_6_decrypt(void) +{ + return test_NCA_helper(&nca5_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_7_encrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_7_decrypt(void) +{ + return test_NCA_helper(&nca5_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_8_encrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_8_decrypt(void) +{ + return test_NCA_helper(&nca5_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_9_encrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_9_decrypt(void) +{ + return test_NCA_helper(&nca5_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA5_case_10_encrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA5_case_10_decrypt(void) +{ + return test_NCA_helper(&nca5_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static int +test_NCA6_case_1_encrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_1_decrypt(void) +{ + return test_NCA_helper(&nca6_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_2_encrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_2_decrypt(void) +{ + return test_NCA_helper(&nca6_test_2, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_3_encrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_3_decrypt(void) +{ + return test_NCA_helper(&nca6_test_3, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_4_encrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_4_decrypt(void) +{ + return test_NCA_helper(&nca6_test_4, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_5_encrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_5_decrypt(void) +{ + return test_NCA_helper(&nca6_test_5, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_6_encrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_6_decrypt(void) +{ + return test_NCA_helper(&nca6_test_6, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_7_encrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_7_decrypt(void) +{ + return test_NCA_helper(&nca6_test_7, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_8_encrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_8_decrypt(void) +{ + return test_NCA_helper(&nca6_test_8, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_9_encrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_9_decrypt(void) +{ + return test_NCA_helper(&nca6_test_9, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} +static int +test_NCA6_case_10_encrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} +static int +test_NCA6_case_10_decrypt(void) +{ + return test_NCA_helper(&nca6_test_10, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA4_case_3_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA5_case_5_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NEA6_case_7_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA4_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA5_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_6), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NIA6_case_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA4_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA5_case_10_decrypt), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_1_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_2_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_3_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_4_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_5_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_6_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_7_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_8_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_9_decrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_encrypt), + TEST_CASE_ST(ut_setup, ut_teardown, + test_NCA6_case_10_decrypt), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20999,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..237cfde28a --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2029 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + + +static const +struct nxa_256_test_data nea6_test_9 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH v5 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau 2026-01-22 10:25 ` [PATCH v5 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-23 0:23 ` Stephen Hemminger 2026-01-23 10:44 ` Radu Nicolau 1 sibling, 1 reply; 27+ messages in thread From: Stephen Hemminger @ 2026-01-23 0:23 UTC (permalink / raw) To: Radu Nicolau; +Cc: dev, nkaithakadan, kai.ji, anoobj, Akhil Goyal, Fan Zhang On Thu, 22 Jan 2026 10:25:33 +0000 Radu Nicolau <radu.nicolau@intel.com> wrote: > Add support for > > NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes > NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes > NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Working on AI based patch review and used this pair as a test case. The results showed some things (mostly documentation) that could be fixed and also some false positives like recommending adding __rte_experimental to enum. === Patch Review: bundle-1674-crypto-v5.mbox (via Claude) === # DPDK Patch Review - bundle-1674-crypto-v5.mbox ## Summary This patch series adds support for 256-bit NxA4/5/6 algorithms (SNOW 5G, AES-256, and ZUC-256 confidentiality, integrity, and AEAD modes) to the DPDK cryptodev library. --- ## ERROR Level Issues ### 1. Missing Release Notes Update **Location:** Entire patchset **Issue:** No updates to release notes in `doc/guides/rel_notes/` **Guideline Violation:** Documentation requirements - "Update release notes in `doc/guides/rel_notes/` for important changes" **Required Action:** ``` Must add a release notes entry for the current release documenting: - New cipher algorithms: RTE_CRYPTO_CIPHER_SNOW5G_NEA4, RTE_CRYPTO_CIPHER_AES_NEA5, RTE_CRYPTO_CIPHER_ZUC_NEA6 - New auth algorithms: RTE_CRYPTO_AUTH_SNOW5G_NIA4, RTE_CRYPTO_AUTH_AES_NIA5, RTE_CRYPTO_AUTH_ZUC_NIA6 - New AEAD algorithms: RTE_CRYPTO_AEAD_SNOW5G_NCA4, RTE_CRYPTO_AEAD_AES_NCA5, RTE_CRYPTO_AEAD_ZUC_NCA6 ``` ### 2. Missing `__rte_experimental` Tags **Location:** `lib/cryptodev/rte_crypto_sym.h` **Issue:** New enum values added to public API without experimental marking **Guideline Violation:** "New APIs must be marked as `__rte_experimental`" **Details:** - Lines 185-188 (cipher algorithms) - Lines 394-402 (auth algorithms) - Lines 504-509 (AEAD algorithms) **Required Action:** While enum values typically don't receive `__rte_experimental` directly, the lack of any experimental marking or API versioning for this significant feature addition is concerning. Consider: 1. Adding a deprecation notice period 2. Or documenting the API stability commitment in release notes ### 3. Commit Message Body Length Violations **Location:** Patch 1/2 commit message **Issue:** Body is only 3 lines but doesn't meet guideline expectations **Guideline Violation:** Body should provide context and justification **Required Content:** ``` Should include: - Why these algorithms are being added - Standards/specifications being implemented - Use case description ``` --- ## WARNING Level Issues ### 1. Subject Line Style Issues **Location:** Both patches **Issue:** Subject lines are good but could be more descriptive **Current:** ``` [PATCH v5 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms [PATCH v5 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms ``` **Recommendation:** ``` cryptodev: add SNOW 5G/AES-256/ZUC-256 NEA/NIA/NCA support test/crypto: add tests for SNOW 5G/AES-256/ZUC-256 NEA/NIA/NCA ``` ### 2. Inconsistent Algorithm Naming in Documentation **Location:** Patch 1, `lib/cryptodev/rte_crypto_sym.h` **Issue:** Comments use inconsistent naming conventions **Examples:** - Line 186: `/**< Snow 5G algorithm in NEA4 mode */` - Line 508: `/**< ZUC-256 algorithm in NCA6 mode */` **Recommendation:** Be consistent with hyphenation and capitalization: - "SNOW 5G" or "Snow 5G" (not "Snow 5G" mixed with "SNOW5G") - "ZUC-256" or "ZUC 256" consistently ### 3. Missing API Documentation **Location:** Patch 1, `lib/cryptodev/rte_crypto_sym.h` **Issue:** Minimal documentation for new enum values **Required:** Add detailed Doxygen comments explaining: - Algorithm specifications/standards - Key size requirements (256-bit) - IV/nonce size requirements (16 bytes) - Expected tag sizes for AEAD modes - Bit vs byte length semantics ### 4. Test Helper Function Error Handling **Location:** Patch 2, `app/test/test_cryptodev.c` **Issue:** Inconsistent error handling in helper functions **Lines 19923-19987 (`test_NEA_helper`):** ```c if (retval != 0) return retval; ``` But then at line 19969: ```c TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); ``` **Issue:** Mixing return codes with TEST_ASSERT macros. Should be consistent. **Recommendation:** ```c if (retval != 0) return TEST_FAILED; TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); ``` ### 5. Magic Number Usage **Location:** Throughout test code **Issue:** Hard-coded values without clear explanation **Examples:** - Line 19930: `32` (key length) - Line 19931: `16` (IV length) - Line 19933: `RTE_ALIGN_CEIL(tdata->msg_size, 8)` (why 8?) **Recommendation:** Define constants: ```c #define NEA_KEY_LEN 32 #define NEA_IV_LEN 16 #define NEA_BLOCK_SIZE 8 ``` ### 6. Incomplete Test Suite Setup Error Handling **Location:** Lines 19915-19948 (`nxan_testsuite_setup`) **Issue:** `check_cipher_capabilities_supported` return values not checked properly **Current:** ```c if (check_cipher_capabilities_supported(...) != 0 || check_auth_capabilities_supported(...) != 0 || check_aead_capabilities_supported(...) != 0) { RTE_LOG(INFO, USER1, "Capability requirements..."); return TEST_SKIPPED; } ``` **Issue:** Assumes all non-zero returns mean "not supported". Some return values might indicate errors. ### 7. Test Vector File Header Guard **Location:** `test_cryptodev_nxan_test_vectors.h`, line 5 **Issue:** Header guard ends with `_H_` which is unconventional **Current:** ```c #ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ ``` **Recommendation:** ```c #ifndef _TEST_CRYPTODEV_NXAN_TEST_VECTORS_H ``` ### 8. Potential Memory Leak in Test Helpers **Location:** `test_NIA_helper`, `test_NEA_helper`, `test_NCA_helper` **Issue:** No cleanup on error paths **Example (line 19923-19987):** ```c ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); /* ... operations ... */ if (retval != 0) return retval; // Leaks ut_params->ibuf ``` **Required:** Add proper cleanup: ```c if (retval != 0) { if (ut_params->ibuf) rte_pktmbuf_free(ut_params->ibuf); return TEST_FAILED; } ``` --- ## INFO Level Issues ### 1. Test Vector Organization **Location:** `test_cryptodev_nxan_test_vectors.h` **Observation:** Very large file (2029 lines) with similar structure **Suggestion:** Consider generating test vectors programmatically or using a more compact format for maintainability. ### 2. Duplicate Test Structure Code **Location:** Lines 20370-20989 **Issue:** Highly repetitive test case definitions **Example Pattern:** ```c static int test_NEA4_case_1_encrypt(void) { return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_ENCRYPT); } static int test_NEA4_case_1_decrypt(void) { return test_NEA_helper(&nea4_test_1, RTE_CRYPTO_CIPHER_OP_DECRYPT); } ``` **Suggestion:** Consider using a macro to reduce repetition: ```c #define TEST_NEA_CASE(suite, num) \ static int test_##suite##_case_##num##_encrypt(void) { \ return test_NEA_helper(&suite##_test_##num, RTE_CRYPTO_CIPHER_OP_ENCRYPT); \ } \ static int test_##suite##_case_##num##_decrypt(void) { \ return test_NEA_helper(&suite##_test_##num, RTE_CRYPTO_CIPHER_OP_DECRYPT); \ } ``` ### 3. Comment Formatting in Test Vectors **Location:** Throughout test vector definitions **Observation:** Hex data formatting could be improved for readability **Current:** ```c .key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ``` **Suggestion:** Add comments indicating byte positions: ```c .key = { /* Bytes 0-7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Bytes 8-15 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ``` ### 4. Test Suite Naming Consistency **Location:** Lines 20698-20984 **Observation:** Suite names use different formats **Examples:** ```c .suite_name = "256 NEA4 (SNOW 5G) Test Suite", .suite_name = "256 NEA5 (AES 256) Test Suite", .suite_name = "256 NEA6 (ZUC 256) Test Suite", ``` **Suggestion:** Consider more concise names: ```c .suite_name = "SNOW 5G NEA4 Test Suite", .suite_name = "AES-256 NEA5 Test Suite", .suite_name = "ZUC-256 NEA6 Test Suite", ``` ### 5. Unused Test Data Variable **Location:** Line 20101 (`nea6_test_9`) **Observation:** `nea6_test_9` is defined but never used ```c static const struct nxa_256_test_data nea6_test_9 = { // ... identical to nea6_test_7 ... }; ``` **Action:** Either remove or add to test suite. ### 6. Missing Error Message Details **Location:** Various `TEST_ASSERT_*` calls **Issue:** Generic error messages **Example (line 19969):** ```c TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); ``` **Suggestion:** ```c TEST_ASSERT_NOT_NULL(ut_params->op, "Failed to process crypto operation for %s", tdata->test_name); ``` ### 7. Code Style: Line Length **Location:** Multiple locations **Observation:** Some lines approach or exceed 100 characters **Example (line 19933):** ```c retval = create_wireless_algo_cipher_operation(tdata->iv, 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); ``` **Within limits but could be clearer with:** ```c uint32_t aligned_msg_size = RTE_ALIGN_CEIL(tdata->msg_size, 8); retval = create_wireless_algo_cipher_operation(tdata->iv, 16, aligned_msg_size, 0); ``` --- ## COMPLIANCE SUMMARY ### ✅ Correct 1. **License Headers:** All new files have proper SPDX license identifiers 2. **Copyright:** Intel copyright notices present and properly formatted 3. **C Style:** Code follows DPDK style guidelines (indentation, braces, naming) 4. **Commit Format:** Signed-off-by present, reasonable subject line length 5. **Test Infrastructure:** Proper use of `unit_test_suite_runner` framework 6. **Code Patterns:** No forbidden tokens, no unnecessary casts ### ❌ Must Fix (Errors) 1. Missing release notes update 2. Missing API stability documentation 3. Insufficient commit message detail ### ⚠️ Should Fix (Warnings) 1. Inconsistent algorithm naming 2. Incomplete API documentation 3. Test helper error handling issues 4. Missing cleanup on error paths 5. Magic numbers without constants 6. Memory leak potential in tests ### 💡 Consider (Info) 1. Reducing code repetition with macros 2. Improving test vector organization 3. Adding more descriptive error messages 4. Using constants for magic numbers --- ## RECOMMENDATION **Status:** CHANGES REQUESTED The patch implements the core functionality correctly and follows most DPDK conventions. However, it requires: 1. **Mandatory:** Add release notes entry 2. **Mandatory:** Expand commit message with context 3. **Strongly Recommended:** Fix memory leak potential in test helpers 4. **Recommended:** Add comprehensive API documentation ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v5 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-23 0:23 ` [PATCH v5 1/2] cryptodev: add support " Stephen Hemminger @ 2026-01-23 10:44 ` Radu Nicolau 0 siblings, 0 replies; 27+ messages in thread From: Radu Nicolau @ 2026-01-23 10:44 UTC (permalink / raw) To: Stephen Hemminger Cc: dev, nkaithakadan, kai.ji, anoobj, Akhil Goyal, Fan Zhang Hi, I will try to improve based on this, also some comments inline. On 23-Jan-26 12:23 AM, Stephen Hemminger wrote: > On Thu, 22 Jan 2026 10:25:33 +0000 > Radu Nicolau <radu.nicolau@intel.com> wrote: > >> Add support for >> >> NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes >> NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes >> NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes >> >> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> > Working on AI based patch review and used this pair as a test case. > The results showed some things (mostly documentation) that could be > fixed and also some false positives like recommending adding __rte_experimental > to enum. > > <snip> > ## COMPLIANCE SUMMARY > > ### ✅ Correct > > 1. **License Headers:** All new files have proper SPDX license identifiers > 2. **Copyright:** Intel copyright notices present and properly formatted > 3. **C Style:** Code follows DPDK style guidelines (indentation, braces, naming) > 4. **Commit Format:** Signed-off-by present, reasonable subject line length > 5. **Test Infrastructure:** Proper use of `unit_test_suite_runner` framework > 6. **Code Patterns:** No forbidden tokens, no unnecessary casts > > ### ❌ Must Fix (Errors) > > 1. Missing release notes update I have looked prior to send the patches, in the past the additions to the crypto lib algorithms enums were not captured in the release notes. > 2. Missing API stability documentation The documentation is consistent with all other entries > 3. Insufficient commit message detail Will add technical specifications numbers > > ### ⚠️ Should Fix (Warnings) > > 1. Inconsistent algorithm naming > 2. Incomplete API documentation > 3. Test helper error handling issues > 4. Missing cleanup on error paths > 5. Magic numbers without constants > 6. Memory leak potential in tests Will review and fix if needed. > > ### 💡 Consider (Info) > > 1. Reducing code repetition with macros > 2. Improving test vector organization > 3. Adding more descriptive error messages > 4. Using constants for magic numbers > > --- > > ## RECOMMENDATION > > **Status:** CHANGES REQUESTED > > The patch implements the core functionality correctly and follows most DPDK conventions. However, it requires: > > 1. **Mandatory:** Add release notes entry > 2. **Mandatory:** Expand commit message with context > 3. **Strongly Recommended:** Fix memory leak potential in test helpers > 4. **Recommended:** Add comprehensive API documentation ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v6 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau ` (4 preceding siblings ...) 2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-23 12:48 ` Radu Nicolau 2026-01-23 12:48 ` [PATCH v6 2/2] test/crypto: add tests " Radu Nicolau 2026-01-29 11:59 ` [PATCH v7 1/2] cryptodev: add support " Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-23 12:48 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes ETSI TS 135 240 / 3GPP TS 35.240 NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes ETSI TS 135 244 / 3GPP TS 35.244 NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes ETSI TS 135 246 / 3GPP TS 35.246 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v6: add TS numbers in commit message doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..630fd153bd 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA5 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA6 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA5 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA6 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA5 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA6 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v6 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-23 12:48 ` [PATCH v6 " Radu Nicolau @ 2026-01-23 12:48 ` Radu Nicolau 2026-01-29 4:29 ` [EXTERNAL] " Nithinsen Kaithakadan 0 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-23 12:48 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v6: rework test cases for less repetitions app/test/test_cryptodev.c | 564 ++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2006 +++++++++++++++++++ 2 files changed, 2570 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..5830d70459 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,560 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(void) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0 || + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0 || + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval != 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const void *td) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + const struct nxa_256_test_data *tdata = td; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval != 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + + +static int test_case_NEA_encrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +}; +static int test_case_NEA_decrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +}; + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_3), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_5), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_7), + + TEST_CASES_END() + } +}; + + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_7), + + TEST_CASES_END() + } +}; + + +static int test_case_NCA_encrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +}; +static int test_case_NCA_decrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nxan_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_10), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20456,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..3299752c49 --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2006 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.50.1 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v6 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-23 12:48 ` [PATCH v6 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-29 4:29 ` Nithinsen Kaithakadan 0 siblings, 0 replies; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-01-29 4:29 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Hi Radu, Please see my comments inline. Regards, Nithin Sen > +static int > +nxan_testsuite_setup(void) > +{ > + struct crypto_testsuite_params *ts_params = &testsuite_params; > + uint8_t dev_id = ts_params->valid_devs[0]; > + struct rte_cryptodev_info dev_info; > + const enum rte_crypto_cipher_algorithm ciphers[] = { > + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, > + RTE_CRYPTO_CIPHER_AES_NEA5, > + RTE_CRYPTO_CIPHER_ZUC_NEA6 > + }; > + const enum rte_crypto_auth_algorithm auths[] = { > + RTE_CRYPTO_AUTH_SNOW5G_NIA4, > + RTE_CRYPTO_AUTH_AES_NIA5, > + RTE_CRYPTO_AUTH_ZUC_NIA6 > + }; > + const enum rte_crypto_aead_algorithm aeads[] = { > + RTE_CRYPTO_AEAD_SNOW5G_NCA4, > + RTE_CRYPTO_AEAD_AES_NCA5, > + RTE_CRYPTO_AEAD_ZUC_NCA6 > + }; > + > + rte_cryptodev_info_get(dev_id, &dev_info); > + > + if (!(dev_info.feature_flags & > RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || > + ((global_api_test_type == > CRYPTODEV_RAW_API_TEST) && > + !(dev_info.feature_flags & > RTE_CRYPTODEV_FF_SYM_RAW_DP))) { > + RTE_LOG(INFO, USER1, "Feature flag requirements for > NxA4/5/6 " > + "testsuite not met\n"); > + return TEST_SKIPPED; > + } > + > + if (check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != > 0 || > + check_auth_capabilities_supported(auths, > RTE_DIM(auths)) != 0 || > + check_aead_capabilities_supported(aeads, > RTE_DIM(aeads)) != 0) { > + RTE_LOG(INFO, USER1, "Capability requirements for > NxA4/5/6 " > + "testsuite not met\n"); [Nithinsen] We currently support cipher and auth. And hence aead check would fail. Similarly if anyone supports only cipher, they wouldn’t be able to run NEA cases. So could you separate out this check ? > + return TEST_SKIPPED; > + } > + > + return 0; > +} > + ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v7 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau ` (5 preceding siblings ...) 2026-01-23 12:48 ` [PATCH v6 " Radu Nicolau @ 2026-01-29 11:59 ` Radu Nicolau 2026-01-29 11:59 ` [PATCH v7 2/2] test/crypto: add tests " Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau 7 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-29 11:59 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes ETSI TS 135 240 / 3GPP TS 35.240 NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes ETSI TS 135 244 / 3GPP TS 35.244 NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes ETSI TS 135 246 / 3GPP TS 35.246 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..630fd153bd 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA5 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA6 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA5 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA6 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA5 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA6 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.52.0 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v7 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-29 11:59 ` [PATCH v7 1/2] cryptodev: add support " Radu Nicolau @ 2026-01-29 11:59 ` Radu Nicolau 2026-01-30 11:12 ` [EXTERNAL] " Nithinsen Kaithakadan 0 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-01-29 11:59 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v7: check new algorithms capabilities independently app/test/test_cryptodev.c | 582 ++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2006 +++++++++++++++++++ 2 files changed, 2588 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..b5f3cea3f9 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,578 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(enum rte_crypto_sym_xform_type xform_type) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if ((xform_type == RTE_CRYPTO_SYM_XFORM_CIPHER && + check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0) || + (xform_type == RTE_CRYPTO_SYM_XFORM_AUTH && + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0) || + (xform_type == RTE_CRYPTO_SYM_XFORM_AEAD && + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0)) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} +static int +nea_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_CIPHER); +} +static int +nia_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AUTH); +} +static int +nca_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AEAD); +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval != 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const void *td) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + const struct nxa_256_test_data *tdata = td; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval != 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + + +static int test_case_NEA_encrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +}; +static int test_case_NEA_decrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +}; + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_3), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_5), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_7), + + TEST_CASES_END() + } +}; + + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_7), + + TEST_CASES_END() + } +}; + + +static int test_case_NCA_encrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +}; +static int test_case_NCA_decrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +}; + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_10), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20474,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..3299752c49 --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2006 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.52.0 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v7 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-29 11:59 ` [PATCH v7 2/2] test/crypto: add tests " Radu Nicolau @ 2026-01-30 11:12 ` Nithinsen Kaithakadan 2026-02-03 11:21 ` Radu Nicolau 0 siblings, 1 reply; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-01-30 11:12 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Hi Radu, Just a minor comment. Otherwise the changes looks good. Regards, Nithin Sen > + return TEST_SKIPPED; > + } > + > + return 0; > +} [Nithinsen] Here functions are not separated by line space. Same applicable between nea_testsuite_setup, nia_testsuite_setup, nca_testsuite_setup > +static int > +nea_testsuite_setup(void) > +{ > + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_CIPHER); > +} > +static int > +nia_testsuite_setup(void) > +{ > + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AUTH); > +} > +static int > +nca_testsuite_setup(void) > +{ > + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AEAD); > +} > + > +static int > +test_NEA_helper( > + const struct nxa_256_test_data *tdata, > + enum rte_crypto_cipher_operation op) ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [EXTERNAL] [PATCH v7 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-01-30 11:12 ` [EXTERNAL] " Nithinsen Kaithakadan @ 2026-02-03 11:21 ` Radu Nicolau 0 siblings, 0 replies; 27+ messages in thread From: Radu Nicolau @ 2026-02-03 11:21 UTC (permalink / raw) To: Nithinsen Kaithakadan, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Hi Nithinsen, Updated as requested, can you please review and ack it? On 30-Jan-26 11:12 AM, Nithinsen Kaithakadan wrote: > Hi Radu, > > Just a minor comment. Otherwise the changes looks good. > > Regards, > Nithin Sen > >> + return TEST_SKIPPED; >> + } >> + >> + return 0; >> +} > [Nithinsen] Here functions are not separated by line space. Same applicable between nea_testsuite_setup, nia_testsuite_setup, nca_testsuite_setup > >> +static int >> +nea_testsuite_setup(void) >> +{ >> + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_CIPHER); >> +} >> +static int >> +nia_testsuite_setup(void) >> +{ >> + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AUTH); >> +} >> +static int >> +nca_testsuite_setup(void) >> +{ >> + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AEAD); >> +} >> + >> +static int >> +test_NEA_helper( >> + const struct nxa_256_test_data *tdata, >> + enum rte_crypto_cipher_operation op) ^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v8 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau ` (6 preceding siblings ...) 2026-01-29 11:59 ` [PATCH v7 1/2] cryptodev: add support " Radu Nicolau @ 2026-02-03 11:13 ` Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau ` (2 more replies) 7 siblings, 3 replies; 27+ messages in thread From: Radu Nicolau @ 2026-02-03 11:13 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes ETSI TS 135 240 / 3GPP TS 35.240 NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes ETSI TS 135 244 / 3GPP TS 35.244 NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes ETSI TS 135 246 / 3GPP TS 35.246 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- doc/guides/cryptodevs/features/default.ini | 9 ++++ lib/cryptodev/rte_crypto_sym.h | 52 ++++++++++++++++++---- lib/cryptodev/rte_cryptodev.c | 13 +++++- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 64198f013a..d8026c3750 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -68,6 +68,9 @@ SM4 CTR = SM4 CFB = SM4 OFB = SM4 XTS = +SNOW5G NEA4 = +AES NEA5 = +ZUC-256 NEA6 = ; ; Supported authentication algorithms of a default crypto driver. @@ -106,6 +109,9 @@ SM3 = SM3 HMAC = SHAKE_128 = SHAKE_256 = +SNOW5G NIA4 = +AES NIA5 = +ZUC-256 NIA6 = ; ; Supported AEAD algorithms of a default crypto driver. @@ -119,6 +125,9 @@ AES CCM (192) = AES CCM (256) = CHACHA20-POLY1305 = SM4 GCM = +SNOW5G NCA4 = +AES NCA5 = +ZUC-256 NCA6 = ; ; Supported Asymmetric algorithms of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 6268bab327..630fd153bd 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -178,8 +178,15 @@ enum rte_crypto_cipher_algorithm { /**< ShangMi 4 (SM4) algorithm in OFB mode */ RTE_CRYPTO_CIPHER_SM4_CFB, /**< ShangMi 4 (SM4) algorithm in CFB mode */ - RTE_CRYPTO_CIPHER_SM4_XTS + RTE_CRYPTO_CIPHER_SM4_XTS, /**< ShangMi 4 (SM4) algorithm in XTS mode */ + + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + /**< Snow 5G algorithm in NEA4 mode */ + RTE_CRYPTO_CIPHER_AES_NEA5, + /**< AES algorithm in NEA5 mode */ + RTE_CRYPTO_CIPHER_ZUC_NEA6, + /**< ZUC-256 algorithm in NEA6 mode */ }; /** Symmetric Cipher Direction */ @@ -384,6 +391,14 @@ enum rte_crypto_auth_algorithm { /**< 256 bit SHAKE algorithm. */ RTE_CRYPTO_AUTH_SM3_HMAC, /** < HMAC using ShangMi 3 (SM3) algorithm */ + + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + /**< Snow 5G algorithm in NIA4 mode */ + RTE_CRYPTO_AUTH_AES_NIA5, + /**< AES algorithm in NIA5 mode */ + RTE_CRYPTO_AUTH_ZUC_NIA6, + /**< ZUC-256 algorithm in NIA6 mode */ + }; /** Symmetric Authentication / Hash Operations */ @@ -486,6 +501,13 @@ enum rte_crypto_aead_algorithm { /**< Chacha20 cipher with poly1305 authenticator */ RTE_CRYPTO_AEAD_SM4_GCM, /**< SM4 cipher in GCM mode */ + + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + /**< Snow 5G algorithm in NCA4 mode */ + RTE_CRYPTO_AEAD_AES_NCA5, + /**< AES algorithm in NCA5 mode */ + RTE_CRYPTO_AEAD_ZUC_NCA6, + /**< ZUC-256 algorithm in NCA6 mode */ }; /** Symmetric AEAD Operations */ @@ -714,8 +736,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -732,8 +757,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, - * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 - * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, + * ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, + * SNOW 5G @ RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + * AES @ RTE_CRYPTO_CIPHER_AES_NEA5 + * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_NEA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -750,8 +778,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. @@ -775,8 +806,11 @@ struct rte_crypto_sym_op { * * @note * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 - * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, + * ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, + * SNOW 5G @ RTE_CRYPTO_AUTH_SNOW5G_NIA4, + * AES @ RTE_CRYPTO_AUTH_AES_NIA5 + * and ZUC @ RTE_CRYPTO_AUTH_ZUC_NIA6 * this field should be in bits. For * digest-encrypted cases this must be * an 8-bit multiple. diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index f4c6f692f0..7bddb154c2 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -102,7 +102,10 @@ crypto_cipher_algorithm_strings[] = { [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr", [RTE_CRYPTO_CIPHER_SM4_CFB] = "sm4-cfb", [RTE_CRYPTO_CIPHER_SM4_OFB] = "sm4-ofb", - [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts" + [RTE_CRYPTO_CIPHER_SM4_XTS] = "sm4-xts", + [RTE_CRYPTO_CIPHER_SNOW5G_NEA4] = "snow5g-nea4", + [RTE_CRYPTO_CIPHER_AES_NEA5] = "aes-nea5", + [RTE_CRYPTO_CIPHER_ZUC_NEA6] = "zuc-nea6", }; /** @@ -162,6 +165,10 @@ crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_SHAKE_128] = "shake-128", [RTE_CRYPTO_AUTH_SHAKE_256] = "shake-256", + + [RTE_CRYPTO_AUTH_SNOW5G_NIA4] = "snow5g-nia4", + [RTE_CRYPTO_AUTH_AES_NIA5] = "aes-nia5", + [RTE_CRYPTO_AUTH_ZUC_NIA6] = "zuc-nia6", }; /** @@ -175,6 +182,10 @@ crypto_aead_algorithm_strings[] = { [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm", [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305", [RTE_CRYPTO_AEAD_SM4_GCM] = "sm4-gcm", + + [RTE_CRYPTO_AEAD_SNOW5G_NCA4] = "snow5g-nca4", + [RTE_CRYPTO_AEAD_AES_NCA5] = "aes-nca5", + [RTE_CRYPTO_AEAD_ZUC_NCA6] = "zuc-nca6", }; -- 2.52.0 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v8 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau @ 2026-02-03 11:13 ` Radu Nicolau 2026-02-03 14:00 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-02-03 13:59 ` [EXTERNAL] [PATCH v8 1/2] cryptodev: add support " Nithinsen Kaithakadan 2026-02-06 19:48 ` Akhil Goyal 2 siblings, 1 reply; 27+ messages in thread From: Radu Nicolau @ 2026-02-03 11:13 UTC (permalink / raw) To: dev Cc: nkaithakadan, kai.ji, anoobj, stephen, Radu Nicolau, Akhil Goyal, Fan Zhang Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> --- v8: add line breaks app/test/test_cryptodev.c | 587 ++++++ app/test/test_cryptodev_nxan_test_vectors.h | 2006 +++++++++++++++++++ 2 files changed, 2593 insertions(+) create mode 100644 app/test/test_cryptodev_nxan_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9bdd357727..c2303db7e4 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,7 @@ #include "test_cryptodev_hmac_test_vectors.h" #include "test_cryptodev_mixed_test_vectors.h" #include "test_cryptodev_sm4_test_vectors.h" +#include "test_cryptodev_nxan_test_vectors.h" #ifdef RTE_LIB_SECURITY #include "test_cryptodev_security_ipsec.h" #include "test_cryptodev_security_ipsec_test_vectors.h" @@ -19868,6 +19869,583 @@ static struct unit_test_suite cryptodev_sm4_gcm_testsuite = { } }; +static int +nxan_testsuite_setup(enum rte_crypto_sym_xform_type xform_type) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + uint8_t dev_id = ts_params->valid_devs[0]; + struct rte_cryptodev_info dev_info; + const enum rte_crypto_cipher_algorithm ciphers[] = { + RTE_CRYPTO_CIPHER_SNOW5G_NEA4, + RTE_CRYPTO_CIPHER_AES_NEA5, + RTE_CRYPTO_CIPHER_ZUC_NEA6 + }; + const enum rte_crypto_auth_algorithm auths[] = { + RTE_CRYPTO_AUTH_SNOW5G_NIA4, + RTE_CRYPTO_AUTH_AES_NIA5, + RTE_CRYPTO_AUTH_ZUC_NIA6 + }; + const enum rte_crypto_aead_algorithm aeads[] = { + RTE_CRYPTO_AEAD_SNOW5G_NCA4, + RTE_CRYPTO_AEAD_AES_NCA5, + RTE_CRYPTO_AEAD_ZUC_NCA6 + }; + + rte_cryptodev_info_get(dev_id, &dev_info); + + if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) || + ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && + !(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { + RTE_LOG(INFO, USER1, "Feature flag requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + if ((xform_type == RTE_CRYPTO_SYM_XFORM_CIPHER && + check_cipher_capabilities_supported(ciphers, RTE_DIM(ciphers)) != 0) || + (xform_type == RTE_CRYPTO_SYM_XFORM_AUTH && + check_auth_capabilities_supported(auths, RTE_DIM(auths)) != 0) || + (xform_type == RTE_CRYPTO_SYM_XFORM_AEAD && + check_aead_capabilities_supported(aeads, RTE_DIM(aeads)) != 0)) { + RTE_LOG(INFO, USER1, "Capability requirements for NxA4/5/6 " + "testsuite not met\n"); + return TEST_SKIPPED; + } + + return 0; +} + +static int +nea_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_CIPHER); +} + +static int +nia_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AUTH); +} + +static int +nca_testsuite_setup(void) +{ + return nxan_testsuite_setup(RTE_CRYPTO_SYM_XFORM_AEAD); +} + +static int +test_NEA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + uint8_t *input, *output; + uint32_t pad_len; + uint32_t len; + bool is_enc = (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT); + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + tdata->cipher_algo, tdata->key, 32, 16); + if (retval != 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + pad_len = RTE_ALIGN_CEIL(len, 8); + input = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + pad_len); + memcpy(input, is_enc ? tdata->plaintext : tdata->ciphertext, len); + debug_hexdump(stdout, "input:", input, len); + + /* Create operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv, + 16, RTE_ALIGN_CEIL(tdata->msg_size, 8), 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 1, 0, 1, + 16); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); + + ut_params->obuf = ut_params->op->sym->m_dst; + if (ut_params->obuf) + output = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *); + else + output = input; + + debug_hexdump(stdout, "output:", output, len); + const uint8_t *reference_output = + is_enc ? tdata->ciphertext : tdata->plaintext; + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + output, + reference_output, + tdata->msg_size, + "Output data not as expected"); + return 0; +} + +static int +test_NIA_helper(const void *td) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + const struct nxa_256_test_data *tdata = td; + + int retval; + uint32_t plaintext_pad_len; + uint32_t plaintext_len; + uint8_t *plaintext; + + if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) + return TEST_SKIPPED; + + /* Create auth session */ + retval = create_wireless_algo_hash_session(ts_params->valid_devs[0], + tdata->key, 32, + 16, tdata->tag_size >> 3, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->auth_algo); + if (retval != 0) + return retval; + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->msg_size); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext, plaintext_len); + + /* Create auth operation */ + retval = create_wireless_algo_hash_operation(tdata->tag, + tdata->tag_size >> 3, + tdata->iv, 16, + plaintext_pad_len, + RTE_CRYPTO_AUTH_OP_VERIFY, + tdata->msg_size, + 0); + if (retval != 0) + return retval; + + if (global_api_test_type == CRYPTODEV_RAW_API_TEST) { + retval = process_sym_raw_dp_op(ts_params->valid_devs[0], 0, ut_params->op, 0, 1, 1, + 0); + if (retval != TEST_SUCCESS) + return retval; + } else + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + TEST_ASSERT_NOT_NULL(ut_params->op, "Crypto request failed"); + ut_params->obuf = ut_params->op->sym->m_src; + ut_params->digest = rte_pktmbuf_mtod_offset(ut_params->obuf, + uint8_t *, + plaintext_pad_len); + + /* Validate obuf */ + if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS) + return 0; + else + return -1; + + return 0; +} + +static int +test_NCA_helper( + const struct nxa_256_test_data *tdata, + enum rte_crypto_cipher_operation op) +{ + struct aead_test_data aead_tdata = { + .algo = tdata->aead_algo, + .key = { + .len = 32, + }, + .iv = { + .len = 16, + }, + .aad = { + .data = (uint8_t *)(uintptr_t)tdata->aad, + .len = tdata->aad_size >> 3, + }, + .plaintext = { + .len = tdata->msg_size >> 3, + }, + .ciphertext = { + .len = tdata->msg_size >> 3, + }, + .auth_tag = { + .len = tdata->tag_size >> 3, + }, + }; + + memcpy(aead_tdata.key.data, tdata->key, 32); + memcpy(aead_tdata.iv.data, tdata->iv, 16); + memcpy(aead_tdata.plaintext.data, tdata->plaintext, + tdata->msg_size >> 3); + memcpy(aead_tdata.ciphertext.data, tdata->ciphertext, + tdata->msg_size >> 3); + memcpy(aead_tdata.auth_tag.data, tdata->tag, + tdata->tag_size >> 3); + + if (op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) + return test_authenticated_encryption_helper(&aead_tdata, false); + else + return test_authenticated_decryption_helper(&aead_tdata, false); +} + + +static int test_case_NEA_encrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} + +static int test_case_NEA_decrypt(const void *tdata) +{ + return test_NEA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NEA4_testsuite = { + .suite_name = "256 NEA4 (SNOW 5G) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea4_test_3), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA5_testsuite = { + .suite_name = "256 NEA5 (AES 256) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea5_test_5), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NEA6_testsuite = { + .suite_name = "256 NEA6 (ZUC 256) Test Suite", + .setup = nea_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_encrypt, &nea6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NEA_decrypt, &nea6_test_7), + + TEST_CASES_END() + } +}; + + +static struct unit_test_suite cryptodev_256_NIA4_testsuite = { + .suite_name = "256 NIA4 (SNOW 5G) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia4_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA5_testsuite = { + .suite_name = "256 NIA5 (AES 256) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia5_test_7), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NIA6_testsuite = { + .suite_name = "256 NIA6 (ZUC 256) Test Suite", + .setup = nia_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_NIA_helper, &nia6_test_7), + + TEST_CASES_END() + } +}; + + +static int test_case_NCA_encrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_ENCRYPT); +} + +static int test_case_NCA_decrypt(const void *tdata) +{ + return test_NCA_helper(tdata, RTE_CRYPTO_CIPHER_OP_DECRYPT); +} + +static struct unit_test_suite cryptodev_256_NCA4_testsuite = { + .suite_name = "256 NCA4 (SNOW 5G) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca4_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca4_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA5_testsuite = { + .suite_name = "256 NCA5 (AES 256) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca5_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca5_test_10), + + TEST_CASES_END() + } +}; + +static struct unit_test_suite cryptodev_256_NCA6_testsuite = { + .suite_name = "256 NCA6 (ZUC 256) Test Suite", + .setup = nca_testsuite_setup, + .unit_test_cases = { + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_1), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_2), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_3), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_4), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_5), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_6), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_7), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_8), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_9), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_encrypt, &nca6_test_10), + TEST_CASE_WITH_DATA(ut_setup, ut_teardown, + test_case_NCA_decrypt, &nca6_test_10), + + TEST_CASES_END() + } +}; + static int run_cryptodev_testsuite(const char *pmd_name) { @@ -19901,6 +20479,15 @@ run_cryptodev_testsuite(const char *pmd_name) &cryptodev_negative_hmac_sha1_testsuite, &cryptodev_gen_testsuite, &cryptodev_sm4_gcm_testsuite, + &cryptodev_256_NEA4_testsuite, + &cryptodev_256_NEA5_testsuite, + &cryptodev_256_NEA6_testsuite, + &cryptodev_256_NIA4_testsuite, + &cryptodev_256_NIA5_testsuite, + &cryptodev_256_NIA6_testsuite, + &cryptodev_256_NCA4_testsuite, + &cryptodev_256_NCA5_testsuite, + &cryptodev_256_NCA6_testsuite, #ifdef RTE_LIB_SECURITY &ipsec_proto_testsuite, &pdcp_proto_testsuite, diff --git a/app/test/test_cryptodev_nxan_test_vectors.h b/app/test/test_cryptodev_nxan_test_vectors.h new file mode 100644 index 0000000000..3299752c49 --- /dev/null +++ b/app/test/test_cryptodev_nxan_test_vectors.h @@ -0,0 +1,2006 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Intel Corporation + */ + +#ifndef TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ + +#define MAX_DATA_SZ 1024 +struct nxa_256_test_data { + uint8_t key[32]; + uint8_t iv[16]; + uint8_t plaintext[MAX_DATA_SZ]; + uint8_t ciphertext[MAX_DATA_SZ]; + uint8_t aad[MAX_DATA_SZ]; + uint8_t tag[MAX_DATA_SZ]; + size_t msg_size; + size_t aad_size; + size_t tag_size; + enum rte_crypto_cipher_algorithm cipher_algo; + enum rte_crypto_auth_algorithm auth_algo; + enum rte_crypto_aead_algorithm aead_algo; +}; + +static const +struct nxa_256_test_data nea4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x95, 0xce, 0x19, 0x61, 0xb4, 0x94, 0x12, 0x73, + 0xfb, 0xd9, 0x2d, 0xcc, 0x74, 0x57, 0xd4, 0xeb, + 0xbe, 0x88, 0x25, 0x2c, 0x71, 0x9b, 0xcb, 0x6c, + 0x06, 0x30, 0xcf, 0x0d, 0xc3, 0x8c, 0x5b, 0x7e, + 0x80, 0xbf, 0x72, 0x3a, 0x85, 0x19, 0xcd, 0xaa, + 0xf2, 0xa5, 0xf5, 0x16, 0x63, 0x43, 0x5a, 0x0a, + 0x83, 0x31, 0xd8, 0xda, 0xae, 0x90, 0xbe, 0xde, + 0xa9, 0x48, 0x81, 0x5f, 0xb8, 0x90, 0x6f, 0xef + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_2 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x04, 0xe9, 0xa5, 0x46, 0x90, 0xad, 0xbc, 0xb4, + 0xfb, 0x67, 0x7d, 0xcc, 0xe0, 0x91, 0x06, 0xdb, + 0xda, 0x7d, 0x33, 0x22, 0xb3, 0x62, 0x7c, 0x9b, + 0x25, 0x93, 0xc5, 0x53, 0x6a, 0xb5, 0xbf, 0x3d, + 0x47, 0xee, 0xa6, 0x5f, 0xbe, 0x98, 0x79, 0x56, + 0x2a, 0xb1, 0x35, 0xec, 0x41, 0x11, 0x49, 0x73, + 0x41, 0x5e, 0x60, 0xd9, 0x5a, 0x75, 0xd5, 0xc4, + 0xf3, 0xc1, 0x56, 0x1b, 0xf3, 0x0f, 0xb8, 0x37 + + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; +static const +struct nxa_256_test_data nea4_test_3 = { + .key = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x13, + 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, 0x1b, + 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0xff + }, + .iv = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe + }, + .plaintext = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .ciphertext = { + 0x8e, 0x64, 0xfd, 0x7e, 0x60, 0x90, 0x0f, 0xa2, + 0x39, 0x8b, 0xe4, 0xdd, 0xe6, 0xc6, 0xe6, 0x2f, + 0xeb, 0xc2, 0xad, 0x0f, 0x00, 0x31, 0xa8, 0x5c, + 0xa1, 0xfd, 0xfd, 0x6e, 0xc1, 0x23, 0x02, 0x5e, + 0x5c, 0x3f, 0xed, 0x82, 0x88, 0xc7, 0x13, 0x29, + 0x00, 0x32, 0x04, 0xe7, 0xce, 0x73, 0xe1, 0x4e, + 0x93, 0xec, 0x4e, 0x33, 0x06, 0xfb, 0xc4, 0xd9, + 0xc4, 0x66, 0x24, 0x1a, 0x8c, 0x83, 0xa8, 0xb6 + }, + .msg_size = 512, + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW5G_NEA4 +}; + +static const +struct nxa_256_test_data nea5_test_1 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xc9, 0x7b, 0x0d, 0x60, 0x90, 0x4a, 0x00, 0xf7, + 0xcd, 0x97, 0x11, 0xc0, 0x14, 0x1d, 0x75, 0xf9, + 0x46, 0x73 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x88, 0x3a, 0x10 + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0xe2 + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; +static const +struct nxa_256_test_data nea5_test_5 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xf2, 0x9d, 0x7a, 0x59, 0xef, 0x2d, 0x20, 0xd2, + 0x05, 0xf2, 0x26, 0x11, 0xb3, 0xe2, 0x11, 0x34, + 0x8a, 0xcf, 0x36, 0x84, 0x82, 0x85, 0x23, 0xde, + 0x0e, 0x4c, 0xed, 0x02, 0x46, 0x4c, 0x8a, 0x0e, + 0xc8, 0x0c, 0xfa, 0x62, 0x21, 0x10, 0xf7, 0xcd, + 0xfe, 0xcd, 0x12, 0x9f, 0x4b, 0x21, 0xe6, 0x2a, + 0x21, 0x2a, 0x92, 0x1a, 0xdd, 0xbb, 0xdf, 0x9c, + 0x90, 0x0f, 0xfe, 0xd4, 0x3a, 0xe7, 0xd4, 0x35, + 0x91, 0x84, 0x36, 0xdb, 0xad, 0x5f, 0x5a, 0x1e, + 0x2c, 0x36, 0x5f, 0xb5, 0x4a, 0xec, 0xef, 0x3a, + 0x4e, 0x07, 0x74, 0x60, 0x4c, 0x85, 0x51, 0x4b, + 0x15, 0x89, 0x92, 0xab, 0x01, 0xe1, 0xa4, 0xd1, + 0x2d, 0x20, 0x35, 0x72, 0x61, 0x0c, 0x9c, 0x35, + 0x93, 0xa1, 0x6e, 0x1f, 0x43, 0xd9, 0x8e, 0x00, + 0x47, 0x35, 0x65, 0x5a, 0xaf + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_AES_NEA5 +}; + +static const +struct nxa_256_test_data nea6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x4b + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x00, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0xd9, 0xfb, 0xa3, 0xd0, 0xa1, 0x11, 0x5b, 0xbf, + 0xf0, 0x9c, 0xce, 0x2d, 0x9a, 0xed, 0x36, 0xe6, + 0x58, 0xb6 + }, + .msg_size = 144, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x4f, 0x62, 0x4d + }, + .msg_size = 24, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x18, 0xd4, 0xbd, 0xf2 + }, + .msg_size = 32, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x7b, 0x04, 0xb7, 0x9e, 0x13, 0x06, 0x09, 0x2f, + 0xbe, 0x51, 0x06, 0x00, 0xb4, 0x3e, 0xd4, 0xc6, + 0xfb, 0x0b, 0xc9, 0x2f, 0x6f, 0xc6, 0xe0, 0x2b, + 0x78, 0xba, 0xd0 + }, + .msg_size = 216, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xd7, 0x05, 0xa6, 0xd4, 0x13, 0x20, 0xe5, 0x16, + 0xa4, 0x9f, 0x81, 0x9a, 0xec, 0xb9, 0x2f, 0x36, + 0x16, 0xfa, 0x5d, 0x4e, 0x08, 0x8f, 0xf2, 0x5e, + 0xa8, 0x31, 0x4e, 0xba, 0xe6, 0x1b, 0xef, 0x74, + 0x01, 0x97, 0xe2, 0x36, 0xaf, 0xd6, 0x5c, 0x96, + 0x15, 0x6f, 0xff, 0xcb, 0x0b, 0xc7, 0xbe, 0x13, + 0x6e, 0x36, 0xb1, 0x4e, 0x50, 0xbe, 0xc3, 0x8e, + 0xc2, 0x38, 0x84, 0xb4, 0xb3, 0xef, 0xe5, 0x9d, + 0x0c, 0xfc, 0x04, 0x49, 0x14, 0xee, 0x1e, 0x02, + 0x59, 0xd8, 0xa3, 0xa7, 0xc8, 0x71, 0x15, 0xba, + 0x99, 0xed, 0x15, 0x41, 0xb2, 0x6a, 0x32, 0x04, + 0x29, 0x81, 0x6d, 0x51, 0xeb, 0x02, 0x14, 0xfa, + 0x52, 0x87, 0xd2, 0xb2, 0xc4, 0x20, 0x2f, 0x7f, + 0x0a, 0x92, 0xba, 0x7e, 0xf4, 0x40, 0x58, 0xc9, + 0x76, 0x48, 0x85, 0x2f, 0xd0 + }, + .msg_size = 936, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; +static const +struct nxa_256_test_data nea6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x00, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xde + }, + .msg_size = 8, + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_NEA6 +}; + +static const +struct nxa_256_test_data nca4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xeb, 0xc1, 0xd9, 0x5b + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6d + }, + .tag = { + 0x7a, 0x68, 0x38, 0x39, 0x4f + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x8c, 0x13, 0xb7, 0x96, 0x19, 0x4d, 0x9b, 0x31, + 0x6a, 0xfd, 0xec, 0xb8, 0x85, 0x9e, 0xde, 0x17, + 0x0c, 0x48 + }, + .tag = { + 0xb1, 0xdb, 0xd0, 0x49, 0x08, 0xa4 + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x92, 0xc5, 0x1f, 0xcb, 0x05, 0x32, 0x73 + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x12, 0x51, 0x09, 0x66, 0xf7, 0xe0, 0x3b, 0x9b + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x1c, 0xb0, 0x8d + }, + .tag = { + 0xda, 0x40, 0xa9, 0x7b, 0x53, 0x05, 0x0b, 0x29, + 0x8b + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x14, 0x74, 0x3c, 0x3b + }, + .tag = { + 0xa5, 0x61, 0xab, 0xb6, 0x52, 0x41, 0x7e, 0x92, + 0x3d, 0x20, 0x01, 0x67 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x97, 0xc1, 0x14, 0x6b, 0x1c, 0x89, 0x4a, 0x72, + 0x37, 0xf8, 0x32, 0x63, 0x17, 0x54, 0xa3, 0x9c, + 0x11, 0x5d, 0xc5, 0x8e, 0x7c, 0xa4, 0xc6, 0xe4, + 0x38, 0x7e, 0x34 + }, + .tag = { + 0xdf, 0x29, 0x89, 0xb9, 0xe2, 0x52, 0x72, 0x52, + 0x09, 0x58, 0xcb, 0x96, 0xc7, 0x8b, 0x0b + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x5c, 0x5e, 0x96, 0xc4, 0x7b, 0xec, 0xe5, 0x14, + 0x78, 0xb0, 0xd9, 0xd7, 0xe1, 0xff, 0x6a, 0xcd, + 0x1a, 0xea, 0x25, 0xb1, 0x3e, 0xb1, 0xd8, 0x24, + 0x10, 0x34, 0xb3, 0x4e, 0x6e, 0x40, 0xa3, 0x24, + 0x9d, 0x48, 0xda, 0xe2, 0xa8, 0xe1, 0xe7, 0x98, + 0x52, 0xc2, 0xd9, 0x53, 0x2b, 0xd4, 0xf6, 0xd8, + 0x11, 0x2c, 0xac, 0x4a, 0x9e, 0xa6, 0x98, 0xb7, + 0x57, 0x98, 0xc6, 0xef, 0xae, 0xad, 0xfc, 0x0a, + 0x3c, 0x89, 0x42, 0x48, 0x2b, 0x30, 0x96, 0x63, + 0x55, 0x6a, 0x06, 0x95, 0x33, 0x7d, 0xfd, 0x0f, + 0xb7, 0x18, 0x5d, 0xfe, 0x66, 0xc5, 0x5e, 0xac, + 0x03, 0x09, 0x50, 0x47, 0xf0, 0xb6, 0xa2, 0x5c, + 0x60, 0x4c, 0x64, 0x97, 0x35, 0x17, 0xb0, 0x80, + 0xba, 0x2a, 0x74, 0xb0, 0x20, 0x02, 0x52, 0x37, + 0x01, 0x57, 0xb7, 0x84, 0x62 + }, + .tag = { + 0xa3, 0x3b, 0xa7, 0xce, 0xf5, 0x2a, 0xb4, 0xaf, + 0x9d, 0x77, 0x57, 0xfb, 0x0b, 0xd7, 0xf9, 0xa2 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; +static const +struct nxa_256_test_data nca4_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x7f, 0xaf, 0x63, 0x22, 0x11, 0x54, 0xc7, 0x39, + 0x36, 0x85, 0x71, 0x7e, 0x66, 0x9f, 0xa1, 0x04 + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_SNOW5G_NCA4 +}; + +static const +struct nxa_256_test_data nca5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xa3, 0xb4, 0xcc, 0x5a + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x8e + }, + .tag = { + 0x7a, 0x4d, 0xf4, 0xfa, 0xfe + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x33, 0xea, 0x02, 0x6d, 0x31, 0x56, 0x43, 0x5f, + 0x1b, 0x76, 0x10, 0x78, 0x1a, 0x89, 0x5e, 0xae, + 0x22, 0x2d + }, + .tag = { + 0xfa, 0xb6, 0x68, 0x6d, 0xde, 0xec + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x39, 0x42, 0x19, 0x6a, 0x9b, 0x26, 0xfa + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x77, 0xcd, 0xb5, 0x38, 0xb9, 0xc3, 0xbe, 0x40 + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0xfe, 0xd2, 0xc8 + }, + .tag = { + 0x54, 0x9c, 0xd3, 0x1e, 0x80, 0xa8, 0x86, 0xd2, + 0xe4 + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0x6a, 0xdc, 0x2f, 0xc2 + }, + .tag = { + 0x94, 0xc4, 0x40, 0x68, 0x2d, 0xf0, 0x79, 0x9e, + 0x04, 0x5e, 0x81, 0xc0 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x35, 0xfa, 0x39, 0xbd, 0xe2, 0xa5, 0xe5, 0x29, + 0x44, 0x3e, 0xb2, 0x41, 0xf4, 0x1f, 0xe0, 0x4f, + 0x68, 0x5c, 0x06, 0xd1, 0xd4, 0x28, 0x7b, 0x19, + 0x19, 0xa4, 0x37 + }, + .tag = { + 0x8d, 0xd1, 0x0c, 0x6e, 0xf6, 0xd7, 0x60, 0xaf, + 0x98, 0xf8, 0x9e, 0x56, 0x9f, 0xfa, 0xf9 + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0xb9, 0x37, 0x77, 0x79, 0xb8, 0x88, 0xbe, 0x53, + 0x7f, 0x4e, 0xf2, 0x76, 0x57, 0x37, 0xb3, 0x0e, + 0xb7, 0x0f, 0xd9, 0x8a, 0x71, 0x07, 0x92, 0xf3, + 0x37, 0xc1, 0x9a, 0x5d, 0x62, 0x64, 0xc3, 0xa8, + 0xbd, 0xa2, 0xcc, 0xc6, 0x23, 0xca, 0xaa, 0x4b, + 0x67, 0xfe, 0xe8, 0x0d, 0xc9, 0xd9, 0x7d, 0x21, + 0x1a, 0x39, 0x62, 0xd6, 0x8a, 0xde, 0xf2, 0x41, + 0x35, 0xab, 0x4b, 0x34, 0xad, 0x1b, 0x16, 0xca, + 0x00, 0xa6, 0x81, 0x03, 0xa7, 0x1b, 0x4d, 0x32, + 0x42, 0x9c, 0x17, 0x8d, 0xb9, 0xdc, 0x17, 0x52, + 0xe9, 0x13, 0xd6, 0x97, 0xaa, 0xf7, 0xff, 0x30, + 0xda, 0x7e, 0x25, 0x48, 0xdd, 0x34, 0xf0, 0x95, + 0x6d, 0xdd, 0x3c, 0xd6, 0xdb, 0xc6, 0xd5, 0x8e, + 0x6f, 0x98, 0x2e, 0xe4, 0x9b, 0xb2, 0x9e, 0x93, + 0xc7, 0xf2, 0x3b, 0x31, 0x15 + }, + .tag = { + 0x6d, 0xc9, 0xc0, 0x7a, 0xd7, 0x66, 0xa6, 0x36, + 0xba, 0x0a, 0xcd, 0xb5, 0x54, 0x2e, 0x0c, 0x90 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; +static const +struct nxa_256_test_data nca5_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0xff + }, + .tag = { + 0x9d, 0x44, 0x14, 0xbe, 0x90, 0x93, 0xe9, 0x6f, + 0xee, 0x81, 0x80, 0x84, 0x71, 0x11, 0x3d, 0xaa + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_AES_NCA5 +}; + +static const +struct nxa_256_test_data nca6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0xe0, 0xa4, 0x71, 0x85 + }, + .msg_size = 0, + .aad_size = 0, + .tag_size = 32, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_2 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x2c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x00 + }, + .ciphertext = { + 0x6b + }, + .tag = { + 0x13, 0x64, 0xe2, 0xce, 0xc8 + }, + .msg_size = 8, + .aad_size = 0, + .tag_size = 40, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_3 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x34, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { 0 }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .ciphertext = { + 0x70, 0x21, 0x0f, 0x9f, 0xef, 0x3f, 0x2f, 0xab, + 0xe4, 0x23, 0xf4, 0x4a, 0xed, 0x17, 0x7b, 0x61, + 0xc1, 0x21 + }, + .tag = { + 0x91, 0x7b, 0xda, 0xca, 0x6f, 0x1f + }, + .msg_size = 144, + .aad_size = 0, + .tag_size = 48, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_4 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 + }, + .iv = { + 0x3c, 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x00 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x0c, 0x6d, 0xf0, 0x21, 0x3a, 0xf1, 0xbb + }, + .msg_size = 0, + .aad_size = 8, + .tag_size = 56, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_5 = { + .key = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 + }, + .iv = { + 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { 0 }, + .ciphertext = { 0 }, + .tag = { + 0x6d, 0x08, 0xa4, 0xd3, 0x17, 0x55, 0x46, 0x2a + }, + .msg_size = 0, + .aad_size = 168, + .tag_size = 64, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_6 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x4c, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .ciphertext = { + 0x96, 0x1a, 0x27 + }, + .tag = { + 0x30, 0x5f, 0x4f, 0x2e, 0xd5, 0xaf, 0x47, 0x52, + 0xde + }, + .msg_size = 24, + .aad_size = 168, + .tag_size = 72, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_7 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x64, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .ciphertext = { + 0xbf, 0xdb, 0xae, 0x6d + }, + .tag = { + 0x5a, 0x83, 0xce, 0x08, 0x4b, 0x14, 0xec, 0x43, + 0xd9, 0xd8, 0xa5, 0x23 + }, + .msg_size = 32, + .aad_size = 168, + .tag_size = 96, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_8 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x7c, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x20, 0x21 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .ciphertext = { + 0x08, 0x4e, 0x9f, 0x77, 0x8b, 0xaa, 0xb8, 0xe5, + 0x95, 0x4a, 0xa6, 0xa9, 0x3c, 0x9b, 0x36, 0x28, + 0xba, 0x83, 0xe1, 0x10, 0x5b, 0xf2, 0x0e, 0x66, + 0xc1, 0xa3, 0x5e + }, + .tag = { + 0x26, 0x0f, 0x6b, 0x0c, 0x46, 0x1c, 0x58, 0x88, + 0x85, 0xb3, 0x7c, 0x15, 0xb5, 0xfd, 0x0f + }, + .msg_size = 216, + .aad_size = 216, + .tag_size = 120, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_9 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xc5, 0x99, 0xd5, 0xe9, 0x80, 0xb2, 0xea, 0xc9, + 0xcc, 0x53, 0xbf, 0x67, 0xd6, 0xbf, 0x14, 0xd6, + 0x7e, 0x2d, 0xdc, 0x8e, 0x66, 0x83, 0xef, 0x57, + 0x49, 0x5c, 0x0a, 0xa3, 0xdb, 0x56, 0xf0, 0xb1, + 0xb3, 0x0d, 0x49, 0x6b, 0x74, 0x38, 0xbf, 0x62, + 0xc2, 0xfa, 0xba, 0xf2, 0xd6, 0xb7, 0xde, 0xb9, + 0x22, 0x25, 0xd5, 0x4e, 0x38, 0xa6, 0x4e, 0x30, + 0xe8, 0xd5, 0x45, 0xfd, 0xa8, 0x5e, 0x85, 0xe5, + 0x3a, 0x14, 0x6c, 0x5d, 0x88, 0x3d, 0xef, 0x18, + 0xd3, 0x30, 0xdd, 0x33, 0x0c, 0x23, 0x68, 0xb0, + 0x82, 0x3e, 0xe1, 0x25, 0xbe, 0xf4, 0xc3, 0xb5, + 0xab, 0x92, 0xf3, 0x40, 0xfb, 0x18, 0x46, 0xd7, + 0xc5, 0x49, 0x44, 0x73, 0x73, 0xfe, 0x2c, 0xe6, + 0xdb + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .ciphertext = { + 0x66, 0x65, 0x43, 0x94, 0x0f, 0xe1, 0xe9, 0x23, + 0x6a, 0x51, 0xca, 0xb3, 0x27, 0x71, 0x95, 0x3c, + 0x3d, 0x31, 0x5a, 0x2e, 0x67, 0x1b, 0x1e, 0x14, + 0x9c, 0x3a, 0x67, 0x1f, 0x6c, 0xf8, 0xf3, 0x88, + 0x49, 0x9f, 0xa1, 0xcc, 0x83, 0x03, 0xeb, 0x2c, + 0x55, 0x5a, 0x62, 0xde, 0x8c, 0x58, 0xf2, 0x74, + 0xe4, 0x12, 0x93, 0x1b, 0xd6, 0x6e, 0xaf, 0xbc, + 0x3b, 0x77, 0xc0, 0xbd, 0x66, 0x32, 0xab, 0xfb, + 0xb3, 0xde, 0x93, 0xf6, 0xeb, 0xe8, 0x73, 0x7e, + 0x64, 0x15, 0xfd, 0x8c, 0x99, 0xa7, 0x55, 0x7f, + 0xfd, 0xf7, 0x56, 0x9c, 0x57, 0x60, 0x7e, 0xf2, + 0x45, 0x79, 0x22, 0x75, 0x00, 0x94, 0xc6, 0x12, + 0x23, 0xce, 0x37, 0x30, 0xb7, 0x34, 0x4c, 0xae, + 0x3f, 0xa3, 0x6c, 0xa9, 0xaf, 0xdc, 0xde, 0x9f, + 0x17, 0x92, 0x38, 0xc5, 0x8d + }, + .tag = { + 0xd5, 0xf2, 0xa1, 0xf0, 0xb6, 0xfb, 0xa9, 0x9a, + 0xa6, 0x0e, 0x2f, 0x47, 0xe2, 0xcb, 0xf6, 0x93 + }, + .msg_size = 936, + .aad_size = 840, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; +static const +struct nxa_256_test_data nca6_test_10 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x84, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .aad = { + 0xff, 0xff + }, + .plaintext = { + 0xff + }, + .ciphertext = { + 0x36 + }, + .tag = { + 0xdd, 0x44, 0xa6, 0x6d, 0xdc, 0xab, 0x6c, 0x5b, + 0x9e, 0x37, 0xb0, 0x0b, 0x90, 0xfd, 0x55, 0x5b + }, + .msg_size = 8, + .aad_size = 16, + .tag_size = 128, + .aead_algo = RTE_CRYPTO_AEAD_ZUC_NCA6 +}; + +static const +struct nxa_256_test_data nia4_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x51, 0x52, 0x9f, 0xd4, 0xe2 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xbd, 0x58, 0xee, 0x93, 0x3b, 0xc2 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0xa7, 0x24, 0xc3, 0x2a, 0xc2, 0xfa, 0xcc, 0x07, + 0xf8 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0xf9, 0xf3, 0x4a, 0x5f, 0x60, 0x91, 0x7b, 0xce, + 0xaa, 0xd2, 0x4d, 0x25 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x7f, 0xfd, 0xa9, 0xcf, 0xd0, 0x61, 0x69, 0xfe, + 0xd6, 0x81, 0x3a, 0x98, 0x92, 0x0a, 0x8c + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x1f, 0x45, 0xbe, 0xc7, 0x87, 0x6f, 0xe9, 0xb8, + 0x4e, 0x3d, 0x2a, 0x54, 0xb1, 0x48, 0x6d, 0xcb + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; +static const +struct nxa_256_test_data nia4_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x27, 0x12, 0x54, 0x32, 0xfd, 0xfe, 0xc3, 0x6e, + 0x4f, 0xf5, 0x92, 0x0f, 0x03, 0x3e, 0xbc, 0x4c + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_SNOW5G_NIA4 +}; + +static const +struct nxa_256_test_data nia5_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0xa8, 0x10, 0x5e, 0xcb, 0x39 + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0xc1, 0x62, 0xae, 0x89, 0x98, 0xb6 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7d, 0x5a, 0xbe, 0xe6, 0x94, 0x3c, 0x8f, 0x9b, + 0x39 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x2d, 0x6b, 0x7a, 0xcd, 0x65, 0x4d, 0x81, 0xf4, + 0xbe, 0x7c, 0xe0, 0xaf + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xed, 0xa3, 0xe4, 0x27, 0xbe, 0x6e, 0xec, + 0xb4, 0x4b, 0xaa, 0x82, 0x63, 0x2b, 0x26 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x0c, 0x1a, 0xd0, 0xb8, 0x93, 0x47, 0x21, 0xe7, + 0x35, 0x68, 0x7a, 0x61, 0x9b, 0x57, 0x44, 0x80 + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; +static const +struct nxa_256_test_data nia5_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0xbf, 0x1e, 0xfb, 0x63, 0xee, 0xbd, 0x4d, 0xe8, + 0xc0, 0xed, 0x21, 0x30, 0xc5, 0xce, 0xc8, 0x12 + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_AES_NIA5 +}; + +static const +struct nxa_256_test_data nia6_test_1 = { + .key = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x28, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x00 + }, + .tag = { + 0x41, 0x53, 0x90, 0x61, 0xeb + }, + .msg_size = 8, + .tag_size = 40, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_2 = { + .key = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .iv = { + 0x30, 0x1c, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12 + }, + .tag = { + 0x96, 0x19, 0x76, 0xe0, 0xcf, 0xc7 + }, + .msg_size = 144, + .tag_size = 48, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_3 = { + .key = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x48, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00 + }, + .tag = { + 0x7e, 0x36, 0xa9, 0x9c, 0xa0, 0xf0, 0x08, 0x06, + 0xd5 + }, + .msg_size = 24, + .tag_size = 72, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_4 = { + .key = { + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 + }, + .iv = { + 0x60, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff, 0xff, 0x00, 0xff + }, + .tag = { + 0x40, 0x47, 0x33, 0x1b, 0xb8, 0xf0, 0x40, 0xea, + 0x8f, 0xf0, 0x8f, 0x12 + }, + .msg_size = 32, + .tag_size = 96, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_5 = { + .key = { + 0x1f, 0x2f, 0x3f, 0x4f, 0x5f, 0x6f, 0x7f, 0x8f, + 0x9f, 0xaf, 0xbf, 0xcf, 0xdf, 0xef, 0xff, 0x0f, + 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0x2f, 0x4f, 0x6f, + 0x8f, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }, + .iv = { + 0x78, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0xaa, 0xab, 0xac, + 0xad, 0xae, 0xaf + }, + .tag = { + 0x5a, 0xa2, 0xa1, 0x06, 0x52, 0x4c, 0xd3, 0x5b, + 0x0a, 0xab, 0x10, 0xe8, 0x04, 0x28, 0x19 + }, + .msg_size = 216, + .tag_size = 120, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_6 = { + .key = { + 0x64, 0xe7, 0xf9, 0xa3, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x28, 0x29, 0x23, 0xbe, 0x84, 0xe1, 0x6c, + 0x37, 0xab, 0x2e, 0x7f, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xf6, 0x9e, 0x7d, 0x49, 0xdc, 0xad, 0x4f, 0x14, + 0xf2, 0x44, 0x40, 0x66, 0xd0, 0x6b, 0xc4, 0x30, + 0xb7, 0x32, 0x3b, 0xa1, 0x22, 0xf6, 0x22, 0x91, + 0x9d, 0xe1, 0x8b, 0x1f, 0xda, 0xb0, 0xca, 0x99, + 0x02, 0xb9, 0x72, 0x9d, 0x49, 0x2c, 0x80, 0x7e, + 0xbf, 0x38, 0x11, 0xac, 0x94, 0x21, 0x58, 0x0c, + 0x19, 0xe6, 0x53, 0x7f, 0xd1, 0xca, 0xc6, 0x0b, + 0xbc, 0x9b, 0xd4, 0x9a, 0x2c, 0x3a, 0x6f, 0x9f, + 0xd4, 0x58, 0x13, 0xfc, 0x22, 0x7e, 0xb4, 0x24, + 0xcf, 0x50, 0xf5, 0x7c, 0xb4, 0x12, 0x9a, 0x08, + 0xdf, 0x6b, 0x40, 0x43, 0xe6, 0x69, 0x4b, 0x4e, + 0x7b, 0xc6, 0x21, 0x4d, 0x41, 0x6a, 0x96, 0x0f, + 0xde, 0x30, 0xa6, 0xed, 0x52, 0xed, 0x6a, 0xf4, + 0x87, 0xaf, 0x45, 0x46, 0x28, 0x42, 0x5f, 0xbd, + 0xb7, 0xf9, 0x54, 0xd2, 0xda + }, + .tag = { + 0x94, 0x3d, 0xff, 0xe6, 0xb2, 0xae, 0xec, 0x35, + 0x04, 0x89, 0x67, 0x26, 0xdb, 0x2d, 0xad, 0x9c + }, + .msg_size = 936, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; +static const +struct nxa_256_test_data nia6_test_7 = { + .key = { + 0xdc, 0xe0, 0x01, 0xa5, 0xef, 0x61, 0x7d, 0x7e, + 0x6c, 0xff, 0x9f, 0x64, 0x19, 0x1c, 0x1f, 0xa3, + 0x5c, 0x95, 0x32, 0x30, 0xa6, 0x22, 0x82, 0x99, + 0x9e, 0xe6, 0x77, 0x3a, 0x7c, 0x44, 0xb5, 0xb4 + }, + .iv = { + 0x80, 0x35, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, + 0x01, 0x23, 0x45, 0x67, 0x00, 0x00, 0x00, 0x00 + }, + .plaintext = { + 0xff + }, + .tag = { + 0x3e, 0x2b, 0x31, 0x33, 0x9b, 0x02, 0x85, 0x15, + 0x5a, 0x7a, 0x32, 0xe5, 0xca, 0x0a, 0x6b, 0x9b + }, + .msg_size = 8, + .tag_size = 128, + .auth_algo = RTE_CRYPTO_AUTH_ZUC_NIA6 +}; + +#endif /* TEST_CRYPTODEV_NXAN_TEST_VECTORS_H_ */ -- 2.52.0 ^ permalink raw reply related [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v8 2/2] test/crypto: add tests for 256-NxA4/5/6 algorithms 2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau @ 2026-02-03 14:00 ` Nithinsen Kaithakadan 0 siblings, 0 replies; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-02-03 14:00 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Acked-by: Nithinsen Kaithakadan <nkaithakadan@marvell.com> > -----Original Message----- > From: Radu Nicolau <radu.nicolau@intel.com> > Sent: Tuesday, February 3, 2026 4:43 PM > To: dev@dpdk.org > Cc: Nithinsen Kaithakadan <nkaithakadan@marvell.com>; kai.ji@intel.com; > Anoob Joseph <anoobj@marvell.com>; stephen@networkplumber.org; Radu > Nicolau <radu.nicolau@intel.com>; Akhil Goyal <gakhil@marvell.com>; Fan > Zhang <fanzhang.oss@gmail.com> > Subject: [EXTERNAL] [PATCH v8 2/2] test/crypto: add tests for 256-NxA4/5/6 > algorithms > > Add test vectors and test cases for 256-NxA4/5/6 algorithms Signed-off-by: > Radu Nicolau <radu. nicolau@ intel. com> --- v8: add line breaks > app/test/test_cryptodev. c | 587 ++++++ > app/test/test_cryptodev_nxan_test_vectors. h | 2006 > +++++++++++++++++++ > ZjQcmQRYFpfptBannerStart > Prioritize security for external emails: > Confirm sender and content safety before clicking links or opening > attachments > <https://us-phishalarm- > ewt.proofpoint.com/EWT/v1/CRVmXkqW!ti3Z1f8UYnWa9G- > cmf06D3nsrB_xzWvPpqTOZfxaG_iwIZwXnYMAAqQiFFSc7jz3Fch4SxDwJ3rjBF > 53T3moLRBuA-1AxcTPQX--$> > Report Suspicious > > ZjQcmQRYFpfptBannerEnd > Add test vectors and test cases for 256-NxA4/5/6 algorithms > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> ^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v8 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau @ 2026-02-03 13:59 ` Nithinsen Kaithakadan 2026-02-06 19:48 ` Akhil Goyal 2 siblings, 0 replies; 27+ messages in thread From: Nithinsen Kaithakadan @ 2026-02-03 13:59 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Akhil Goyal, Fan Zhang Acked-by: Nithinsen Kaithakadan <nkaithakadan@marvell.com> > -----Original Message----- > From: Radu Nicolau <radu.nicolau@intel.com> > Sent: Tuesday, February 3, 2026 4:43 PM > To: dev@dpdk.org > Cc: Nithinsen Kaithakadan <nkaithakadan@marvell.com>; kai.ji@intel.com; > Anoob Joseph <anoobj@marvell.com>; stephen@networkplumber.org; Radu > Nicolau <radu.nicolau@intel.com>; Akhil Goyal <gakhil@marvell.com>; Fan > Zhang <fanzhang.oss@gmail.com> > Subject: [EXTERNAL] [PATCH v8 1/2] cryptodev: add support for 256- > NxA4/5/6 algorithms > > Add support for NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and > AEAD modes ETSI TS 135 240 / 3GPP TS 35. 240 NEA5, NIA5, NCA5: AES 256 > confidentiality, integrity and AEAD modes ETSI TS 135 244 / 3GPP TS 35. 244 > NEA6, NIA6, NCA6: ZUC 256 ZjQcmQRYFpfptBannerStart Prioritize security > for external emails: > Confirm sender and content safety before clicking links or opening > attachments <https://us-phishalarm- > ewt.proofpoint.com/EWT/v1/CRVmXkqW!ti3Z1f8UYnWa9G- > cmf06D3nsrB_xzWvPpsTOZfxaG_hGAWBLiLnWSDplvW7UhErQAVq_dfB_RBJ > WA8QUeaT4l15BpWQNVWuSjAr-$> > Report Suspicious > > ZjQcmQRYFpfptBannerEnd > Add support for > > NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes ETSI > TS 135 240 / 3GPP TS 35.240 > > NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes ETSI TS > 135 244 / 3GPP TS 35.244 > > NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes ETSI TS > 135 246 / 3GPP TS 35.246 > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> ^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: [EXTERNAL] [PATCH v8 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau 2026-02-03 13:59 ` [EXTERNAL] [PATCH v8 1/2] cryptodev: add support " Nithinsen Kaithakadan @ 2026-02-06 19:48 ` Akhil Goyal 2 siblings, 0 replies; 27+ messages in thread From: Akhil Goyal @ 2026-02-06 19:48 UTC (permalink / raw) To: Radu Nicolau, dev@dpdk.org Cc: Nithinsen Kaithakadan, kai.ji@intel.com, Anoob Joseph, stephen@networkplumber.org, Fan Zhang > Add support for > > NEA4, NIA4, NCA4: Snow 5G confidentiality, integrity and AEAD modes > ETSI TS 135 240 / 3GPP TS 35.240 > > NEA5, NIA5, NCA5: AES 256 confidentiality, integrity and AEAD modes > ETSI TS 135 244 / 3GPP TS 35.244 > > NEA6, NIA6, NCA6: ZUC 256 confidentiality, integrity and AEAD modes > ETSI TS 135 246 / 3GPP TS 35.246 > > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Series Acked-by: Akhil Goyal <gakhil@marvell.com> Applied to dpdk-next-crypto Added release notes. ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2026-02-06 19:48 UTC | newest] Thread overview: 27+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-07 10:56 [PATCH 1/2] cryptodev: add support for 256-NxA4/5/6 algorithms Radu Nicolau 2026-01-07 10:56 ` [PATCH 2/2] test/crypto: add tests " Radu Nicolau 2026-01-19 8:12 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-01-19 11:28 ` [PATCH v2 1/2] cryptodev: add support " Radu Nicolau 2026-01-19 11:28 ` [PATCH v2 2/2] test/crypto: add tests " Radu Nicolau 2026-01-19 17:05 ` Stephen Hemminger 2026-01-21 10:18 ` [PATCH v3 1/2] cryptodev: add support " Radu Nicolau 2026-01-21 10:18 ` [PATCH v3 2/2] test/crypto: add tests " Radu Nicolau 2026-01-21 15:15 ` [PATCH v4 1/2] cryptodev: add support " Radu Nicolau 2026-01-21 15:15 ` [PATCH v4 2/2] test/crypto: add tests " Radu Nicolau 2026-01-22 7:02 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-01-22 10:25 ` [PATCH v5 1/2] cryptodev: add support " Radu Nicolau 2026-01-22 10:25 ` [PATCH v5 2/2] test/crypto: add tests " Radu Nicolau 2026-01-23 0:23 ` [PATCH v5 1/2] cryptodev: add support " Stephen Hemminger 2026-01-23 10:44 ` Radu Nicolau 2026-01-23 12:48 ` [PATCH v6 " Radu Nicolau 2026-01-23 12:48 ` [PATCH v6 2/2] test/crypto: add tests " Radu Nicolau 2026-01-29 4:29 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-01-29 11:59 ` [PATCH v7 1/2] cryptodev: add support " Radu Nicolau 2026-01-29 11:59 ` [PATCH v7 2/2] test/crypto: add tests " Radu Nicolau 2026-01-30 11:12 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-02-03 11:21 ` Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 1/2] cryptodev: add support " Radu Nicolau 2026-02-03 11:13 ` [PATCH v8 2/2] test/crypto: add tests " Radu Nicolau 2026-02-03 14:00 ` [EXTERNAL] " Nithinsen Kaithakadan 2026-02-03 13:59 ` [EXTERNAL] [PATCH v8 1/2] cryptodev: add support " Nithinsen Kaithakadan 2026-02-06 19:48 ` Akhil Goyal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox