From: Damian Nowak <damianx.nowak@intel.com>
To: dev@dpdk.org
Cc: fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com,
Damian Nowak <damianx.nowak@intel.com>
Subject: [dpdk-dev] [PATCH v2 05/10] test/crypto: add snow3g test cases for auth-cipher
Date: Fri, 7 Jun 2019 12:06:02 +0200 [thread overview]
Message-ID: <20190607100608.16212-6-damianx.nowak@intel.com> (raw)
In-Reply-To: <20190607100608.16212-1-damianx.nowak@intel.com>
This patch adds test cases for snow3g in-place
and out-of-place auth-cipher operations. Test
cases include buffer appended digest generation
with encryption and buffer decryption with
appended digest verification.
It also adds cases where digest is encrypted
only partially.
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
---
app/test/test_cryptodev.c | 281 +++++++++++++++++++++-----
app/test/test_cryptodev_snow3g_test_vectors.h | 167 ++++++++++++++-
2 files changed, 392 insertions(+), 56 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9f31aaa..08023a5 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2015-2017 Intel Corporation
+ * Copyright(c) 2015-2019 Intel Corporation
*/
#include <time.h>
@@ -40,7 +40,10 @@
#include "test_cryptodev_hmac_test_vectors.h"
#define VDEV_ARGS_SIZE 100
-#define MAX_NB_SESSIONS 4
+#define MAX_NB_SESSIONS 4
+
+#define IN_PLACE 0
+#define OUT_OF_PLACE 1
static int gbl_driver_id;
@@ -2814,7 +2817,8 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_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)
+ unsigned int auth_len, unsigned int auth_offset,
+ uint8_t op_mode)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2830,24 +2834,31 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
struct rte_crypto_sym_op *sym_op = ut_params->op->sym;
- /* set crypto operation source mbuf */
+ /* set crypto operation mbufs */
sym_op->m_src = ut_params->ibuf;
+ if (op_mode == OUT_OF_PLACE)
+ sym_op->m_dst = ut_params->obuf;
/* digest */
- sym_op->auth.digest.data = (uint8_t *) rte_pktmbuf_mtod_offset(
- ut_params->ibuf, uint8_t *, data_pad_len);
+ sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(
+ (op_mode == IN_PLACE ?
+ ut_params->ibuf : ut_params->obuf),
+ uint8_t *, data_pad_len);
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
- ut_params->ibuf, data_pad_len);
+ (op_mode == IN_PLACE ?
+ ut_params->ibuf : ut_params->obuf),
+ data_pad_len);
memset(sym_op->auth.digest.data, 0, auth_tag_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);
+ 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);
@@ -4312,90 +4323,166 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
"SNOW 3G Generated auth tag not as expected");
return 0;
}
+
static int
-test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
+test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
+ uint8_t op_mode, uint8_t verify)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
int retval;
- uint8_t *plaintext, *ciphertext;
- unsigned plaintext_pad_len;
- unsigned plaintext_len;
+ uint8_t *plaintext = NULL, *ciphertext = NULL;
+ unsigned int plaintext_pad_len;
+ unsigned int plaintext_len;
+ unsigned int ciphertext_pad_len;
+ unsigned int ciphertext_len;
+
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (op_mode == OUT_OF_PLACE) {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) {
+ printf("Device doesn't support digest encrypted.\n");
+ return -ENOTSUP;
+ }
+ }
/* Create SNOW 3G session */
- retval = create_wireless_algo_auth_cipher_session(ts_params->valid_devs[0],
- RTE_CRYPTO_CIPHER_OP_ENCRYPT,
- RTE_CRYPTO_AUTH_OP_GENERATE,
+ retval = create_wireless_algo_auth_cipher_session(
+ ts_params->valid_devs[0],
+ (verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT
+ : RTE_CRYPTO_CIPHER_OP_ENCRYPT),
+ (verify ? RTE_CRYPTO_AUTH_OP_VERIFY
+ : RTE_CRYPTO_AUTH_OP_GENERATE),
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->key.data, tdata->key.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);
+ if (op_mode == OUT_OF_PLACE)
+ ut_params->obuf = 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));
+ rte_pktmbuf_tailroom(ut_params->ibuf));
+ if (op_mode == OUT_OF_PLACE)
+ memset(rte_pktmbuf_mtod(ut_params->obuf, uint8_t *), 0,
+ rte_pktmbuf_tailroom(ut_params->obuf));
+ ciphertext_len = ceil_byte_length(tdata->ciphertext.len);
plaintext_len = ceil_byte_length(tdata->plaintext.len);
/* Append data which is padded to a multiple of */
/* the algorithms block size */
+ ciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);
plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);
- plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
- plaintext_pad_len);
- memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
+ if (verify) {
+ ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ ciphertext_pad_len);
+ memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
+ if (op_mode == OUT_OF_PLACE)
+ rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
+ debug_hexdump(stdout, "ciphertext:", ciphertext,
+ ciphertext_len);
+ } else {
+ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ plaintext_pad_len);
+ memcpy(plaintext, tdata->plaintext.data, plaintext_len);
+ if (op_mode == OUT_OF_PLACE)
+ rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
+ debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
+ }
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
- tdata->digest.offset_bytes == 0 ?
- plaintext_pad_len : tdata->digest.offset_bytes,
+ (tdata->digest.offset_bytes == 0 ?
+ (verify ? ciphertext_pad_len : plaintext_pad_len)
+ : tdata->digest.offset_bytes),
tdata->validCipherLenInBits.len,
tdata->cipher.offset_bits,
tdata->validAuthLenInBits.len,
- tdata->auth.offset_bits);
+ tdata->auth.offset_bits,
+ op_mode);
if (retval < 0)
return retval;
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_src;
- if (ut_params->obuf)
- ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);
- else
- ciphertext = plaintext;
- ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ ut_params->obuf = (op_mode == IN_PLACE ?
+ ut_params->op->sym->m_src : ut_params->op->sym->m_dst);
+
+ if (verify) {
+ if (ut_params->obuf)
+ plaintext = rte_pktmbuf_mtod(ut_params->obuf,
+ uint8_t *);
+ else
+ plaintext = ciphertext +
+ (tdata->cipher.offset_bits >> 3);
+
+ debug_hexdump(stdout, "plaintext:", plaintext,
+ (tdata->plaintext.len >> 3) - tdata->digest.len);
+ debug_hexdump(stdout, "plaintext expected:",
+ tdata->plaintext.data,
+ (tdata->plaintext.len >> 3) - tdata->digest.len);
+ } else {
+ if (ut_params->obuf)
+ ciphertext = rte_pktmbuf_mtod(ut_params->obuf,
+ uint8_t *);
+ else
+ ciphertext = plaintext;
+
+ debug_hexdump(stdout, "ciphertext:", ciphertext,
+ ciphertext_len);
+ debug_hexdump(stdout, "ciphertext expected:",
+ tdata->ciphertext.data, tdata->ciphertext.len >> 3);
+
+ ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ (tdata->digest.offset_bytes == 0 ?
- plaintext_pad_len : tdata->digest.offset_bytes);
+ plaintext_pad_len : tdata->digest.offset_bytes);
- debug_hexdump(stdout, "digest:", ut_params->digest, tdata->digest.len);
- debug_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
+ debug_hexdump(stdout, "digest:", ut_params->digest,
+ tdata->digest.len);
+ debug_hexdump(stdout, "digest expected:", tdata->digest.data,
+ tdata->digest.len);
+ }
/* Validate obuf */
- TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
- ciphertext,
- tdata->ciphertext.data,
- tdata->validDataLenInBits.len,
- "SNOW 3G Ciphertext data not as expected");
+ if (verify) {
+ TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+ plaintext,
+ tdata->plaintext.data,
+ tdata->plaintext.len >> 3,
+ "SNOW 3G Plaintext data not as expected");
+ } else {
+ TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+ ciphertext,
+ tdata->ciphertext.data,
+ tdata->validDataLenInBits.len,
+ "SNOW 3G Ciphertext data not as expected");
- /* Validate obuf */
- TEST_ASSERT_BUFFERS_ARE_EQUAL(
- ut_params->digest,
- tdata->digest.data,
- DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
- "SNOW 3G Generated auth tag not as expected");
+ TEST_ASSERT_BUFFERS_ARE_EQUAL(
+ ut_params->digest,
+ tdata->digest.data,
+ DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
+ "SNOW 3G Generated auth tag not as expected");
+ }
return 0;
}
@@ -4447,8 +4534,8 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
tdata->validCipherLenInBits.len,
tdata->validCipherOffsetInBits.len,
tdata->validAuthLenInBits.len,
- 0
- );
+ 0,
+ IN_PLACE);
if (retval < 0)
return retval;
@@ -5038,13 +5125,82 @@ test_snow3g_cipher_auth_test_case_1(void)
static int
test_snow3g_auth_cipher_test_case_1(void)
{
- return test_snow3g_auth_cipher(&snow3g_test_case_6);
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_test_case_2(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_2, IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_test_case_2_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_2, OUT_OF_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_part_digest_enc(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_partial_digest_encryption,
+ IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_part_digest_enc_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_partial_digest_encryption,
+ OUT_OF_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_verify_test_case_1(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_1, IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_test_case_2(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_2, IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_test_case_2_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_test_case_2, OUT_OF_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_part_digest_enc(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_partial_digest_encryption,
+ IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_part_digest_enc_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_partial_digest_encryption,
+ OUT_OF_PLACE, 1);
}
static int
test_snow3g_auth_cipher_with_digest_test_case_1(void)
{
- return test_snow3g_auth_cipher(&snow3g_test_case_7);
+ return test_snow3g_auth_cipher(
+ &snow3g_test_case_7, IN_PLACE, 0);
}
static int
@@ -8650,9 +8806,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
return 0;
}
-#define IN_PLACE 0
-#define OUT_OF_PLACE 1
-
static int
test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B(void)
{
@@ -9189,6 +9342,30 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1_oop),
+ /** SNOW 3G generate auth, then encrypt (UEA2) */
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_test_case_2_oop),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_part_digest_enc),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_part_digest_enc_oop),
+
+ /** SNOW 3G decrypt (UEA2), then verify auth */
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_test_case_2_oop),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_part_digest_enc),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_part_digest_enc_oop),
+
/** SNOW 3G decrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1),
@@ -9217,8 +9394,6 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_cipher_auth_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
- test_snow3g_auth_cipher_test_case_1),
- TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_auth_cipher_with_digest_test_case_1),
/** ZUC encrypt only (EEA3) */
diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h
index 3e55ac1..3abc037 100644
--- a/app/test/test_cryptodev_snow3g_test_vectors.h
+++ b/app/test/test_cryptodev_snow3g_test_vectors.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2015-2017 Intel Corporation
+ * Copyright(c) 2015-2019 Intel Corporation
*/
#ifndef TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_
@@ -59,6 +59,7 @@ struct snow3g_test_data {
unsigned int offset_bits;
} auth;
};
+
struct snow3g_test_data snow3g_test_case_1 = {
.key = {
.data = {
@@ -347,7 +348,8 @@ struct snow3g_test_data snow3g_test_case_5 = {
.len = 840
},
};
-struct snow3g_test_data snow3g_test_case_6 = {
+
+struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {
.key = {
.data = {
0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
@@ -415,7 +417,6 @@ struct snow3g_test_data snow3g_test_case_6 = {
},
};
-
struct snow3g_test_data snow3g_test_case_7 = {
.key = {
.data = {
@@ -508,4 +509,164 @@ struct snow3g_test_data snow3g_test_case_7 = {
},
};
+struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {
+ .key = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10
+
+ },
+ .len = 16
+ },
+ .cipher_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+ },
+ .len = 16
+ },
+ .auth_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x01, 0x02, 0x03, 0x04,
+
+ },
+ .len = 128 << 3
+ },
+ .ciphertext = {
+ .data = {
+ 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6,
+ 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47,
+ 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B,
+ 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C,
+ 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3,
+ 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05,
+ 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9,
+ 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77,
+ 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85,
+ 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4,
+ 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6,
+ 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D,
+ 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2,
+ 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46,
+ 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80,
+ 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA,
+
+ },
+ .len = 128 << 3
+ },
+ .cipher = {
+ .len_bits = 126 << 3,
+ .offset_bits = 2 << 3
+ },
+ .auth = {
+ .len_bits = 124 << 3,
+ .offset_bits = 0
+ },
+ .digest = {
+ .data = {
+ 0x7D, 0x27, 0xC6, 0xDA
+ },
+ .len = 4,
+ .offset_bytes = 124
+ },
+ .validDataLenInBits = {
+ .len = 128 << 3
+ },
+ .validCipherLenInBits = {
+ .len = 126 << 3
+ },
+ .validAuthLenInBits = {
+ .len = 124 << 3
+ },
+};
+
+struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
+ .key = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10
+
+ },
+ .len = 16
+ },
+ .cipher_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+ },
+ .len = 16
+ },
+ .auth_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A
+ },
+ .len = 32 << 3
+ },
+ .ciphertext = {
+ .data = {
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD,
+ 0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08,
+ 0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08
+ },
+ .len = 32 << 3
+ },
+ .cipher = {
+ .len_bits = 16 << 3,
+ .offset_bits = 14 << 3
+ },
+ .auth = {
+ .len_bits = 28 << 3,
+ .offset_bits = 0
+ },
+ .digest = {
+ .data = {
+ 0xB3, 0xBD, 0xC3, 0x08
+ },
+ .len = 4,
+ .offset_bytes = 28
+ },
+ .validDataLenInBits = {
+ .len = 32 << 3
+ },
+ .validCipherLenInBits = {
+ .len = 16 << 3
+ },
+ .validAuthLenInBits = {
+ .len = 28 << 3
+ },
+};
+
#endif /* TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_ */
--
2.7.4
next prev parent reply other threads:[~2019-06-07 10:10 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 14:50 [dpdk-dev] [PATCH 0/9] add QAT support for digest encrypted Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 1/9] crypto/qat: check buffer size for oop auth-cipher Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 2/9] test/crypto: add snow3g test cases for oop operation Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 3/9] test/crypto: add kasumi " Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 4/9] test/crypto: add sgl test cases for ip and oop Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 5/9] cryptodev: document usage of digest-appended operations Nowak
2019-06-04 9:11 ` Mcnamara, John
2019-06-03 14:50 ` [dpdk-dev] [PATCH 6/9] cryptodev: add digest encrypted feature flag Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 7/9] crypto/qat: " Nowak
2019-06-04 13:45 ` Trahe, Fiona
2019-06-03 14:50 ` [dpdk-dev] [PATCH 8/9] test/crypto: add digest encrypted feature flag check Nowak
2019-06-03 14:50 ` [dpdk-dev] [PATCH 9/9] test/crypto: return correct value if feature not supported Nowak
2019-06-04 13:16 ` [dpdk-dev] [PATCH 0/9] add QAT support for digest encrypted Trahe, Fiona
2019-06-07 10:05 ` [dpdk-dev] [PATCH v2 00/10] cryptodev: support encrypted-digest use-cases Damian Nowak
2019-06-07 10:05 ` [dpdk-dev] [PATCH v2 01/10] cryptodev: document usage of digest-appended operations Damian Nowak
2019-06-13 13:56 ` Trahe, Fiona
2019-06-07 10:05 ` [dpdk-dev] [PATCH v2 02/10] cryptodev: add digest encrypted feature flag Damian Nowak
2019-06-13 14:16 ` Trahe, Fiona
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 03/10] crypto/qat: handle buffer size for digest-encrypted auth-cipher Damian Nowak
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 04/10] crypto/qat: add digest encrypted feature flag Damian Nowak
2019-06-13 8:18 ` Akhil Goyal
2019-06-07 10:06 ` Damian Nowak [this message]
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 06/10] test/crypto: add kasumi test cases for auth-cipher Damian Nowak
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 07/10] test/crypto: add sgl test cases for ip and oop Damian Nowak
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 08/10] test/crypto: return correct value if feature not supported Damian Nowak
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 09/10] doc/crypto: document digest-encrypted limitations in qat Damian Nowak
2019-06-13 8:12 ` Akhil Goyal
2019-06-07 10:06 ` [dpdk-dev] [PATCH v2 10/10] doc: update release notes for 19.08 Damian Nowak
2019-06-13 8:14 ` Akhil Goyal
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 0/8] cryptodev: support encrypted-digest use-cases Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 1/8] cryptodev: document usage of digest-appended operations Damian Nowak
2019-07-03 16:13 ` De Lara Guarch, Pablo
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 2/8] cryptodev: add digest encrypted feature flag Damian Nowak
2019-07-03 16:14 ` De Lara Guarch, Pablo
2019-07-05 7:10 ` Akhil Goyal
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 3/8] crypto/qat: extend support for digest-encrypted auth-cipher Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 4/8] test/crypto: add snow3g test cases for auth-cipher Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 5/8] test/crypto: add zuc " Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 6/8] test/crypto: add kasumi " Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 7/8] test/crypto: add sgl test cases for ip and oop Damian Nowak
2019-07-03 11:15 ` [dpdk-dev] [PATCH v3 8/8] test/crypto: return correct value if feature not supported Damian Nowak
2019-07-03 15:28 ` [dpdk-dev] [PATCH v3 0/8] cryptodev: support encrypted-digest use-cases Trahe, Fiona
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190607100608.16212-6-damianx.nowak@intel.com \
--to=damianx.nowak@intel.com \
--cc=arkadiuszx.kusztal@intel.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).