summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-02 06:41:16 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-06 22:26:49 +0200
commit681f540da52bfa2a86b283d05191af597842ab8a (patch)
treec245d7458b9bee8151b09debc960b36c44ed836b /test
parentacf8616901b54af120758360488f72718f651768 (diff)
downloaddpdk-681f540da52bfa2a86b283d05191af597842ab8a.zip
dpdk-681f540da52bfa2a86b283d05191af597842ab8a.tar.gz
dpdk-681f540da52bfa2a86b283d05191af597842ab8a.tar.xz
cryptodev: do not use AAD in wireless algorithms
For wireless algorithms (SNOW3G, KASUMI, ZUC), the IV for the authentication algorithms (F9, UIA2 and EIA3) was taken from the AAD parameter, as there was no IV parameter in the authentication structure. Now that IV is available for all algorithms, there is need to keep doing this, so AAD is not used for these algorithms anymore. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_cryptodev.c418
-rw-r--r--test/test/test_cryptodev_kasumi_hash_test_vectors.h18
-rw-r--r--test/test/test_cryptodev_kasumi_test_vectors.h22
-rw-r--r--test/test/test_cryptodev_perf.c20
-rw-r--r--test/test/test_cryptodev_snow3g_hash_test_vectors.h16
-rw-r--r--test/test/test_cryptodev_snow3g_test_vectors.h26
-rw-r--r--test/test/test_cryptodev_zuc_test_vectors.h40
7 files changed, 227 insertions, 333 deletions
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5bd55c7..b2026fb 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -1775,7 +1775,7 @@ test_AES_chain_armv8_all(void)
static int
create_wireless_algo_hash_session(uint8_t dev_id,
const uint8_t *key, const uint8_t key_len,
- const uint8_t aad_len, const uint8_t auth_len,
+ const uint8_t iv_len, const uint8_t auth_len,
enum rte_crypto_auth_operation op,
enum rte_crypto_auth_algorithm algo)
{
@@ -1796,7 +1796,8 @@ create_wireless_algo_hash_session(uint8_t dev_id,
ut_params->auth_xform.auth.key.length = key_len;
ut_params->auth_xform.auth.key.data = hash_key;
ut_params->auth_xform.auth.digest_length = auth_len;
- ut_params->auth_xform.auth.add_auth_data_length = aad_len;
+ ut_params->auth_xform.auth.iv.offset = IV_OFFSET;
+ ut_params->auth_xform.auth.iv.length = iv_len;
ut_params->sess = rte_cryptodev_sym_session_create(dev_id,
&ut_params->auth_xform);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
@@ -1904,9 +1905,9 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
enum rte_crypto_auth_operation auth_op,
enum rte_crypto_auth_algorithm auth_algo,
enum rte_crypto_cipher_algorithm cipher_algo,
- const uint8_t *key, const uint8_t key_len,
- const uint8_t aad_len, const uint8_t auth_len,
- uint8_t iv_len)
+ const uint8_t *key, uint8_t key_len,
+ uint8_t auth_iv_len, uint8_t auth_len,
+ uint8_t cipher_iv_len)
{
uint8_t cipher_auth_key[key_len];
@@ -1925,7 +1926,9 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
/* Hash key = cipher key */
ut_params->auth_xform.auth.key.data = cipher_auth_key;
ut_params->auth_xform.auth.digest_length = auth_len;
- ut_params->auth_xform.auth.add_auth_data_length = aad_len;
+ /* Auth IV will be after cipher IV */
+ ut_params->auth_xform.auth.iv.offset = IV_OFFSET + cipher_iv_len;
+ ut_params->auth_xform.auth.iv.length = auth_iv_len;
/* Setup Cipher Parameters */
ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
@@ -1936,7 +1939,7 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.key.data = cipher_auth_key;
ut_params->cipher_xform.cipher.key.length = key_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
- ut_params->cipher_xform.cipher.iv.length = iv_len;
+ ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
TEST_HEXDUMP(stdout, "key:", key, key_len);
@@ -1961,9 +1964,9 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
struct crypto_unittest_params *ut_params = &unittest_params;
const uint8_t *key = tdata->key.data;
- const uint8_t aad_len = tdata->aad.len;
const uint8_t auth_len = tdata->digest.len;
- uint8_t iv_len = tdata->iv.len;
+ uint8_t cipher_iv_len = tdata->cipher_iv.len;
+ uint8_t auth_iv_len = tdata->auth_iv.len;
memcpy(cipher_auth_key, key, key_len);
@@ -1977,7 +1980,9 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
/* Hash key = cipher key */
ut_params->auth_xform.auth.key.data = cipher_auth_key;
ut_params->auth_xform.auth.digest_length = auth_len;
- ut_params->auth_xform.auth.add_auth_data_length = aad_len;
+ /* Auth IV will be after cipher IV */
+ ut_params->auth_xform.auth.iv.offset = IV_OFFSET + cipher_iv_len;
+ ut_params->auth_xform.auth.iv.length = auth_iv_len;
/* Setup Cipher Parameters */
ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
@@ -1988,7 +1993,7 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.key.data = cipher_auth_key;
ut_params->cipher_xform.cipher.key.length = key_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
- ut_params->cipher_xform.cipher.iv.length = iv_len;
+ ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
TEST_HEXDUMP(stdout, "key:", key, key_len);
@@ -2018,8 +2023,8 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
enum rte_crypto_auth_algorithm auth_algo,
enum rte_crypto_cipher_algorithm cipher_algo,
const uint8_t *key, const uint8_t key_len,
- const uint8_t aad_len, const uint8_t auth_len,
- uint8_t iv_len)
+ uint8_t auth_iv_len, uint8_t auth_len,
+ uint8_t cipher_iv_len)
{
uint8_t auth_cipher_key[key_len];
@@ -2035,7 +2040,9 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
ut_params->auth_xform.auth.key.length = key_len;
ut_params->auth_xform.auth.key.data = auth_cipher_key;
ut_params->auth_xform.auth.digest_length = auth_len;
- ut_params->auth_xform.auth.add_auth_data_length = aad_len;
+ /* Auth IV will be after cipher IV */
+ ut_params->auth_xform.auth.iv.offset = IV_OFFSET + cipher_iv_len;
+ ut_params->auth_xform.auth.iv.length = auth_iv_len;
/* Setup Cipher Parameters */
ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
@@ -2045,7 +2052,7 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.key.data = auth_cipher_key;
ut_params->cipher_xform.cipher.key.length = key_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
- ut_params->cipher_xform.cipher.iv.length = iv_len;
+ ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
TEST_HEXDUMP(stdout, "key:", key, key_len);
@@ -2060,19 +2067,16 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
static int
create_wireless_algo_hash_operation(const uint8_t *auth_tag,
- const unsigned auth_tag_len,
- const uint8_t *aad, const unsigned aad_len,
- unsigned data_pad_len,
+ unsigned int auth_tag_len,
+ const uint8_t *iv, unsigned int iv_len,
+ unsigned int data_pad_len,
enum rte_crypto_auth_operation op,
- enum rte_crypto_auth_algorithm algo,
- const unsigned auth_len, const unsigned auth_offset)
+ unsigned int auth_len, unsigned int auth_offset)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- unsigned aad_buffer_len;
-
/* Generate Crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -2087,32 +2091,9 @@ create_wireless_algo_hash_operation(const uint8_t *auth_tag,
/* set crypto operation source mbuf */
sym_op->m_src = ut_params->ibuf;
- /* aad */
- /*
- * Always allocate the aad up to the block size.
- * The cryptodev API calls out -
- * - the array must be big enough to hold the AAD, plus any
- * space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G).
- */
- if (algo == RTE_CRYPTO_AUTH_KASUMI_F9)
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
- else
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 16);
- sym_op->auth.aad.data = (uint8_t *)rte_pktmbuf_prepend(
- ut_params->ibuf, aad_buffer_len);
- TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
- "no room to prepend aad");
- sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
- ut_params->ibuf);
- sym_op->auth.aad.length = aad_len;
-
- memset(sym_op->auth.aad.data, 0, aad_buffer_len);
- rte_memcpy(sym_op->auth.aad.data, aad, aad_len);
-
- TEST_HEXDUMP(stdout, "aad:",
- sym_op->auth.aad.data, aad_len);
-
+ /* iv */
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
/* digest */
sym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append(
ut_params->ibuf, auth_tag_len);
@@ -2121,7 +2102,7 @@ create_wireless_algo_hash_operation(const uint8_t *auth_tag,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
sym_op->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(
- ut_params->ibuf, data_pad_len + aad_len);
+ ut_params->ibuf, data_pad_len);
sym_op->auth.digest.length = auth_tag_len;
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
@@ -2140,27 +2121,22 @@ create_wireless_algo_hash_operation(const uint8_t *auth_tag,
static int
create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata,
- enum rte_crypto_auth_operation op,
- enum rte_crypto_auth_algorithm auth_algo)
+ enum rte_crypto_auth_operation op)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
const uint8_t *auth_tag = tdata->digest.data;
const unsigned int auth_tag_len = tdata->digest.len;
- const uint8_t *aad = tdata->aad.data;
- const uint8_t aad_len = tdata->aad.len;
unsigned int plaintext_len = ceil_byte_length(tdata->plaintext.len);
unsigned int data_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);
- const uint8_t *iv = tdata->iv.data;
- const uint8_t iv_len = tdata->iv.len;
+ const uint8_t *cipher_iv = tdata->cipher_iv.data;
+ const uint8_t cipher_iv_len = tdata->cipher_iv.len;
+ const uint8_t *auth_iv = tdata->auth_iv.data;
+ const uint8_t auth_iv_len = tdata->auth_iv.len;
const unsigned int cipher_len = tdata->validCipherLenInBits.len;
- const unsigned int cipher_offset = 0;
const unsigned int auth_len = tdata->validAuthLenInBits.len;
- const unsigned int auth_offset = tdata->aad.len << 3;
-
- unsigned int aad_buffer_len;
/* Generate Crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
@@ -2194,37 +2170,17 @@ create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata,
sym_op->auth.digest.data,
sym_op->auth.digest.length);
- /* aad */
- /*
- * Always allocate the aad up to the block size.
- * The cryptodev API calls out -
- * - the array must be big enough to hold the AAD, plus any
- * space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G).
- */
- if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9)
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
- else
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 16);
- sym_op->auth.aad.data =
- (uint8_t *)rte_pktmbuf_prepend(
- ut_params->ibuf, aad_buffer_len);
- TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
- "no room to prepend aad");
- sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
- ut_params->ibuf);
- sym_op->auth.aad.length = aad_len;
- memset(sym_op->auth.aad.data, 0, aad_buffer_len);
- rte_memcpy(sym_op->auth.aad.data, aad, aad_len);
- TEST_HEXDUMP(stdout, "aad:", sym_op->auth.aad.data, aad_len);
+ /* Copy cipher and auth IVs at the end of the crypto operation */
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op, uint8_t *,
+ IV_OFFSET);
+ rte_memcpy(iv_ptr, cipher_iv, cipher_iv_len);
+ iv_ptr += cipher_iv_len;
+ rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
- /* iv */
- rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
- iv, iv_len);
sym_op->cipher.data.length = cipher_len;
- sym_op->cipher.data.offset = cipher_offset + auth_offset;
+ sym_op->cipher.data.offset = 0;
sym_op->auth.data.length = auth_len;
- sym_op->auth.data.offset = auth_offset + cipher_offset;
+ sym_op->auth.data.offset = 0;
return 0;
}
@@ -2234,26 +2190,22 @@ create_zuc_cipher_hash_generate_operation(
const struct wireless_test_data *tdata)
{
return create_wireless_cipher_hash_operation(tdata,
- RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_ZUC_EIA3);
+ RTE_CRYPTO_AUTH_OP_GENERATE);
}
static int
create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
const unsigned auth_tag_len,
- const uint8_t *aad, const uint8_t aad_len,
+ const uint8_t *auth_iv, uint8_t auth_iv_len,
unsigned data_pad_len,
enum rte_crypto_auth_operation op,
- enum rte_crypto_auth_algorithm auth_algo,
- const uint8_t *iv, const uint8_t iv_len,
+ const uint8_t *cipher_iv, uint8_t cipher_iv_len,
const unsigned cipher_len, const unsigned cipher_offset,
const unsigned auth_len, const unsigned auth_offset)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- unsigned aad_buffer_len;
-
/* Generate Crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -2286,33 +2238,13 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
sym_op->auth.digest.data,
sym_op->auth.digest.length);
- /* aad */
- /*
- * Always allocate the aad up to the block size.
- * The cryptodev API calls out -
- * - the array must be big enough to hold the AAD, plus any
- * space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G).
- */
- if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9)
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
- else
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 16);
- sym_op->auth.aad.data =
- (uint8_t *)rte_pktmbuf_prepend(
- ut_params->ibuf, aad_buffer_len);
- TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
- "no room to prepend aad");
- sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
- ut_params->ibuf);
- sym_op->auth.aad.length = aad_len;
- memset(sym_op->auth.aad.data, 0, aad_buffer_len);
- rte_memcpy(sym_op->auth.aad.data, aad, aad_len);
- TEST_HEXDUMP(stdout, "aad:", sym_op->auth.aad.data, aad_len);
+ /* Copy cipher and auth IVs at the end of the crypto operation */
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op, uint8_t *,
+ IV_OFFSET);
+ rte_memcpy(iv_ptr, cipher_iv, cipher_iv_len);
+ iv_ptr += cipher_iv_len;
+ rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
- /* iv */
- rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
- iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = cipher_offset + auth_offset;
sym_op->auth.data.length = auth_len;
@@ -2322,19 +2254,16 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
}
static int
-create_wireless_algo_auth_cipher_operation(const unsigned auth_tag_len,
- const uint8_t *iv, const uint8_t iv_len,
- const uint8_t *aad, const uint8_t aad_len,
- unsigned data_pad_len,
- const unsigned cipher_len, const unsigned cipher_offset,
- const unsigned auth_len, const unsigned auth_offset,
- enum rte_crypto_auth_algorithm auth_algo)
+create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
+ const uint8_t *cipher_iv, uint8_t cipher_iv_len,
+ const uint8_t *auth_iv, uint8_t auth_iv_len,
+ unsigned int data_pad_len,
+ unsigned int cipher_len, unsigned int cipher_offset,
+ unsigned int auth_len, unsigned int auth_offset)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
- unsigned aad_buffer_len = 0;
-
/* Generate Crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -2366,33 +2295,13 @@ create_wireless_algo_auth_cipher_operation(const unsigned auth_tag_len,
sym_op->auth.digest.data,
sym_op->auth.digest.length);
- /* aad */
- /*
- * Always allocate the aad up to the block size.
- * The cryptodev API calls out -
- * - the array must be big enough to hold the AAD, plus any
- * space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI 16 bytes).
- */
- if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9)
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
- else
- aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 16);
- sym_op->auth.aad.data = (uint8_t *)rte_pktmbuf_prepend(
- ut_params->ibuf, aad_buffer_len);
- TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
- "no room to prepend aad");
- sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
- ut_params->ibuf);
- sym_op->auth.aad.length = aad_len;
- memset(sym_op->auth.aad.data, 0, aad_buffer_len);
- rte_memcpy(sym_op->auth.aad.data, aad, aad_len);
- TEST_HEXDUMP(stdout, "aad:",
- sym_op->auth.aad.data, aad_len);
+ /* Copy cipher and auth IVs at the end of the crypto operation */
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op, uint8_t *,
+ IV_OFFSET);
+ rte_memcpy(iv_ptr, cipher_iv, cipher_iv_len);
+ iv_ptr += cipher_iv_len;
+ rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
- /* iv */
- rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
- iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = auth_offset + cipher_offset;
@@ -2416,7 +2325,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata)
/* Create SNOW 3G session */
retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
+ tdata->auth_iv.len, tdata->digest.len,
RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_SNOW3G_UIA2);
if (retval < 0)
@@ -2438,11 +2347,10 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3));
+ 0);
if (retval < 0)
return retval;
@@ -2451,7 +2359,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata)
ut_params->obuf = ut_params->op->sym->m_src;
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -2477,7 +2385,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
/* Create SNOW 3G session */
retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
+ tdata->auth_iv.len, tdata->digest.len,
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_SNOW3G_UIA2);
if (retval < 0)
@@ -2499,12 +2407,11 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_hash_operation(tdata->digest.data,
tdata->digest.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len,
RTE_CRYPTO_AUTH_OP_VERIFY,
- RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3));
+ 0);
if (retval < 0)
return retval;
@@ -2513,7 +2420,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS)
@@ -2538,7 +2445,7 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata)
/* Create KASUMI session */
retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
+ tdata->auth_iv.len, tdata->digest.len,
RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_KASUMI_F9);
if (retval < 0)
@@ -2560,11 +2467,10 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3));
+ 0);
if (retval < 0)
return retval;
@@ -2573,7 +2479,7 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata)
ut_params->obuf = ut_params->op->sym->m_src;
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + ALIGN_POW2_ROUNDUP(tdata->aad.len, 8);
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -2599,7 +2505,7 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
/* Create KASUMI session */
retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
+ tdata->auth_iv.len, tdata->digest.len,
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_KASUMI_F9);
if (retval < 0)
@@ -2621,12 +2527,11 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_hash_operation(tdata->digest.data,
tdata->digest.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len,
RTE_CRYPTO_AUTH_OP_VERIFY,
- RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3));
+ 0);
if (retval < 0)
return retval;
@@ -2635,7 +2540,7 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
if (ut_params->op->status == RTE_CRYPTO_OP_STATUS_SUCCESS)
@@ -2801,7 +2706,7 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -2822,7 +2727,8 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata)
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->plaintext.len,
0);
if (retval < 0)
@@ -2877,7 +2783,7 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -2894,8 +2800,8 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->plaintext.len,
0);
if (retval < 0)
@@ -2942,7 +2848,7 @@ test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -2965,8 +2871,8 @@ test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->plaintext.len,
0);
if (retval < 0)
@@ -3020,7 +2926,7 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3039,8 +2945,8 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->plaintext.len,
0);
if (retval < 0)
@@ -3084,7 +2990,7 @@ test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3107,8 +3013,8 @@ test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->ciphertext.len,
0);
if (retval < 0)
@@ -3151,7 +3057,7 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3172,8 +3078,8 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->ciphertext.len,
0);
if (retval < 0)
@@ -3216,7 +3122,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3237,7 +3143,8 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata)
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0);
if (retval < 0)
@@ -3281,7 +3188,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3309,8 +3216,8 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0);
if (retval < 0)
@@ -3363,7 +3270,7 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3385,8 +3292,8 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data);
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0);
if (retval < 0)
@@ -3453,7 +3360,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3488,8 +3395,8 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata)
rte_hexdump(stdout, "plaintext:", plaintext, tdata->plaintext.len);
#endif
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
extra_offset);
if (retval < 0)
@@ -3544,7 +3451,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3565,7 +3472,8 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0);
if (retval < 0)
@@ -3606,7 +3514,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3637,8 +3545,8 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
- retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
- tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0);
if (retval < 0)
@@ -3725,8 +3633,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + tdata->aad.len;
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
else
ciphertext = plaintext;
@@ -3739,7 +3646,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
"ZUC Ciphertext data not as expected");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -3769,8 +3676,8 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
- tdata->iv.len);
+ tdata->auth_iv.len, tdata->digest.len,
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
@@ -3791,15 +3698,14 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
- tdata->digest.len, tdata->aad.data,
- tdata->aad.len, /*tdata->plaintext.len,*/
+ tdata->digest.len, tdata->auth_iv.data,
+ tdata->auth_iv.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_SNOW3G_UIA2,
- tdata->iv.data, tdata->iv.len,
+ tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3)
+ 0
);
if (retval < 0)
return retval;
@@ -3809,8 +3715,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + tdata->aad.len;
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
else
ciphertext = plaintext;
@@ -3823,7 +3728,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
"SNOW 3G Ciphertext data not as expected");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -3852,8 +3757,8 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
- tdata->iv.len);
+ tdata->auth_iv.len, tdata->digest.len,
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -3876,15 +3781,13 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
tdata->digest.len,
- tdata->iv.data, tdata->iv.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->cipher_iv.data, tdata->cipher_iv.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
0,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3),
- RTE_CRYPTO_AUTH_SNOW3G_UIA2
- );
+ 0);
if (retval < 0)
return retval;
@@ -3894,13 +3797,12 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + tdata->aad.len;
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
else
ciphertext = plaintext;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
@@ -3939,8 +3841,8 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
RTE_CRYPTO_AUTH_KASUMI_F9,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
- tdata->iv.len);
+ tdata->auth_iv.len, tdata->digest.len,
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
@@ -3961,14 +3863,13 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(tdata->digest.len,
- tdata->iv.data, tdata->iv.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->cipher_iv.data, tdata->cipher_iv.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
0,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3),
- RTE_CRYPTO_AUTH_KASUMI_F9
+ 0
);
if (retval < 0)
@@ -3979,8 +3880,7 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + tdata->aad.len;
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
else
ciphertext = plaintext;
@@ -3991,7 +3891,7 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
tdata->validCipherLenInBits.len,
"KASUMI Ciphertext data not as expected");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -4022,8 +3922,8 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
RTE_CRYPTO_AUTH_KASUMI_F9,
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
- tdata->iv.len);
+ tdata->auth_iv.len, tdata->digest.len,
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -4045,15 +3945,14 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
- tdata->digest.len, tdata->aad.data,
- tdata->aad.len,
+ tdata->digest.len, tdata->auth_iv.data,
+ tdata->auth_iv.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_KASUMI_F9,
- tdata->iv.data, tdata->iv.len,
+ tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->validCipherLenInBits.len,
0,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3)
+ 0
);
if (retval < 0)
return retval;
@@ -4063,13 +3962,12 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + tdata->aad.len;
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
else
ciphertext = plaintext;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + tdata->aad.len;
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@ -4113,7 +4011,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_ZUC_EEA3,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -4134,7 +4032,8 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
/* Create ZUC operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len,
tdata->plaintext.len,
0);
if (retval < 0)
@@ -4209,7 +4108,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_ZUC_EEA3,
tdata->key.data, tdata->key.len,
- tdata->iv.len);
+ tdata->cipher_iv.len);
if (retval < 0)
return retval;
@@ -4218,8 +4117,8 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data);
/* Create ZUC operation */
- retval = create_wireless_algo_cipher_operation(tdata->iv.data,
- tdata->iv.len, tdata->plaintext.len,
+ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
+ tdata->cipher_iv.len, tdata->plaintext.len,
0);
if (retval < 0)
return retval;
@@ -4273,7 +4172,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
/* Create ZUC session */
retval = create_wireless_algo_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
- tdata->aad.len, tdata->digest.len,
+ tdata->auth_iv.len, tdata->digest.len,
RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_ZUC_EIA3);
if (retval < 0)
@@ -4295,11 +4194,10 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
/* Create ZUC operation */
retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len,
- tdata->aad.data, tdata->aad.len,
+ tdata->auth_iv.data, tdata->auth_iv.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
- RTE_CRYPTO_AUTH_ZUC_EIA3,
tdata->validAuthLenInBits.len,
- (tdata->aad.len << 3));
+ 0);
if (retval < 0)
return retval;
@@ -4308,7 +4206,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
ut_params->obuf = ut_params->op->sym->m_src;
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
- + plaintext_pad_len + ALIGN_POW2_ROUNDUP(tdata->aad.len, 8);
+ + plaintext_pad_len;
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
diff --git a/test/test/test_cryptodev_kasumi_hash_test_vectors.h b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
index 63db9c4..61dbb09 100644
--- a/test/test/test_cryptodev_kasumi_hash_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ struct kasumi_hash_test_data {
struct {
uint8_t data[8];
unsigned len;
- } aad;
+ } auth_iv;
/* Includes message and DIRECTION (1 bit), plus 1 0*,
* with enough 0s, so total length is multiple of 64 bits */
@@ -71,7 +71,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_1 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49,
},
@@ -102,7 +102,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_2 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2,
},
@@ -134,7 +134,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_3 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A,
},
@@ -168,7 +168,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_4 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD
},
@@ -203,7 +203,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_5 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37,
},
@@ -247,7 +247,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_6 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x36, 0xAF, 0x61, 0x44, 0x4F, 0x30, 0x2A, 0xD2
},
@@ -288,7 +288,7 @@ struct kasumi_hash_test_data kasumi_hash_test_case_7 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49,
},
diff --git a/test/test/test_cryptodev_kasumi_test_vectors.h b/test/test/test_cryptodev_kasumi_test_vectors.h
index 6a7efb8..ee6ddef 100644
--- a/test/test/test_cryptodev_kasumi_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_test_vectors.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,13 +42,13 @@ struct kasumi_test_data {
struct {
uint8_t data[64] __rte_aligned(16);
unsigned len;
- } iv;
+ } cipher_iv;
/* Includes: COUNT (4 bytes) and FRESH (4 bytes) */
struct {
uint8_t data[8];
unsigned len;
- } aad;
+ } auth_iv;
struct {
uint8_t data[1024]; /* Data may include direction bit */
@@ -88,7 +88,7 @@ struct kasumi_test_data kasumi_test_case_1 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00
},
@@ -143,7 +143,7 @@ struct kasumi_test_data kasumi_test_case_2 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
},
@@ -188,13 +188,13 @@ struct kasumi_test_data kasumi_test_case_3 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
},
.len = 8
},
- .aad = {
+ .auth_iv = {
.data = {
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49
},
@@ -237,7 +237,7 @@ struct kasumi_test_data kasumi_test_case_4 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00,
},
@@ -274,7 +274,7 @@ struct kasumi_test_data kasumi_test_case_5 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
},
@@ -331,13 +331,13 @@ struct kasumi_test_data kasumi_test_case_6 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
},
.len = 8
},
- .aad = {
+ .auth_iv = {
.data = {
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49
},
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 8bd2e78..8805507 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -2704,10 +2704,12 @@ test_perf_create_snow3g_session(uint8_t dev_id, enum chain_mode chain,
auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
auth_xform.auth.algo = auth_algo;
- auth_xform.auth.add_auth_data_length = SNOW3G_CIPHER_IV_LENGTH;
auth_xform.auth.key.data = snow3g_hash_key;
auth_xform.auth.key.length = get_auth_key_max_length(auth_algo);
auth_xform.auth.digest_length = get_auth_digest_length(auth_algo);
+ /* Auth IV will be after cipher IV */
+ auth_xform.auth.iv.offset = IV_OFFSET + SNOW3G_CIPHER_IV_LENGTH;
+ auth_xform.auth.iv.length = SNOW3G_CIPHER_IV_LENGTH;
switch (chain) {
case CIPHER_HASH:
@@ -2969,10 +2971,6 @@ test_perf_set_crypto_op_snow3g(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.digest.phys_addr =
rte_pktmbuf_mtophys_offset(m, data_len);
op->sym->auth.digest.length = digest_len;
- op->sym->auth.aad.data = iv_ptr;
- op->sym->auth.aad.phys_addr = rte_crypto_op_ctophys_offset(op,
- IV_OFFSET);
- op->sym->auth.aad.length = SNOW3G_CIPHER_IV_LENGTH;
/* Data lengths/offsets Parameters */
op->sym->auth.data.offset = 0;
@@ -3017,11 +3015,16 @@ test_perf_set_crypto_op_snow3g_hash(struct rte_crypto_op *op,
unsigned data_len,
unsigned digest_len)
{
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op,
+ uint8_t *, IV_OFFSET);
+
if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
rte_crypto_op_free(op);
return NULL;
}
+ rte_memcpy(iv_ptr, snow3g_iv, SNOW3G_CIPHER_IV_LENGTH);
+
/* Authentication Parameters */
op->sym->auth.digest.data =
@@ -3031,13 +3034,6 @@ test_perf_set_crypto_op_snow3g_hash(struct rte_crypto_op *op,
rte_pktmbuf_mtophys_offset(m, data_len +
SNOW3G_CIPHER_IV_LENGTH);
op->sym->auth.digest.length = digest_len;
- op->sym->auth.aad.data = rte_crypto_op_ctod_offset(op,
- uint8_t *, IV_OFFSET);
- op->sym->auth.aad.phys_addr = rte_crypto_op_ctophys_offset(op,
- IV_OFFSET);
- op->sym->auth.aad.length = SNOW3G_CIPHER_IV_LENGTH;
- rte_memcpy(op->sym->auth.aad.data, snow3g_iv,
- SNOW3G_CIPHER_IV_LENGTH);
/* Data lengths/offsets Parameters */
op->sym->auth.data.offset = 0;
diff --git a/test/test/test_cryptodev_snow3g_hash_test_vectors.h b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
index e88e7ab..0bb274d 100644
--- a/test/test/test_cryptodev_snow3g_hash_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@ struct snow3g_hash_test_data {
struct {
uint8_t data[64];
unsigned len;
- } aad;
+ } auth_iv;
struct {
uint8_t data[2056];
@@ -67,7 +67,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_1 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
@@ -102,7 +102,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_2 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37,
0xA9, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0xF7, 0x37
@@ -147,7 +147,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_3 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37,
0xA9, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0xF7, 0x37
@@ -433,7 +433,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_4 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49,
0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49,
@@ -465,7 +465,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_5 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2,
0xBE, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0x58, 0xE2
@@ -498,7 +498,7 @@ struct snow3g_hash_test_data snow3g_hash_test_case_6 = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A,
0xB6, 0xAF, 0x61, 0x44, 0x98, 0x38, 0x70, 0x3A
diff --git a/test/test/test_cryptodev_snow3g_test_vectors.h b/test/test/test_cryptodev_snow3g_test_vectors.h
index 0c8ad1c..fed50dc 100644
--- a/test/test/test_cryptodev_snow3g_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_test_vectors.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2015 Intel Corporation. All rights reserved.
+ * Copyright(c) 2015-2017 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@ struct snow3g_test_data {
struct {
uint8_t data[64] __rte_aligned(16);
unsigned len;
- } iv;
+ } cipher_iv;
struct {
uint8_t data[1024];
@@ -69,7 +69,7 @@ struct snow3g_test_data {
struct {
uint8_t data[64];
unsigned len;
- } aad;
+ } auth_iv;
struct {
uint8_t data[64];
@@ -84,7 +84,7 @@ struct snow3g_test_data snow3g_test_case_1 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00,
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00
@@ -133,7 +133,7 @@ struct snow3g_test_data snow3g_test_case_1 = {
.validCipherLenInBits = {
.len = 800
},
- .aad = {
+ .auth_iv = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00,
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00
@@ -150,7 +150,7 @@ struct snow3g_test_data snow3g_test_case_2 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
@@ -189,7 +189,7 @@ struct snow3g_test_data snow3g_test_case_2 = {
.validCipherLenInBits = {
.len = 512
},
- .aad = {
+ .auth_iv = {
.data = {
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00
@@ -206,7 +206,7 @@ struct snow3g_test_data snow3g_test_case_3 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
@@ -233,7 +233,7 @@ struct snow3g_test_data snow3g_test_case_3 = {
.validCipherLenInBits = {
.len = 120
},
- .aad = {
+ .auth_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
@@ -257,7 +257,7 @@ struct snow3g_test_data snow3g_test_case_4 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00,
0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00
@@ -298,7 +298,7 @@ struct snow3g_test_data snow3g_test_case_5 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00,
0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00
@@ -357,14 +357,14 @@ struct snow3g_test_data snow3g_test_case_6 = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
diff --git a/test/test/test_cryptodev_zuc_test_vectors.h b/test/test/test_cryptodev_zuc_test_vectors.h
index 50fb538..a22e1ed 100644
--- a/test/test/test_cryptodev_zuc_test_vectors.h
+++ b/test/test/test_cryptodev_zuc_test_vectors.h
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@ struct wireless_test_data {
struct {
uint8_t data[64] __rte_aligned(16);
unsigned len;
- } iv;
+ } cipher_iv;
struct {
uint8_t data[2048];
@@ -69,7 +69,7 @@ struct wireless_test_data {
struct {
uint8_t data[64];
unsigned len;
- } aad;
+ } auth_iv;
struct {
uint8_t data[64];
@@ -84,7 +84,7 @@ static struct wireless_test_data zuc_test_case_cipher_193b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
@@ -125,7 +125,7 @@ static struct wireless_test_data zuc_test_case_cipher_800b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
@@ -184,7 +184,7 @@ static struct wireless_test_data zuc_test_case_cipher_1570b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00,
0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00
@@ -267,7 +267,7 @@ static struct wireless_test_data zuc_test_case_cipher_2798b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00,
0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00
@@ -388,7 +388,7 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00,
0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00
@@ -547,7 +547,7 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
@@ -578,7 +578,7 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
.validCipherLenInBits = {
.len = 200
},
- .aad = {
+ .auth_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
@@ -602,7 +602,7 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
@@ -651,7 +651,7 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
.validCipherLenInBits = {
.len = 800
},
- .aad = {
+ .auth_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
@@ -675,7 +675,7 @@ struct wireless_test_data zuc_test_case_auth_1b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -703,7 +703,7 @@ struct wireless_test_data zuc_test_case_auth_90b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x56, 0x1E, 0xB2, 0xDD, 0xA0, 0x00, 0x00, 0x00,
0x56, 0x1E, 0xB2, 0xDD, 0xA0, 0x00, 0x00, 0x00
@@ -734,7 +734,7 @@ struct wireless_test_data zuc_test_case_auth_577b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0xA9, 0x40, 0x59, 0xDA, 0x50, 0x00, 0x00, 0x00,
0x29, 0x40, 0x59, 0xDA, 0x50, 0x00, 0x80, 0x00
@@ -773,7 +773,7 @@ struct wireless_test_data zuc_test_case_auth_2079b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
@@ -835,7 +835,7 @@ struct wireless_test_data zuc_test_auth_5670b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x56, 0x1E, 0xB2, 0xDD, 0xE0, 0x00, 0x00, 0x00,
0x56, 0x1E, 0xB2, 0xDD, 0xE0, 0x00, 0x00, 0x00
@@ -950,7 +950,7 @@ static struct wireless_test_data zuc_test_case_auth_128b = {
.data = { 0x0 },
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = { 0x0 },
.len = 16
},
@@ -975,7 +975,7 @@ static struct wireless_test_data zuc_test_case_auth_2080b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
@@ -1037,7 +1037,7 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0xa9, 0x40, 0x59, 0xda, 0x50, 0x0, 0x0, 0x0,
0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0