Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54178/?format=api
http://patches.dpdk.org/api/patches/54178/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190603145048.2596-3-damianx.nowak@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190603145048.2596-3-damianx.nowak@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190603145048.2596-3-damianx.nowak@intel.com", "date": "2019-06-03T14:50:41", "name": "[2/9] test/crypto: add snow3g test cases for oop operation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7059d9ad8432e483e67ac8bfdeec9d651b537422", "submitter": { "id": 1184, "url": "http://patches.dpdk.org/api/people/1184/?format=api", "name": "Damian Nowak", "email": "damianx.nowak@intel.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190603145048.2596-3-damianx.nowak@intel.com/mbox/", "series": [ { "id": 4865, "url": "http://patches.dpdk.org/api/series/4865/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4865", "date": "2019-06-03T14:50:39", "name": "add QAT support for digest encrypted", "version": 1, "mbox": "http://patches.dpdk.org/series/4865/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54178/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54178/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C5FB61B99E;\n\tMon, 3 Jun 2019 16:54:19 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 947B71B965\n\tfor <dev@dpdk.org>; Mon, 3 Jun 2019 16:54:11 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 07:54:10 -0700", "from damiannx-mobl1.ger.corp.intel.com ([10.103.104.100])\n\tby fmsmga001.fm.intel.com with ESMTP; 03 Jun 2019 07:54:09 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Nowak <damianx.nowak@intel.com>", "To": "dev@dpdk.org", "Cc": "fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com,\n\tDamian Nowak <damianx.nowak@intel.com>", "Date": "Mon, 3 Jun 2019 16:50:41 +0200", "Message-Id": "<20190603145048.2596-3-damianx.nowak@intel.com>", "X-Mailer": "git-send-email 2.21.0.windows.1", "In-Reply-To": "<20190603145048.2596-1-damianx.nowak@intel.com>", "References": "<20190603145048.2596-1-damianx.nowak@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 2/9] test/crypto: add snow3g test cases for oop\n\toperation", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Damian Nowak <damianx.nowak@intel.com>\n\nThis patch adds test cases for snow3g out of\nplace auth-cipher operations. Test cases include\ndigest generation with buffer encryption and\nbuffer decryption with digest verification.\n\nSigned-off-by: Damian Nowak <damianx.nowak@intel.com>\n---\n app/test/test_cryptodev.c | 228 ++++++++++++++++++++------\n app/test/test_cryptodev_snow3g_test_vectors.h | 100 ++++++++++-\n 2 files changed, 272 insertions(+), 56 deletions(-)", "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 9f31aaa..56ab0cf 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright(c) 2015-2017 Intel Corporation\n+ * Copyright(c) 2015-2019 Intel Corporation\n */\n \n #include <time.h>\n@@ -40,7 +40,10 @@\n #include \"test_cryptodev_hmac_test_vectors.h\"\n \n #define VDEV_ARGS_SIZE 100\n-#define MAX_NB_SESSIONS 4\n+#define MAX_NB_SESSIONS 4\n+\n+#define IN_PLACE 0\n+#define OUT_OF_PLACE 1\n \n static int gbl_driver_id;\n \n@@ -2814,7 +2817,8 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,\n \t\tconst uint8_t *auth_iv, uint8_t auth_iv_len,\n \t\tunsigned int data_pad_len,\n \t\tunsigned int cipher_len, unsigned int cipher_offset,\n-\t\tunsigned int auth_len, unsigned int auth_offset)\n+\t\tunsigned int auth_len, unsigned int auth_offset,\n+\t\tuint8_t op_mode)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n \tstruct crypto_unittest_params *ut_params = &unittest_params;\n@@ -2830,24 +2834,31 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,\n \n \tstruct rte_crypto_sym_op *sym_op = ut_params->op->sym;\n \n-\t/* set crypto operation source mbuf */\n+\t/* set crypto operation mbufs */\n \tsym_op->m_src = ut_params->ibuf;\n+\tif (op_mode == OUT_OF_PLACE)\n+\t\tsym_op->m_dst = ut_params->obuf;\n \n \t/* digest */\n-\tsym_op->auth.digest.data = (uint8_t *) rte_pktmbuf_mtod_offset(\n-\t\t\tut_params->ibuf, uint8_t *, data_pad_len);\n+\tsym_op->auth.digest.data = rte_pktmbuf_mtod_offset(\n+\t\t(op_mode == IN_PLACE ?\n+\t\t\tut_params->ibuf : ut_params->obuf),\n+\t\tuint8_t *, data_pad_len);\n \n \tTEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,\n \t\t\t\"no room to append auth tag\");\n \n \tsym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(\n-\t\t\tut_params->ibuf, data_pad_len);\n+\t\t(op_mode == IN_PLACE ?\n+\t\t\tut_params->ibuf : ut_params->obuf),\n+\t\tdata_pad_len);\n \n \tmemset(sym_op->auth.digest.data, 0, auth_tag_len);\n \n \t/* Copy cipher and auth IVs at the end of the crypto operation */\n-\tuint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op, uint8_t *,\n-\t\t\t\t\t\tIV_OFFSET);\n+\tuint8_t *iv_ptr = rte_crypto_op_ctod_offset(\n+\t\t\tut_params->op, uint8_t *, IV_OFFSET);\n+\n \trte_memcpy(iv_ptr, cipher_iv, cipher_iv_len);\n \tiv_ptr += cipher_iv_len;\n \trte_memcpy(iv_ptr, auth_iv, auth_iv_len);\n@@ -4312,90 +4323,153 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)\n \t\t\t\"SNOW 3G Generated auth tag not as expected\");\n \treturn 0;\n }\n+\n static int\n-test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)\n+test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,\n+\tuint8_t op_mode, uint8_t verify)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n \tstruct crypto_unittest_params *ut_params = &unittest_params;\n \n \tint retval;\n \n-\tuint8_t *plaintext, *ciphertext;\n-\tunsigned plaintext_pad_len;\n-\tunsigned plaintext_len;\n+\tuint8_t *plaintext = NULL, *ciphertext = NULL;\n+\tunsigned int plaintext_pad_len;\n+\tunsigned int plaintext_len;\n+\tunsigned int ciphertext_pad_len;\n+\tunsigned int ciphertext_len;\n \n \t/* Create SNOW 3G session */\n-\tretval = create_wireless_algo_auth_cipher_session(ts_params->valid_devs[0],\n-\t\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT,\n-\t\t\tRTE_CRYPTO_AUTH_OP_GENERATE,\n+\tretval = create_wireless_algo_auth_cipher_session(\n+\t\t\tts_params->valid_devs[0],\n+\t\t\t(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT\n+\t\t\t\t\t: RTE_CRYPTO_CIPHER_OP_ENCRYPT),\n+\t\t\t(verify ? RTE_CRYPTO_AUTH_OP_VERIFY\n+\t\t\t\t\t: RTE_CRYPTO_AUTH_OP_GENERATE),\n \t\t\tRTE_CRYPTO_AUTH_SNOW3G_UIA2,\n \t\t\tRTE_CRYPTO_CIPHER_SNOW3G_UEA2,\n \t\t\ttdata->key.data, tdata->key.len,\n \t\t\ttdata->auth_iv.len, tdata->digest.len,\n \t\t\ttdata->cipher_iv.len);\n+\n \tif (retval < 0)\n \t\treturn retval;\n \n \tut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);\n+\tif (op_mode == OUT_OF_PLACE)\n+\t\tut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);\n \n \t/* clear mbuf payload */\n \tmemset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0,\n-\t\t\trte_pktmbuf_tailroom(ut_params->ibuf));\n+\t\trte_pktmbuf_tailroom(ut_params->ibuf));\n+\tif (op_mode == OUT_OF_PLACE)\n+\t\tmemset(rte_pktmbuf_mtod(ut_params->obuf, uint8_t *), 0,\n+\t\t\trte_pktmbuf_tailroom(ut_params->obuf));\n \n+\tciphertext_len = ceil_byte_length(tdata->ciphertext.len);\n \tplaintext_len = ceil_byte_length(tdata->plaintext.len);\n \t/* Append data which is padded to a multiple of */\n \t/* the algorithms block size */\n+\tciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);\n \tplaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);\n-\tplaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n-\t\t\t\tplaintext_pad_len);\n-\tmemcpy(plaintext, tdata->plaintext.data, plaintext_len);\n \n-\tdebug_hexdump(stdout, \"plaintext:\", plaintext, plaintext_len);\n+\tif (verify) {\n+\t\tciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n+\t\t\t\t\tciphertext_pad_len);\n+\t\tmemcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);\n+\t\tif (op_mode == OUT_OF_PLACE)\n+\t\t\trte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t} else {\n+\t\tplaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,\n+\t\t\t\t\tplaintext_pad_len);\n+\t\tmemcpy(plaintext, tdata->plaintext.data, plaintext_len);\n+\t\tif (op_mode == OUT_OF_PLACE)\n+\t\t\trte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext, plaintext_len);\n+\t}\n \n \t/* Create SNOW 3G operation */\n \tretval = create_wireless_algo_auth_cipher_operation(\n \t\ttdata->digest.len,\n \t\ttdata->cipher_iv.data, tdata->cipher_iv.len,\n \t\ttdata->auth_iv.data, tdata->auth_iv.len,\n-\t\ttdata->digest.offset_bytes == 0 ?\n-\t\tplaintext_pad_len : tdata->digest.offset_bytes,\n+\t\t(tdata->digest.offset_bytes == 0 ?\n+\t\t(verify ? ciphertext_pad_len : plaintext_pad_len)\n+\t\t\t: tdata->digest.offset_bytes),\n \t\ttdata->validCipherLenInBits.len,\n \t\ttdata->cipher.offset_bits,\n \t\ttdata->validAuthLenInBits.len,\n-\t\ttdata->auth.offset_bits);\n+\t\ttdata->auth.offset_bits,\n+\t\top_mode);\n \n \tif (retval < 0)\n \t\treturn retval;\n \n \tut_params->op = process_crypto_request(ts_params->valid_devs[0],\n \t\t\tut_params->op);\n+\n \tTEST_ASSERT_NOT_NULL(ut_params->op, \"failed to retrieve obuf\");\n-\tut_params->obuf = ut_params->op->sym->m_src;\n-\tif (ut_params->obuf)\n-\t\tciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *);\n-\telse\n-\t\tciphertext = plaintext;\n \n-\tut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)\n+\tut_params->obuf = (op_mode == IN_PLACE ?\n+\t\tut_params->op->sym->m_src : ut_params->op->sym->m_dst);\n+\n+\tif (verify) {\n+\t\tif (ut_params->obuf)\n+\t\t\tplaintext = rte_pktmbuf_mtod(ut_params->obuf,\n+\t\t\t\t\t\t\tuint8_t *);\n+\t\telse\n+\t\t\tplaintext = ciphertext +\n+\t\t\t\t(tdata->cipher.offset_bits >> 3);\n+\n+\t\tdebug_hexdump(stdout, \"plaintext:\", plaintext,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"plaintext expected:\",\n+\t\t\ttdata->plaintext.data,\n+\t\t\t(tdata->plaintext.len >> 3) - tdata->digest.len);\n+\t} else {\n+\t\tif (ut_params->obuf)\n+\t\t\tciphertext = rte_pktmbuf_mtod(ut_params->obuf,\n+\t\t\t\t\t\t\tuint8_t *);\n+\t\telse\n+\t\t\tciphertext = plaintext;\n+\n+\t\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext,\n+\t\t\tciphertext_len);\n+\t\tdebug_hexdump(stdout, \"ciphertext expected:\",\n+\t\t\ttdata->ciphertext.data, tdata->ciphertext.len >> 3);\n+\n+\t\tut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)\n \t\t\t+ (tdata->digest.offset_bytes == 0 ?\n-\t\t\tplaintext_pad_len : tdata->digest.offset_bytes);\n+\t\tplaintext_pad_len : tdata->digest.offset_bytes);\n \n-\tdebug_hexdump(stdout, \"digest:\", ut_params->digest, tdata->digest.len);\n-\tdebug_hexdump(stdout, \"ciphertext:\", ciphertext, plaintext_len);\n+\t\tdebug_hexdump(stdout, \"digest:\", ut_params->digest,\n+\t\t\ttdata->digest.len);\n+\t\tdebug_hexdump(stdout, \"digest expected:\", tdata->digest.data,\n+\t\t\t\ttdata->digest.len);\n+\t}\n \n \t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n-\t\tciphertext,\n-\t\ttdata->ciphertext.data,\n-\t\ttdata->validDataLenInBits.len,\n-\t\t\"SNOW 3G Ciphertext data not as expected\");\n+\tif (verify) {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tplaintext,\n+\t\t\ttdata->plaintext.data,\n+\t\t\ttdata->plaintext.len >> 3,\n+\t\t\t\"SNOW 3G Plaintext data not as expected\");\n+\t} else {\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(\n+\t\t\tciphertext,\n+\t\t\ttdata->ciphertext.data,\n+\t\t\ttdata->validDataLenInBits.len,\n+\t\t\t\"SNOW 3G Ciphertext data not as expected\");\n \n-\t/* Validate obuf */\n-\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n-\t\tut_params->digest,\n-\t\ttdata->digest.data,\n-\t\tDIGEST_BYTE_LENGTH_SNOW3G_UIA2,\n-\t\t\"SNOW 3G Generated auth tag not as expected\");\n+\t\tTEST_ASSERT_BUFFERS_ARE_EQUAL(\n+\t\t\tut_params->digest,\n+\t\t\ttdata->digest.data,\n+\t\t\tDIGEST_BYTE_LENGTH_SNOW3G_UIA2,\n+\t\t\t\"SNOW 3G Generated auth tag not as expected\");\n+\t}\n \treturn 0;\n }\n \n@@ -4447,8 +4521,8 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)\n \t\t\t\ttdata->validCipherLenInBits.len,\n \t\t\t\ttdata->validCipherOffsetInBits.len,\n \t\t\t\ttdata->validAuthLenInBits.len,\n-\t\t\t\t0\n-\t\t\t\t);\n+\t\t\t\t0,\n+\t\t\t\tIN_PLACE);\n \n \tif (retval < 0)\n \t\treturn retval;\n@@ -5038,13 +5112,50 @@ test_snow3g_cipher_auth_test_case_1(void)\n static int\n test_snow3g_auth_cipher_test_case_1(void)\n {\n-\treturn test_snow3g_auth_cipher(&snow3g_test_case_6);\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_1, IN_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_test_case_2(void)\n+{\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_2, IN_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_test_case_2_oop(void)\n+{\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_2, OUT_OF_PLACE, 0);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_test_case_1(void)\n+{\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_1, IN_PLACE, 1);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_test_case_2(void)\n+{\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_2, IN_PLACE, 1);\n+}\n+\n+static int\n+test_snow3g_auth_cipher_verify_test_case_2_oop(void)\n+{\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_auth_cipher_test_case_2, OUT_OF_PLACE, 1);\n }\n \n static int\n test_snow3g_auth_cipher_with_digest_test_case_1(void)\n {\n-\treturn test_snow3g_auth_cipher(&snow3g_test_case_7);\n+\treturn test_snow3g_auth_cipher(\n+\t\t&snow3g_test_case_7, IN_PLACE, 0);\n }\n \n static int\n@@ -8650,9 +8761,6 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,\n \treturn 0;\n }\n \n-#define IN_PLACE\t0\n-#define OUT_OF_PLACE\t1\n-\n static int\n test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B(void)\n {\n@@ -9189,6 +9297,22 @@ static struct unit_test_suite cryptodev_qat_testsuite = {\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_decryption_test_case_1_oop),\n \n+\t\t/** SNOW 3G generate auth, then encrypt (UEA2) */\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_1),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_2),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_test_case_2_oop),\n+\n+\t\t/** SNOW 3G decrypt (UEA2), then verify auth */\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_1),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_2),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n+\t\t\ttest_snow3g_auth_cipher_verify_test_case_2_oop),\n+\n \t\t/** SNOW 3G decrypt only (UEA2) */\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_decryption_test_case_1),\n@@ -9217,8 +9341,6 @@ static struct unit_test_suite cryptodev_qat_testsuite = {\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_cipher_auth_test_case_1),\n \t\tTEST_CASE_ST(ut_setup, ut_teardown,\n-\t\t\ttest_snow3g_auth_cipher_test_case_1),\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown,\n \t\t\ttest_snow3g_auth_cipher_with_digest_test_case_1),\n \n \t\t/** ZUC encrypt only (EEA3) */\ndiff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h\nindex 3e55ac1..191bae6 100644\n--- a/app/test/test_cryptodev_snow3g_test_vectors.h\n+++ b/app/test/test_cryptodev_snow3g_test_vectors.h\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright(c) 2015-2017 Intel Corporation\n+ * Copyright(c) 2015-2019 Intel Corporation\n */\n \n #ifndef TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_\n@@ -59,6 +59,7 @@ struct snow3g_test_data {\n \t\tunsigned int offset_bits;\n \t} auth;\n };\n+\n struct snow3g_test_data snow3g_test_case_1 = {\n \t.key = {\n \t\t.data = {\n@@ -347,7 +348,8 @@ struct snow3g_test_data snow3g_test_case_5 = {\n \t\t.len = 840\n \t},\n };\n-struct snow3g_test_data snow3g_test_case_6 = {\n+\n+struct snow3g_test_data snow3g_auth_cipher_test_case_1 = {\n \t.key = {\n \t\t.data = {\n \t\t\t0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,\n@@ -415,7 +417,6 @@ struct snow3g_test_data snow3g_test_case_6 = {\n \t},\n };\n \n-\n struct snow3g_test_data snow3g_test_case_7 = {\n \t.key = {\n \t\t.data = {\n@@ -508,4 +509,97 @@ struct snow3g_test_data snow3g_test_case_7 = {\n \t},\n };\n \n+struct snow3g_test_data snow3g_auth_cipher_test_case_2 = {\n+\t.key = {\n+\t\t.data = {\n+\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,\n+\t\t\t0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10\n+\n+\t\t\t},\n+\t\t.len = 16\n+\t},\n+\t.cipher_iv = {\n+\t\t.data = {\n+\t\t\t0x01, 0x02, 0x03, 0x04, 0x05, 0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A,\n+\n+\t\t},\n+\t\t.len = 128 << 3\n+\t},\n+\t.cipher = {\n+\t\t.len_bits = 126 << 3,\n+\t\t.offset_bits = 2 << 3\n+\t},\n+\t.auth = {\n+\t\t.len_bits = 124 << 3,\n+\t\t.offset_bits = 0\n+\t},\n+\t.digest = {\n+\t\t.data = {\n+\t\t\t0x7D, 0x27, 0xC6, 0xDA\n+\t\t},\n+\t\t.len = 4,\n+\t\t.offset_bytes = 124\n+\t},\n+\t.validDataLenInBits = {\n+\t\t.len = 128 << 3\n+\t},\n+\t.validCipherLenInBits = {\n+\t\t.len = 126 << 3\n+\t},\n+\t.validAuthLenInBits = {\n+\t\t.len = 124 << 3\n+\t},\n+};\n+\n #endif /* TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_ */\n", "prefixes": [ "2/9" ] }{ "id": 54178, "url": "