From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7258158DF for ; Fri, 26 Aug 2016 05:08:26 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 25 Aug 2016 20:08:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,579,1464678000"; d="scan'208";a="753650998" Received: from sie-lab-214-036.ir.intel.com (HELO silpixa00394365.ir.intel.com) ([10.237.214.36]) by FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2016 20:08:24 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: Pablo de Lara Date: Fri, 26 Aug 2016 04:09:15 +0100 Message-Id: <1472180955-42960-4-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472180955-42960-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1472180955-42960-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 3/3] app/test: add test cases for ZUC PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 03:08:31 -0000 Add cipher and authentication ZUC algorithm tests. Signed-off-by: Pablo de Lara --- app/test/test_cryptodev.c | 241 ++++++++++ app/test/test_cryptodev_zuc_hash_test_vectors.h | 397 ++++++++++++++++ app/test/test_cryptodev_zuc_test_vectors.h | 582 ++++++++++++++++++++++++ 3 files changed, 1220 insertions(+) create mode 100644 app/test/test_cryptodev_zuc_hash_test_vectors.h create mode 100644 app/test/test_cryptodev_zuc_test_vectors.h diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 703df91..ac83f24 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -48,6 +48,8 @@ #include "test_cryptodev_kasumi_hash_test_vectors.h" #include "test_cryptodev_snow3g_test_vectors.h" #include "test_cryptodev_snow3g_hash_test_vectors.h" +#include "test_cryptodev_zuc_test_vectors.h" +#include "test_cryptodev_zuc_hash_test_vectors.h" #include "test_cryptodev_gcm_test_vectors.h" #include "test_cryptodev_hmac_test_vectors.h" @@ -240,6 +242,20 @@ testsuite_setup(void) } } + /* Create 2 ZUC devices if required */ + if (gbl_cryptodev_type == RTE_CRYPTODEV_ZUC_PMD) { + nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_ZUC_PMD); + if (nb_devs < 2) { + for (i = nb_devs; i < 2; i++) { + TEST_ASSERT_SUCCESS(rte_eal_vdev_init( + RTE_STR(CRYPTODEV_NAME_ZUC_PMD), NULL), + "Failed to create instance %u of" + " pmd : %s", + i, RTE_STR(CRYPTODEV_NAME_ZUC_PMD)); + } + } + } + /* Create 2 NULL devices if required */ if (gbl_cryptodev_type == RTE_CRYPTODEV_NULL_PMD) { nb_devs = rte_cryptodev_count_devtype( @@ -2831,6 +2847,132 @@ test_snow3g_encrypted_authentication(const struct snow3g_test_data *tdata) } static int +test_zuc_encryption(const struct zuc_test_data *tdata) +{ + 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; + + /* Create ZUC session */ + retval = create_wireless_algo_cipher_session(ts_params->valid_devs[0], + RTE_CRYPTO_CIPHER_OP_ENCRYPT, + RTE_CRYPTO_CIPHER_ZUC_EEA3, + tdata->key.data, tdata->key.len); + if (retval < 0) + return retval; + + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + /* Clear mbuf payload */ + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->plaintext.len); + /* Append data which is padded to a multiple */ + /* of the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext.data, plaintext_len); + + TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len); + + /* Create ZUC operation */ + retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len, + tdata->plaintext.len, + tdata->validCipherOffsetLenInBits.len, + RTE_CRYPTO_CIPHER_ZUC_EEA3); + 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_dst; + if (ut_params->obuf) + ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) + + tdata->iv.len; + else + ciphertext = plaintext; + + TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len); + + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + ciphertext, + tdata->ciphertext.data, + tdata->validCipherLenInBits.len, + "ZUC Ciphertext data not as expected"); + return 0; +} + +static int +test_zuc_authentication(const struct zuc_hash_test_data *tdata) +{ + struct crypto_testsuite_params *ts_params = &testsuite_params; + struct crypto_unittest_params *ut_params = &unittest_params; + + int retval; + unsigned plaintext_pad_len; + unsigned plaintext_len; + uint8_t *plaintext; + + /* 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, + RTE_CRYPTO_AUTH_OP_GENERATE, + RTE_CRYPTO_AUTH_ZUC_EIA3); + if (retval < 0) + return retval; + + /* alloc mbuf and set payload */ + ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool); + + memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0, + rte_pktmbuf_tailroom(ut_params->ibuf)); + + plaintext_len = ceil_byte_length(tdata->plaintext.len); + /* Append data which is padded to a multiple of */ + /* the algorithms block size */ + plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 8); + plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, + plaintext_pad_len); + memcpy(plaintext, tdata->plaintext.data, plaintext_len); + + /* Create ZUC operation */ + retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len, + tdata->aad.data, tdata->aad.len, + plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE, + RTE_CRYPTO_AUTH_ZUC_EIA3, + tdata->validAuthLenInBits.len, + tdata->validAuthOffsetLenInBits.len); + if (retval < 0) + return retval; + + ut_params->op = process_crypto_request(ts_params->valid_devs[0], + ut_params->op); + 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); + + /* Validate obuf */ + TEST_ASSERT_BUFFERS_ARE_EQUAL( + ut_params->digest, + tdata->digest.data, + DIGEST_BYTE_LENGTH_KASUMI_F9, + "ZUC Generated auth tag not as expected"); + + return 0; +} + +static int test_kasumi_encryption_test_case_1(void) { return test_kasumi_encryption(&kasumi_test_case_1); @@ -2990,6 +3132,66 @@ test_snow3g_encrypted_authentication_test_case_1(void) return test_snow3g_encrypted_authentication(&snow3g_test_case_6); } +static int +test_zuc_encryption_test_case_1(void) +{ + return test_zuc_encryption(&zuc_test_case_1); +} + +static int +test_zuc_encryption_test_case_2(void) +{ + return test_zuc_encryption(&zuc_test_case_2); +} + +static int +test_zuc_encryption_test_case_3(void) +{ + return test_zuc_encryption(&zuc_test_case_3); +} + +static int +test_zuc_encryption_test_case_4(void) +{ + return test_zuc_encryption(&zuc_test_case_4); +} + +static int +test_zuc_encryption_test_case_5(void) +{ + return test_zuc_encryption(&zuc_test_case_5); +} + +static int +test_zuc_hash_generate_test_case_1(void) +{ + return test_zuc_authentication(&zuc_hash_test_case_1); +} + +static int +test_zuc_hash_generate_test_case_2(void) +{ + return test_zuc_authentication(&zuc_hash_test_case_2); +} + +static int +test_zuc_hash_generate_test_case_3(void) +{ + return test_zuc_authentication(&zuc_hash_test_case_3); +} + +static int +test_zuc_hash_generate_test_case_4(void) +{ + return test_zuc_authentication(&zuc_hash_test_case_4); +} + +static int +test_zuc_hash_generate_test_case_5(void) +{ + return test_zuc_authentication(&zuc_hash_test_case_5); +} + /* ***** AES-GCM Tests ***** */ static int @@ -4612,6 +4814,36 @@ static struct unit_test_suite cryptodev_sw_snow3g_testsuite = { } }; +static struct unit_test_suite cryptodev_sw_zuc_testsuite = { + .suite_name = "Crypto Device SW ZUC Unit Test Suite", + .setup = testsuite_setup, + .teardown = testsuite_teardown, + .unit_test_cases = { + /** ZUC encrypt only (EEA3) */ + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_encryption_test_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_encryption_test_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_encryption_test_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_encryption_test_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_encryption_test_case_5), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_hash_generate_test_case_1), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_hash_generate_test_case_2), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_hash_generate_test_case_3), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_hash_generate_test_case_4), + TEST_CASE_ST(ut_setup, ut_teardown, + test_zuc_hash_generate_test_case_5), + TEST_CASES_END() /**< NULL terminate unit test array */ + } +}; + static struct unit_test_suite cryptodev_null_testsuite = { .suite_name = "Crypto Device NULL Unit Test Suite", .setup = testsuite_setup, @@ -4681,9 +4913,18 @@ test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/) return unit_test_suite_runner(&cryptodev_sw_kasumi_testsuite); } +static int +test_cryptodev_sw_zuc(void /*argv __rte_unused, int argc __rte_unused*/) +{ + gbl_cryptodev_type = RTE_CRYPTODEV_ZUC_PMD; + + return unit_test_suite_runner(&cryptodev_sw_zuc_testsuite); +} + REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat); REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb); REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null); REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g); REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi); +REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc); diff --git a/app/test/test_cryptodev_zuc_hash_test_vectors.h b/app/test/test_cryptodev_zuc_hash_test_vectors.h new file mode 100644 index 0000000..0ef04e8 --- /dev/null +++ b/app/test/test_cryptodev_zuc_hash_test_vectors.h @@ -0,0 +1,397 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2016 Intel Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TEST_CRYPTODEV_ZUC_HASH_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_ZUC_HASH_TEST_VECTORS_H_ + +struct zuc_hash_test_data { + struct { + uint8_t data[64]; + unsigned len; + } key; + + struct { + uint8_t data[64]; + unsigned len; + } aad; + + struct { + uint8_t data[2056]; + unsigned len; /* length must be in Bits */ + } plaintext; + + struct { + unsigned len; + } validAuthLenInBits; + + struct { + unsigned len; + } validAuthOffsetLenInBits; + + struct { + uint8_t data[64]; + unsigned len; + } digest; +}; + +struct zuc_hash_test_data zuc_hash_test_case_1 = { + .key = { + .data = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .aad = { + .data = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x00 + }, + .len = 8 + }, + .validAuthLenInBits = { + .len = 1 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0xc8, 0xa9, 0x59, 0x5e}, + .len = 4 + } +}; + +struct zuc_hash_test_data zuc_hash_test_case_2 = { + .key = { + .data = { + 0x47, 0x05, 0x41, 0x25, 0x56, 0x1e, 0xb2, 0xdd, + 0xa9, 0x40, 0x59, 0xda, 0x05, 0x09, 0x78, 0x50 + }, + .len = 16 + }, + .aad = { + .data = { + 0x56, 0x1e, 0xb2, 0xdd, 0xa0, 0x00, 0x00, 0x00, + 0x56, 0x1e, 0xb2, 0xdd, 0xa0, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + }, + .len = 96 + }, + .validAuthLenInBits = { + .len = 90 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0x67, 0x19, 0xa0, 0x88}, + .len = 4 + } +}; + +struct zuc_hash_test_data zuc_hash_test_case_3 = { + .key = { + .data = { + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a + }, + .len = 16 + }, + .aad = { + .data = { + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e, + 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1, + 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83, + 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0, + 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9, + 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9, + 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d, + 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c, + 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81, + 0x00 + }, + .len = 584 + }, + .validAuthLenInBits = { + .len = 577 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0xfa, 0xe8, 0xff, 0x0b}, + .len = 4 + } +}; + +struct zuc_hash_test_data zuc_hash_test_case_4 = { + .key = { + .data = { + 0xc8, 0xa4, 0x82, 0x62, 0xd0, 0xc2, 0xe2, 0xba, + 0xc4, 0xb9, 0x6e, 0xf7, 0x7e, 0x80, 0xca, 0x59 + }, + .len = 16 + }, + .aad = { + .data = { + 0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00, + 0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0xb5, 0x46, 0x43, 0x0b, 0xf8, 0x7b, 0x4f, 0x1e, + 0xe8, 0x34, 0x70, 0x4c, 0xd6, 0x95, 0x1c, 0x36, + 0xe2, 0x6f, 0x10, 0x8c, 0xf7, 0x31, 0x78, 0x8f, + 0x48, 0xdc, 0x34, 0xf1, 0x67, 0x8c, 0x05, 0x22, + 0x1c, 0x8f, 0xa7, 0xff, 0x2f, 0x39, 0xf4, 0x77, + 0xe7, 0xe4, 0x9e, 0xf6, 0x0a, 0x4e, 0xc2, 0xc3, + 0xde, 0x24, 0x31, 0x2a, 0x96, 0xaa, 0x26, 0xe1, + 0xcf, 0xba, 0x57, 0x56, 0x38, 0x38, 0xb2, 0x97, + 0xf4, 0x7e, 0x85, 0x10, 0xc7, 0x79, 0xfd, 0x66, + 0x54, 0xb1, 0x43, 0x38, 0x6f, 0xa6, 0x39, 0xd3, + 0x1e, 0xdb, 0xd6, 0xc0, 0x6e, 0x47, 0xd1, 0x59, + 0xd9, 0x43, 0x62, 0xf2, 0x6a, 0xee, 0xed, 0xee, + 0x0e, 0x4f, 0x49, 0xd9, 0xbf, 0x84, 0x12, 0x99, + 0x54, 0x15, 0xbf, 0xad, 0x56, 0xee, 0x82, 0xd1, + 0xca, 0x74, 0x63, 0xab, 0xf0, 0x85, 0xb0, 0x82, + 0xb0, 0x99, 0x04, 0xd6, 0xd9, 0x90, 0xd4, 0x3c, + 0xf2, 0xe0, 0x62, 0xf4, 0x08, 0x39, 0xd9, 0x32, + 0x48, 0xb1, 0xeb, 0x92, 0xcd, 0xfe, 0xd5, 0x30, + 0x0b, 0xc1, 0x48, 0x28, 0x04, 0x30, 0xb6, 0xd0, + 0xca, 0xa0, 0x94, 0xb6, 0xec, 0x89, 0x11, 0xab, + 0x7d, 0xc3, 0x68, 0x24, 0xb8, 0x24, 0xdc, 0x0a, + 0xf6, 0x68, 0x2b, 0x09, 0x35, 0xfd, 0xe7, 0xb4, + 0x92, 0xa1, 0x4d, 0xc2, 0xf4, 0x36, 0x48, 0x03, + 0x8d, 0xa2, 0xcf, 0x79, 0x17, 0x0d, 0x2d, 0x50, + 0x13, 0x3f, 0xd4, 0x94, 0x16, 0xcb, 0x6e, 0x33, + 0xbe, 0xa9, 0x0b, 0x8b, 0xf4, 0x55, 0x9b, 0x03, + 0x73, 0x2a, 0x01, 0xea, 0x29, 0x0e, 0x6d, 0x07, + 0x4f, 0x79, 0xbb, 0x83, 0xc1, 0x0e, 0x58, 0x00, + 0x15, 0xcc, 0x1a, 0x85, 0xb3, 0x6b, 0x55, 0x01, + 0x04, 0x6e, 0x9c, 0x4b, 0xdc, 0xae, 0x51, 0x35, + 0x69, 0x0b, 0x86, 0x66, 0xbd, 0x54, 0xb7, 0xa7, + 0x03, 0xea, 0x7b, 0x6f, 0x22, 0x0a, 0x54, 0x69, + 0xa5, 0x68, 0x02, 0x7e + }, + .len = 2080 + }, + .validAuthLenInBits = { + .len = 2079 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0x00, 0x4a, 0xc4, 0xd6}, + .len = 4 + } +}; + +struct zuc_hash_test_data zuc_hash_test_case_5 = { + .key = { + .data = { + 0x6b, 0x8b, 0x08, 0xee, 0x79, 0xe0, 0xb5, 0x98, + 0x2d, 0x6d, 0x12, 0x8e, 0xa9, 0xf2, 0x20, 0xcb + }, + .len = 16 + }, + .aad = { + .data = { + 0x56, 0x1e, 0xb2, 0xdd, 0xe0, 0x00, 0x00, 0x00, + 0x56, 0x1e, 0xb2, 0xdd, 0xe0, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x5b, 0xad, 0x72, 0x47, 0x10, 0xba, 0x1c, 0x56, + 0xd5, 0xa3, 0x15, 0xf8, 0xd4, 0x0f, 0x6e, 0x09, + 0x37, 0x80, 0xbe, 0x8e, 0x8d, 0xe0, 0x7b, 0x69, + 0x92, 0x43, 0x20, 0x18, 0xe0, 0x8e, 0xd9, 0x6a, + 0x57, 0x34, 0xaf, 0x8b, 0xad, 0x8a, 0x57, 0x5d, + 0x3a, 0x1f, 0x16, 0x2f, 0x85, 0x04, 0x5c, 0xc7, + 0x70, 0x92, 0x55, 0x71, 0xd9, 0xf5, 0xb9, 0x4e, + 0x45, 0x4a, 0x77, 0xc1, 0x6e, 0x72, 0x93, 0x6b, + 0xf0, 0x16, 0xae, 0x15, 0x74, 0x99, 0xf0, 0x54, + 0x3b, 0x5d, 0x52, 0xca, 0xa6, 0xdb, 0xea, 0xb6, + 0x97, 0xd2, 0xbb, 0x73, 0xe4, 0x1b, 0x80, 0x75, + 0xdc, 0xe7, 0x9b, 0x4b, 0x86, 0x04, 0x4f, 0x66, + 0x1d, 0x44, 0x85, 0xa5, 0x43, 0xdd, 0x78, 0x60, + 0x6e, 0x04, 0x19, 0xe8, 0x05, 0x98, 0x59, 0xd3, + 0xcb, 0x2b, 0x67, 0xce, 0x09, 0x77, 0x60, 0x3f, + 0x81, 0xff, 0x83, 0x9e, 0x33, 0x18, 0x59, 0x54, + 0x4c, 0xfb, 0xc8, 0xd0, 0x0f, 0xef, 0x1a, 0x4c, + 0x85, 0x10, 0xfb, 0x54, 0x7d, 0x6b, 0x06, 0xc6, + 0x11, 0xef, 0x44, 0xf1, 0xbc, 0xe1, 0x07, 0xcf, + 0xa4, 0x5a, 0x06, 0xaa, 0xb3, 0x60, 0x15, 0x2b, + 0x28, 0xdc, 0x1e, 0xbe, 0x6f, 0x7f, 0xe0, 0x9b, + 0x05, 0x16, 0xf9, 0xa5, 0xb0, 0x2a, 0x1b, 0xd8, + 0x4b, 0xb0, 0x18, 0x1e, 0x2e, 0x89, 0xe1, 0x9b, + 0xd8, 0x12, 0x59, 0x30, 0xd1, 0x78, 0x68, 0x2f, + 0x38, 0x62, 0xdc, 0x51, 0xb6, 0x36, 0xf0, 0x4e, + 0x72, 0x0c, 0x47, 0xc3, 0xce, 0x51, 0xad, 0x70, + 0xd9, 0x4b, 0x9b, 0x22, 0x55, 0xfb, 0xae, 0x90, + 0x65, 0x49, 0xf4, 0x99, 0xf8, 0xc6, 0xd3, 0x99, + 0x47, 0xed, 0x5e, 0x5d, 0xf8, 0xe2, 0xde, 0xf1, + 0x13, 0x25, 0x3e, 0x7b, 0x08, 0xd0, 0xa7, 0x6b, + 0x6b, 0xfc, 0x68, 0xc8, 0x12, 0xf3, 0x75, 0xc7, + 0x9b, 0x8f, 0xe5, 0xfd, 0x85, 0x97, 0x6a, 0xa6, + 0xd4, 0x6b, 0x4a, 0x23, 0x39, 0xd8, 0xae, 0x51, + 0x47, 0xf6, 0x80, 0xfb, 0xe7, 0x0f, 0x97, 0x8b, + 0x38, 0xef, 0xfd, 0x7b, 0x2f, 0x78, 0x66, 0xa2, + 0x25, 0x54, 0xe1, 0x93, 0xa9, 0x4e, 0x98, 0xa6, + 0x8b, 0x74, 0xbd, 0x25, 0xbb, 0x2b, 0x3f, 0x5f, + 0xb0, 0xa5, 0xfd, 0x59, 0x88, 0x7f, 0x9a, 0xb6, + 0x81, 0x59, 0xb7, 0x17, 0x8d, 0x5b, 0x7b, 0x67, + 0x7c, 0xb5, 0x46, 0xbf, 0x41, 0xea, 0xdc, 0xa2, + 0x16, 0xfc, 0x10, 0x85, 0x01, 0x28, 0xf8, 0xbd, + 0xef, 0x5c, 0x8d, 0x89, 0xf9, 0x6a, 0xfa, 0x4f, + 0xa8, 0xb5, 0x48, 0x85, 0x56, 0x5e, 0xd8, 0x38, + 0xa9, 0x50, 0xfe, 0xe5, 0xf1, 0xc3, 0xb0, 0xa4, + 0xf6, 0xfb, 0x71, 0xe5, 0x4d, 0xfd, 0x16, 0x9e, + 0x82, 0xce, 0xcc, 0x72, 0x66, 0xc8, 0x50, 0xe6, + 0x7c, 0x5e, 0xf0, 0xba, 0x96, 0x0f, 0x52, 0x14, + 0x06, 0x0e, 0x71, 0xeb, 0x17, 0x2a, 0x75, 0xfc, + 0x14, 0x86, 0x83, 0x5c, 0xbe, 0xa6, 0x53, 0x44, + 0x65, 0xb0, 0x55, 0xc9, 0x6a, 0x72, 0xe4, 0x10, + 0x52, 0x24, 0x18, 0x23, 0x25, 0xd8, 0x30, 0x41, + 0x4b, 0x40, 0x21, 0x4d, 0xaa, 0x80, 0x91, 0xd2, + 0xe0, 0xfb, 0x01, 0x0a, 0xe1, 0x5c, 0x6d, 0xe9, + 0x08, 0x50, 0x97, 0x3b, 0xdf, 0x1e, 0x42, 0x3b, + 0xe1, 0x48, 0xa2, 0x37, 0xb8, 0x7a, 0x0c, 0x9f, + 0x34, 0xd4, 0xb4, 0x76, 0x05, 0xb8, 0x03, 0xd7, + 0x43, 0xa8, 0x6a, 0x90, 0x39, 0x9a, 0x4a, 0xf3, + 0x96, 0xd3, 0xa1, 0x20, 0x0a, 0x62, 0xf3, 0xd9, + 0x50, 0x79, 0x62, 0xe8, 0xe5, 0xbe, 0xe6, 0xd3, + 0xda, 0x2b, 0xb3, 0xf7, 0x23, 0x76, 0x64, 0xac, + 0x7a, 0x29, 0x28, 0x23, 0x90, 0x0b, 0xc6, 0x35, + 0x03, 0xb2, 0x9e, 0x80, 0xd6, 0x3f, 0x60, 0x67, + 0xbf, 0x8e, 0x17, 0x16, 0xac, 0x25, 0xbe, 0xba, + 0x35, 0x0d, 0xeb, 0x62, 0xa9, 0x9f, 0xe0, 0x31, + 0x85, 0xeb, 0x4f, 0x69, 0x93, 0x7e, 0xcd, 0x38, + 0x79, 0x41, 0xfd, 0xa5, 0x44, 0xba, 0x67, 0xdb, + 0x09, 0x11, 0x77, 0x49, 0x38, 0xb0, 0x18, 0x27, + 0xbc, 0xc6, 0x9c, 0x92, 0xb3, 0xf7, 0x72, 0xa9, + 0xd2, 0x85, 0x9e, 0xf0, 0x03, 0x39, 0x8b, 0x1f, + 0x6b, 0xba, 0xd7, 0xb5, 0x74, 0xf7, 0x98, 0x9a, + 0x1d, 0x10, 0xb2, 0xdf, 0x79, 0x8e, 0x0d, 0xbf, + 0x30, 0xd6, 0x58, 0x74, 0x64, 0xd2, 0x48, 0x78, + 0xcd, 0x00, 0xc0, 0xea, 0xee, 0x8a, 0x1a, 0x0c, + 0xc7, 0x53, 0xa2, 0x79, 0x79, 0xe1, 0x1b, 0x41, + 0xdb, 0x1d, 0xe3, 0xd5, 0x03, 0x8a, 0xfa, 0xf4, + 0x9f, 0x5c, 0x68, 0x2c, 0x37, 0x48, 0xd8, 0xa3, + 0xa9, 0xec, 0x54, 0xe6, 0xa3, 0x71, 0x27, 0x5f, + 0x16, 0x83, 0x51, 0x0f, 0x8e, 0x4f, 0x90, 0x93, + 0x8f, 0x9a, 0xb6, 0xe1, 0x34, 0xc2, 0xcf, 0xdf, + 0x48, 0x41, 0xcb, 0xa8, 0x8e, 0x0c, 0xff, 0x2b, + 0x0b, 0xcc, 0x8e, 0x6a, 0xdc, 0xb7, 0x11, 0x09, + 0xb5, 0x19, 0x8f, 0xec, 0xf1, 0xbb, 0x7e, 0x5c, + 0x53, 0x1a, 0xca, 0x50, 0xa5, 0x6a, 0x8a, 0x3b, + 0x6d, 0xe5, 0x98, 0x62, 0xd4, 0x1f, 0xa1, 0x13, + 0xd9, 0xcd, 0x95, 0x78, 0x08, 0xf0, 0x85, 0x71, + 0xd9, 0xa4, 0xbb, 0x79, 0x2a, 0xf2, 0x71, 0xf6, + 0xcc, 0x6d, 0xbb, 0x8d, 0xc7, 0xec, 0x36, 0xe3, + 0x6b, 0xe1, 0xed, 0x30, 0x81, 0x64, 0xc3, 0x1c, + 0x7c, 0x0a, 0xfc, 0x54, 0x1c + }, + .len = 5672 + }, + .validAuthLenInBits = { + .len = 5670 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0x0c, 0xa1, 0x27, 0x92}, + .len = 4 + } +}; + +struct zuc_hash_test_data zuc_hash_test_case_6 = { + .key = { + .data = { + 0xFD, 0xB9, 0xCF, 0xDF, 0x28, 0x93, 0x6C, 0xC4, + 0x83, 0xA3, 0x18, 0x69, 0xD8, 0x1B, 0x8F, 0xAB + }, + .len = 16 + }, + .aad = { + .data = { + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A, + 0xB6, 0xAF, 0x61, 0x44, 0x98, 0x38, 0x70, 0x3A + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x59, 0x32, 0xBC, 0x0A, 0xCE, 0x2B, 0x0A, 0xBA, + 0x33, 0xD8, 0xAC, 0x18, 0x8A, 0xC5, 0x4F, 0x34, + 0x6F, 0xAD, 0x10, 0xBF, 0x9D, 0xEE, 0x29, 0x20, + 0xB4, 0x3B, 0xD0, 0xC5, 0x3A, 0x91, 0x5C, 0xB7, + 0xDF, 0x6C, 0xAA, 0x72, 0x05, 0x3A, 0xBF, 0xF2 + }, + .len = 319 + }, + .validAuthLenInBits = { + .len = 319 + }, + .validAuthOffsetLenInBits = { + .len = 128 + }, + .digest = { + .data = {0x02, 0xF1, 0xFA, 0xAF}, + .len = 4 + } +}; +#endif /* TEST_CRYPTODEV_ZUC_HASH_TEST_VECTORS_H_ */ diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h new file mode 100644 index 0000000..fd319c7 --- /dev/null +++ b/app/test/test_cryptodev_zuc_test_vectors.h @@ -0,0 +1,582 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2016 Intel Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ +#define TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ + +struct zuc_test_data { + struct { + uint8_t data[64]; + unsigned len; + } key; + + struct { + uint8_t data[64] __rte_aligned(16); + unsigned len; + } iv; + + struct { + uint8_t data[1024]; + unsigned len; /* length must be in Bits */ + } plaintext; + + struct { + uint8_t data[1024]; + unsigned len; /* length must be in Bits */ + } ciphertext; + + struct { + unsigned len; + } validDataLenInBits; + + struct { + unsigned len; + } validCipherLenInBits; + + struct { + unsigned len; + } validCipherOffsetLenInBits; + + struct { + unsigned len; + } validAuthLenInBits; + + struct { + unsigned len; + } validAuthOffsetLenInBits; + + struct { + uint8_t data[64]; + unsigned len; + } aad; + + struct { + uint8_t data[64]; + unsigned len; + } digest; +}; +struct zuc_test_data zuc_test_case_1 = { + .key = { + .data = { + 0x17, 0x3d, 0x14, 0xba, 0x50, 0x03, 0x73, 0x1d, + 0x7a, 0x60, 0x04, 0x94, 0x70, 0xf0, 0x0a, 0x29 + }, + .len = 16 + }, + .iv = { + .data = { + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00, + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x6c, 0xf6, 0x53, 0x40, 0x73, 0x55, 0x52, 0xab, + 0x0c, 0x97, 0x52, 0xfa, 0x6f, 0x90, 0x25, 0xfe, + 0x0b, 0xd6, 0x75, 0xd9, 0x00, 0x58, 0x75, 0xb2, + 0x00 + }, + .len = 200 + }, + .ciphertext = { + .data = { + 0xa6, 0xc8, 0x5f, 0xc6, 0x6a, 0xfb, 0x85, 0x33, + 0xaa, 0xfc, 0x25, 0x18, 0xdf, 0xe7, 0x84, 0x94, + 0x0e, 0xe1, 0xe4, 0xb0, 0x30, 0x23, 0x8c, 0xc8, + 0x00 + }, + .len = 200 + }, + .validDataLenInBits = { + .len = 193 + }, + .validCipherLenInBits = { + .len = 193 + }, + .validCipherOffsetLenInBits = { + .len = 128 + } +}; + +struct zuc_test_data zuc_test_case_2 = { + .key = { + .data = { + 0xe5, 0xbd, 0x3e, 0xa0, 0xeb, 0x55, 0xad, 0xe8, + 0x66, 0xc6, 0xac, 0x58, 0xbd, 0x54, 0x30, 0x2a + }, + .len = 16 + }, + .iv = { + .data = { + 0x00, 0x05, 0x68, 0x23, 0xc4, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x68, 0x23, 0xc4, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x14, 0xa8, 0xef, 0x69, 0x3d, 0x67, 0x85, 0x07, + 0xbb, 0xe7, 0x27, 0x0a, 0x7f, 0x67, 0xff, 0x50, + 0x06, 0xc3, 0x52, 0x5b, 0x98, 0x07, 0xe4, 0x67, + 0xc4, 0xe5, 0x60, 0x00, 0xba, 0x33, 0x8f, 0x5d, + 0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22, + 0x46, 0xc8, 0x0d, 0x3b, 0x38, 0xf0, 0x7f, 0x4b, + 0xe2, 0xd8, 0xff, 0x58, 0x05, 0xf5, 0x13, 0x22, + 0x29, 0xbd, 0xe9, 0x3b, 0xbb, 0xdc, 0xaf, 0x38, + 0x2b, 0xf1, 0xee, 0x97, 0x2f, 0xbf, 0x99, 0x77, + 0xba, 0xda, 0x89, 0x45, 0x84, 0x7a, 0x2a, 0x6c, + 0x9a, 0xd3, 0x4a, 0x66, 0x75, 0x54, 0xe0, 0x4d, + 0x1f, 0x7f, 0xa2, 0xc3, 0x32, 0x41, 0xbd, 0x8f, + 0x01, 0xba, 0x22, 0x0d + }, + .len = 800 + }, + .ciphertext = { + .data = { + 0x13, 0x1d, 0x43, 0xe0, 0xde, 0xa1, 0xbe, 0x5c, + 0x5a, 0x1b, 0xfd, 0x97, 0x1d, 0x85, 0x2c, 0xbf, + 0x71, 0x2d, 0x7b, 0x4f, 0x57, 0x96, 0x1f, 0xea, + 0x32, 0x08, 0xaf, 0xa8, 0xbc, 0xa4, 0x33, 0xf4, + 0x56, 0xad, 0x09, 0xc7, 0x41, 0x7e, 0x58, 0xbc, + 0x69, 0xcf, 0x88, 0x66, 0xd1, 0x35, 0x3f, 0x74, + 0x86, 0x5e, 0x80, 0x78, 0x1d, 0x20, 0x2d, 0xfb, + 0x3e, 0xcf, 0xf7, 0xfc, 0xbc, 0x3b, 0x19, 0x0f, + 0xe8, 0x2a, 0x20, 0x4e, 0xd0, 0xe3, 0x50, 0xfc, + 0x0f, 0x6f, 0x26, 0x13, 0xb2, 0xf2, 0xbc, 0xa6, + 0xdf, 0x5a, 0x47, 0x3a, 0x57, 0xa4, 0xa0, 0x0d, + 0x98, 0x5e, 0xba, 0xd8, 0x80, 0xd6, 0xf2, 0x38, + 0x64, 0xa0, 0x7b, 0x0 + }, + .len = 800 + }, + .validDataLenInBits = { + .len = 800 + }, + .validCipherLenInBits = { + .len = 800 + }, + .validCipherOffsetLenInBits = { + .len = 128 + } +}; + +struct zuc_test_data zuc_test_case_3 = { + .key = { + .data = { + 0xd4, 0x55, 0x2a, 0x8f, 0xd6, 0xe6, 0x1c, 0xc8, + 0x1a, 0x20, 0x09, 0x14, 0x1a, 0x29, 0xc1, 0x0b + }, + .len = 16 + }, + .iv = { + .data = { + 0x76, 0x45, 0x2e, 0xc1, 0x14, 0x00, 0x00, 0x00, + 0x76, 0x45, 0x2e, 0xc1, 0x14, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x38, 0xf0, 0x7f, 0x4b, 0xe2, 0xd8, 0xff, 0x58, + 0x05, 0xf5, 0x13, 0x22, 0x29, 0xbd, 0xe9, 0x3b, + 0xbb, 0xdc, 0xaf, 0x38, 0x2b, 0xf1, 0xee, 0x97, + 0x2f, 0xbf, 0x99, 0x77, 0xba, 0xda, 0x89, 0x45, + 0x84, 0x7a, 0x2a, 0x6c, 0x9a, 0xd3, 0x4a, 0x66, + 0x75, 0x54, 0xe0, 0x4d, 0x1f, 0x7f, 0xa2, 0xc3, + 0x32, 0x41, 0xbd, 0x8f, 0x01, 0xba, 0x22, 0x0d, + 0x3c, 0xa4, 0xec, 0x41, 0xe0, 0x74, 0x59, 0x5f, + 0x54, 0xae, 0x2b, 0x45, 0x4f, 0xd9, 0x71, 0x43, + 0x20, 0x43, 0x60, 0x19, 0x65, 0xcc, 0xa8, 0x5c, + 0x24, 0x17, 0xed, 0x6c, 0xbe, 0xc3, 0xba, 0xda, + 0x84, 0xfc, 0x8a, 0x57, 0x9a, 0xea, 0x78, 0x37, + 0xb0, 0x27, 0x11, 0x77, 0x24, 0x2a, 0x64, 0xdc, + 0x0a, 0x9d, 0xe7, 0x1a, 0x8e, 0xde, 0xe8, 0x6c, + 0xa3, 0xd4, 0x7d, 0x03, 0x3d, 0x6b, 0xf5, 0x39, + 0x80, 0x4e, 0xca, 0x86, 0xc5, 0x84, 0xa9, 0x05, + 0x2d, 0xe4, 0x6a, 0xd3, 0xfc, 0xed, 0x65, 0x54, + 0x3b, 0xd9, 0x02, 0x07, 0x37, 0x2b, 0x27, 0xaf, + 0xb7, 0x92, 0x34, 0xf5, 0xff, 0x43, 0xea, 0x87, + 0x08, 0x20, 0xe2, 0xc2, 0xb7, 0x8a, 0x8a, 0xae, + 0x61, 0xcc, 0xe5, 0x2a, 0x05, 0x15, 0xe3, 0x48, + 0xd1, 0x96, 0x66, 0x4a, 0x34, 0x56, 0xb1, 0x82, + 0xa0, 0x7c, 0x40, 0x6e, 0x4a, 0x20, 0x79, 0x12, + 0x71, 0xcf, 0xed, 0xa1, 0x65, 0xd5, 0x35, 0xec, + 0x5e, 0xa2, 0xd4, 0xdf, 0x40 + }, + .len = 1576 + }, + .ciphertext = { + .data = { + 0x83, 0x83, 0xb0, 0x22, 0x9f, 0xcc, 0x0b, 0x9d, + 0x22, 0x95, 0xec, 0x41, 0xc9, 0x77, 0xe9, 0xc2, + 0xbb, 0x72, 0xe2, 0x20, 0x37, 0x81, 0x41, 0xf9, + 0xc8, 0x31, 0x8f, 0x3a, 0x27, 0x0d, 0xfb, 0xcd, + 0xee, 0x64, 0x11, 0xc2, 0xb3, 0x04, 0x4f, 0x17, + 0x6d, 0xc6, 0xe0, 0x0f, 0x89, 0x60, 0xf9, 0x7a, + 0xfa, 0xcd, 0x13, 0x1a, 0xd6, 0xa3, 0xb4, 0x9b, + 0x16, 0xb7, 0xba, 0xbc, 0xf2, 0xa5, 0x09, 0xeb, + 0xb1, 0x6a, 0x75, 0xdc, 0xab, 0x14, 0xff, 0x27, + 0x5d, 0xbe, 0xee, 0xa1, 0xa2, 0xb1, 0x55, 0xf9, + 0xd5, 0x2c, 0x26, 0x45, 0x2d, 0x01, 0x87, 0xc3, + 0x10, 0xa4, 0xee, 0x55, 0xbe, 0xaa, 0x78, 0xab, + 0x40, 0x24, 0x61, 0x5b, 0xa9, 0xf5, 0xd5, 0xad, + 0xc7, 0x72, 0x8f, 0x73, 0x56, 0x06, 0x71, 0xf0, + 0x13, 0xe5, 0xe5, 0x50, 0x08, 0x5d, 0x32, 0x91, + 0xdf, 0x7d, 0x5f, 0xec, 0xed, 0xde, 0xd5, 0x59, + 0x64, 0x1b, 0x6c, 0x2f, 0x58, 0x52, 0x33, 0xbc, + 0x71, 0xe9, 0x60, 0x2b, 0xd2, 0x30, 0x58, 0x55, + 0xbb, 0xd2, 0x5f, 0xfa, 0x7f, 0x17, 0xec, 0xbc, + 0x04, 0x2d, 0xaa, 0xe3, 0x8c, 0x1f, 0x57, 0xad, + 0x8e, 0x8e, 0xbd, 0x37, 0x34, 0x6f, 0x71, 0xbe, + 0xfd, 0xbb, 0x74, 0x32, 0xe0, 0xe0, 0xbb, 0x2c, + 0xfc, 0x09, 0xbc, 0xd9, 0x65, 0x70, 0xcb, 0x0c, + 0x0c, 0x39, 0xdf, 0x5e, 0x29, 0x29, 0x4e, 0x82, + 0x70, 0x3a, 0x63, 0x7f, 0x80 + }, + .len = 1576 + }, + .validDataLenInBits = { + .len = 1570 + }, + .validCipherLenInBits = { + .len = 1570 + }, + .validCipherOffsetLenInBits = { + .len = 128 + }, + .aad = { + .data = { + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .digest = { + .data = {0xE8, 0x60, 0x5A, 0x3E}, + .len = 4 + }, + .validAuthLenInBits = { + .len = 120 + }, + .validAuthOffsetLenInBits = { + .len = 128 + } +}; + +struct zuc_test_data zuc_test_case_4 = { + .key = { + .data = { + 0xdb, 0x84, 0xb4, 0xfb, 0xcc, 0xda, 0x56, 0x3b, + 0x66, 0x22, 0x7b, 0xfe, 0x45, 0x6f, 0x0f, 0x77 + }, + .len = 16 + }, + .iv = { + .data = { + 0xe4, 0x85, 0x0f, 0xe1, 0x84, 0x00, 0x00, 0x00, + 0xe4, 0x85, 0x0f, 0xe1, 0x84, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0xe5, 0x39, 0xf3, 0xb8, 0x97, 0x32, 0x40, 0xda, + 0x03, 0xf2, 0xb8, 0xaa, 0x05, 0xee, 0x0a, 0x00, + 0xdb, 0xaf, 0xc0, 0xe1, 0x82, 0x05, 0x5d, 0xfe, + 0x3d, 0x73, 0x83, 0xd9, 0x2c, 0xef, 0x40, 0xe9, + 0x29, 0x28, 0x60, 0x5d, 0x52, 0xd0, 0x5f, 0x4f, + 0x90, 0x18, 0xa1, 0xf1, 0x89, 0xae, 0x39, 0x97, + 0xce, 0x19, 0x15, 0x5f, 0xb1, 0x22, 0x1d, 0xb8, + 0xbb, 0x09, 0x51, 0xa8, 0x53, 0xad, 0x85, 0x2c, + 0xe1, 0x6c, 0xff, 0x07, 0x38, 0x2c, 0x93, 0xa1, + 0x57, 0xde, 0x00, 0xdd, 0xb1, 0x25, 0xc7, 0x53, + 0x9f, 0xd8, 0x50, 0x45, 0xe4, 0xee, 0x07, 0xe0, + 0xc4, 0x3f, 0x9e, 0x9d, 0x6f, 0x41, 0x4f, 0xc4, + 0xd1, 0xc6, 0x29, 0x17, 0x81, 0x3f, 0x74, 0xc0, + 0x0f, 0xc8, 0x3f, 0x3e, 0x2e, 0xd7, 0xc4, 0x5b, + 0xa5, 0x83, 0x52, 0x64, 0xb4, 0x3e, 0x0b, 0x20, + 0xaf, 0xda, 0x6b, 0x30, 0x53, 0xbf, 0xb6, 0x42, + 0x3b, 0x7f, 0xce, 0x25, 0x47, 0x9f, 0xf5, 0xf1, + 0x39, 0xdd, 0x9b, 0x5b, 0x99, 0x55, 0x58, 0xe2, + 0xa5, 0x6b, 0xe1, 0x8d, 0xd5, 0x81, 0xcd, 0x01, + 0x7c, 0x73, 0x5e, 0x6f, 0x0d, 0x0d, 0x97, 0xc4, + 0xdd, 0xc1, 0xd1, 0xda, 0x70, 0xc6, 0xdb, 0x4a, + 0x12, 0xcc, 0x92, 0x77, 0x8e, 0x2f, 0xbb, 0xd6, + 0xf3, 0xba, 0x52, 0xaf, 0x91, 0xc9, 0xc6, 0xb6, + 0x4e, 0x8d, 0xa4, 0xf7, 0xa2, 0xc2, 0x66, 0xd0, + 0x2d, 0x00, 0x17, 0x53, 0xdf, 0x08, 0x96, 0x03, + 0x93, 0xc5, 0xd5, 0x68, 0x88, 0xbf, 0x49, 0xeb, + 0x5c, 0x16, 0xd9, 0xa8, 0x04, 0x27, 0xa4, 0x16, + 0xbc, 0xb5, 0x97, 0xdf, 0x5b, 0xfe, 0x6f, 0x13, + 0x89, 0x0a, 0x07, 0xee, 0x13, 0x40, 0xe6, 0x47, + 0x6b, 0x0d, 0x9a, 0xa8, 0xf8, 0x22, 0xab, 0x0f, + 0xd1, 0xab, 0x0d, 0x20, 0x4f, 0x40, 0xb7, 0xce, + 0x6f, 0x2e, 0x13, 0x6e, 0xb6, 0x74, 0x85, 0xe5, + 0x07, 0x80, 0x4d, 0x50, 0x45, 0x88, 0xad, 0x37, + 0xff, 0xd8, 0x16, 0x56, 0x8b, 0x2d, 0xc4, 0x03, + 0x11, 0xdf, 0xb6, 0x54, 0xcd, 0xea, 0xd4, 0x7e, + 0x23, 0x85, 0xc3, 0x43, 0x62, 0x03, 0xdd, 0x83, + 0x6f, 0x9c, 0x64, 0xd9, 0x74, 0x62, 0xad, 0x5d, + 0xfa, 0x63, 0xb5, 0xcf, 0xe0, 0x8a, 0xcb, 0x95, + 0x32, 0x86, 0x6f, 0x5c, 0xa7, 0x87, 0x56, 0x6f, + 0xca, 0x93, 0xe6, 0xb1, 0x69, 0x3e, 0xe1, 0x5c, + 0xf6, 0xf7, 0xa2, 0xd6, 0x89, 0xd9, 0x74, 0x17, + 0x98, 0xdc, 0x1c, 0x23, 0x8e, 0x1b, 0xe6, 0x50, + 0x73, 0x3b, 0x18, 0xfb, 0x34, 0xff, 0x88, 0x0e, + 0x16, 0xbb, 0xd2, 0x1b, 0x47, 0xac + }, + .len = 2800 + }, + .ciphertext = { + .data = { + 0x4b, 0xbf, 0xa9, 0x1b, 0xa2, 0x5d, 0x47, 0xdb, + 0x9a, 0x9f, 0x19, 0x0d, 0x96, 0x2a, 0x19, 0xab, + 0x32, 0x39, 0x26, 0xb3, 0x51, 0xfb, 0xd3, 0x9e, + 0x35, 0x1e, 0x05, 0xda, 0x8b, 0x89, 0x25, 0xe3, + 0x0b, 0x1c, 0xce, 0x0d, 0x12, 0x21, 0x10, 0x10, + 0x95, 0x81, 0x5c, 0xc7, 0xcb, 0x63, 0x19, 0x50, + 0x9e, 0xc0, 0xd6, 0x79, 0x40, 0x49, 0x19, 0x87, + 0xe1, 0x3f, 0x0a, 0xff, 0xac, 0x33, 0x2a, 0xa6, + 0xaa, 0x64, 0x62, 0x6d, 0x3e, 0x9a, 0x19, 0x17, + 0x51, 0x9e, 0x0b, 0x97, 0xb6, 0x55, 0xc6, 0xa1, + 0x65, 0xe4, 0x4c, 0xa9, 0xfe, 0xac, 0x07, 0x90, + 0xd2, 0xa3, 0x21, 0xad, 0x3d, 0x86, 0xb7, 0x9c, + 0x51, 0x38, 0x73, 0x9f, 0xa3, 0x8d, 0x88, 0x7e, + 0xc7, 0xde, 0xf4, 0x49, 0xce, 0x8a, 0xbd, 0xd3, + 0xe7, 0xf8, 0xdc, 0x4c, 0xa9, 0xe7, 0xb7, 0x33, + 0x14, 0xad, 0x31, 0x0f, 0x90, 0x25, 0xe6, 0x19, + 0x46, 0xb3, 0xa5, 0x6d, 0xc6, 0x49, 0xec, 0x0d, + 0xa0, 0xd6, 0x39, 0x43, 0xdf, 0xf5, 0x92, 0xcf, + 0x96, 0x2a, 0x7e, 0xfb, 0x2c, 0x85, 0x24, 0xe3, + 0x5a, 0x2a, 0x6e, 0x78, 0x79, 0xd6, 0x26, 0x04, + 0xef, 0x26, 0x86, 0x95, 0xfa, 0x40, 0x03, 0x02, + 0x7e, 0x22, 0xe6, 0x08, 0x30, 0x77, 0x52, 0x20, + 0x64, 0xbd, 0x4a, 0x5b, 0x90, 0x6b, 0x5f, 0x53, + 0x12, 0x74, 0xf2, 0x35, 0xed, 0x50, 0x6c, 0xff, + 0x01, 0x54, 0xc7, 0x54, 0x92, 0x8a, 0x0c, 0xe5, + 0x47, 0x6f, 0x2c, 0xb1, 0x02, 0x0a, 0x12, 0x22, + 0xd3, 0x2c, 0x14, 0x55, 0xec, 0xae, 0xf1, 0xe3, + 0x68, 0xfb, 0x34, 0x4d, 0x17, 0x35, 0xbf, 0xbe, + 0xde, 0xb7, 0x1d, 0x0a, 0x33, 0xa2, 0xa5, 0x4b, + 0x1d, 0xa5, 0xa2, 0x94, 0xe6, 0x79, 0x14, 0x4d, + 0xdf, 0x11, 0xeb, 0x1a, 0x3d, 0xe8, 0xcf, 0x0c, + 0xc0, 0x61, 0x91, 0x79, 0x74, 0xf3, 0x5c, 0x1d, + 0x9c, 0xa0, 0xac, 0x81, 0x80, 0x7f, 0x8f, 0xcc, + 0xe6, 0x19, 0x9a, 0x6c, 0x77, 0x12, 0xda, 0x86, + 0x50, 0x21, 0xb0, 0x4c, 0xe0, 0x43, 0x95, 0x16, + 0xf1, 0xa5, 0x26, 0xcc, 0xda, 0x9f, 0xd9, 0xab, + 0xbd, 0x53, 0xc3, 0xa6, 0x84, 0xf9, 0xae, 0x1e, + 0x7e, 0xe6, 0xb1, 0x1d, 0xa1, 0x38, 0xea, 0x82, + 0x6c, 0x55, 0x16, 0xb5, 0xaa, 0xdf, 0x1a, 0xbb, + 0xe3, 0x6f, 0xa7, 0xff, 0xf9, 0x2e, 0x3a, 0x11, + 0x76, 0x06, 0x4e, 0x8d, 0x95, 0xf2, 0xe4, 0x88, + 0x2b, 0x55, 0x00, 0xb9, 0x32, 0x28, 0xb2, 0x19, + 0x4a, 0x47, 0x5c, 0x1a, 0x27, 0xf6, 0x3f, 0x9f, + 0xfd, 0x26, 0x49, 0x89, 0xa1, 0xbc + }, + .len = 2800 + }, + .validDataLenInBits = { + .len = 2798 + }, + .validCipherLenInBits = { + .len = 2798 + }, + .validCipherOffsetLenInBits = { + .len = 128 + } +}; + +struct zuc_test_data zuc_test_case_5 = { + .key = { + .data = { + 0xe1, 0x3f, 0xed, 0x21, 0xb4, 0x6e, 0x4e, 0x7e, + 0xc3, 0x12, 0x53, 0xb2, 0xbb, 0x17, 0xb3, 0xe0 + }, + .len = 16 + }, + .iv = { + .data = { + 0x27, 0x38, 0xcd, 0xaa, 0xd0, 0x00, 0x00, 0x00, + 0x27, 0x38, 0xcd, 0xaa, 0xd0, 0x00, 0x00, 0x00 + }, + .len = 16 + }, + .plaintext = { + .data = { + 0x8d, 0x74, 0xe2, 0x0d, 0x54, 0x89, 0x4e, 0x06, + 0xd3, 0xcb, 0x13, 0xcb, 0x39, 0x33, 0x06, 0x5e, + 0x86, 0x74, 0xbe, 0x62, 0xad, 0xb1, 0xc7, 0x2b, + 0x3a, 0x64, 0x69, 0x65, 0xab, 0x63, 0xcb, 0x7b, + 0x78, 0x54, 0xdf, 0xdc, 0x27, 0xe8, 0x49, 0x29, + 0xf4, 0x9c, 0x64, 0xb8, 0x72, 0xa4, 0x90, 0xb1, + 0x3f, 0x95, 0x7b, 0x64, 0x82, 0x7e, 0x71, 0xf4, + 0x1f, 0xbd, 0x42, 0x69, 0xa4, 0x2c, 0x97, 0xf8, + 0x24, 0x53, 0x70, 0x27, 0xf8, 0x6e, 0x9f, 0x4a, + 0xd8, 0x2d, 0x1d, 0xf4, 0x51, 0x69, 0x0f, 0xdd, + 0x98, 0xb6, 0xd0, 0x3f, 0x3a, 0x0e, 0xbe, 0x3a, + 0x31, 0x2d, 0x6b, 0x84, 0x0b, 0xa5, 0xa1, 0x82, + 0x0b, 0x2a, 0x2c, 0x97, 0x09, 0xc0, 0x90, 0xd2, + 0x45, 0xed, 0x26, 0x7c, 0xf8, 0x45, 0xae, 0x41, + 0xfa, 0x97, 0x5d, 0x33, 0x33, 0xac, 0x30, 0x09, + 0xfd, 0x40, 0xeb, 0xa9, 0xeb, 0x5b, 0x88, 0x57, + 0x14, 0xb7, 0x68, 0xb6, 0x97, 0x13, 0x8b, 0xaf, + 0x21, 0x38, 0x0e, 0xca, 0x49, 0xf6, 0x44, 0xd4, + 0x86, 0x89, 0xe4, 0x21, 0x57, 0x60, 0xb9, 0x06, + 0x73, 0x9f, 0x0d, 0x2b, 0x3f, 0x09, 0x11, 0x33, + 0xca, 0x15, 0xd9, 0x81, 0xcb, 0xe4, 0x01, 0xba, + 0xf7, 0x2d, 0x05, 0xac, 0xe0, 0x5c, 0xcc, 0xb2, + 0xd2, 0x97, 0xf4, 0xef, 0x6a, 0x5f, 0x58, 0xd9, + 0x12, 0x46, 0xcf, 0xa7, 0x72, 0x15, 0xb8, 0x92, + 0xab, 0x44, 0x1d, 0x52, 0x78, 0x45, 0x27, 0x95, + 0xcc, 0xb7, 0xf5, 0xd7, 0x90, 0x57, 0xa1, 0xc4, + 0xf7, 0x7f, 0x80, 0xd4, 0x6d, 0xb2, 0x03, 0x3c, + 0xb7, 0x9b, 0xed, 0xf8, 0xe6, 0x05, 0x51, 0xce, + 0x10, 0xc6, 0x67, 0xf6, 0x2a, 0x97, 0xab, 0xaf, + 0xab, 0xbc, 0xd6, 0x77, 0x20, 0x18, 0xdf, 0x96, + 0xa2, 0x82, 0xea, 0x73, 0x7c, 0xe2, 0xcb, 0x33, + 0x12, 0x11, 0xf6, 0x0d, 0x53, 0x54, 0xce, 0x78, + 0xf9, 0x91, 0x8d, 0x9c, 0x20, 0x6c, 0xa0, 0x42, + 0xc9, 0xb6, 0x23, 0x87, 0xdd, 0x70, 0x96, 0x04, + 0xa5, 0x0a, 0xf1, 0x6d, 0x8d, 0x35, 0xa8, 0x90, + 0x6b, 0xe4, 0x84, 0xcf, 0x2e, 0x74, 0xa9, 0x28, + 0x99, 0x40, 0x36, 0x43, 0x53, 0x24, 0x9b, 0x27, + 0xb4, 0xc9, 0xae, 0x29, 0xed, 0xdf, 0xc7, 0xda, + 0x64, 0x18, 0x79, 0x1a, 0x4e, 0x7b, 0xaa, 0x06, + 0x60, 0xfa, 0x64, 0x51, 0x1f, 0x2d, 0x68, 0x5c, + 0xc3, 0xa5, 0xff, 0x70, 0xe0, 0xd2, 0xb7, 0x42, + 0x92, 0xe3, 0xb8, 0xa0, 0xcd, 0x6b, 0x04, 0xb1, + 0xc7, 0x90, 0xb8, 0xea, 0xd2, 0x70, 0x37, 0x08, + 0x54, 0x0d, 0xea, 0x2f, 0xc0, 0x9c, 0x3d, 0xa7, + 0x70, 0xf6, 0x54, 0x49, 0xe8, 0x4d, 0x81, 0x7a, + 0x4f, 0x55, 0x10, 0x55, 0xe1, 0x9a, 0xb8, 0x50, + 0x18, 0xa0, 0x02, 0x8b, 0x71, 0xa1, 0x44, 0xd9, + 0x67, 0x91, 0xe9, 0xa3, 0x57, 0x79, 0x33, 0x50, + 0x4e, 0xee, 0x00, 0x60, 0x34, 0x0c, 0x69, 0xd2, + 0x74, 0xe1, 0xbf, 0x9d, 0x80, 0x5d, 0xcb, 0xcc, + 0x1a, 0x6f, 0xaa, 0x97, 0x68, 0x00, 0xb6, 0xff, + 0x2b, 0x67, 0x1d, 0xc4, 0x63, 0x65, 0x2f, 0xa8, + 0xa3, 0x3e, 0xe5, 0x09, 0x74, 0xc1, 0xc2, 0x1b, + 0xe0, 0x1e, 0xab, 0xb2, 0x16, 0x74, 0x30, 0x26, + 0x9d, 0x72, 0xee, 0x51, 0x1c, 0x9d, 0xde, 0x30, + 0x79, 0x7c, 0x9a, 0x25, 0xd8, 0x6c, 0xe7, 0x4f, + 0x5b, 0x96, 0x1b, 0xe5, 0xfd, 0xfb, 0x68, 0x07, + 0x81, 0x40, 0x39, 0xe7, 0x13, 0x76, 0x36, 0xbd, + 0x1d, 0x7f, 0xa9, 0xe0, 0x9e, 0xfd, 0x20, 0x07, + 0x50, 0x59, 0x06, 0xa5, 0xac, 0x45, 0xdf, 0xde, + 0xed, 0x77, 0x57, 0xbb, 0xee, 0x74, 0x57, 0x49, + 0xc2, 0x96, 0x33, 0x35, 0x0b, 0xee, 0x0e, 0xa6, + 0xf4, 0x09, 0xdf, 0x45, 0x80, 0x16, 0x00 + }, + .len = 4024 + }, + .ciphertext = { + .data = { + 0x94, 0xea, 0xa4, 0xaa, 0x30, 0xa5, 0x71, 0x37, + 0xdd, 0xf0, 0x9b, 0x97, 0xb2, 0x56, 0x18, 0xa2, + 0x0a, 0x13, 0xe2, 0xf1, 0x0f, 0xa5, 0xbf, 0x81, + 0x61, 0xa8, 0x79, 0xcc, 0x2a, 0xe7, 0x97, 0xa6, + 0xb4, 0xcf, 0x2d, 0x9d, 0xf3, 0x1d, 0xeb, 0xb9, + 0x90, 0x5c, 0xcf, 0xec, 0x97, 0xde, 0x60, 0x5d, + 0x21, 0xc6, 0x1a, 0xb8, 0x53, 0x1b, 0x7f, 0x3c, + 0x9d, 0xa5, 0xf0, 0x39, 0x31, 0xf8, 0xa0, 0x64, + 0x2d, 0xe4, 0x82, 0x11, 0xf5, 0xf5, 0x2f, 0xfe, + 0xa1, 0x0f, 0x39, 0x2a, 0x04, 0x76, 0x69, 0x98, + 0x5d, 0xa4, 0x54, 0xa2, 0x8f, 0x08, 0x09, 0x61, + 0xa6, 0xc2, 0xb6, 0x2d, 0xaa, 0x17, 0xf3, 0x3c, + 0xd6, 0x0a, 0x49, 0x71, 0xf4, 0x8d, 0x2d, 0x90, + 0x93, 0x94, 0xa5, 0x5f, 0x48, 0x11, 0x7a, 0xce, + 0x43, 0xd7, 0x08, 0xe6, 0xb7, 0x7d, 0x3d, 0xc4, + 0x6d, 0x8b, 0xc0, 0x17, 0xd4, 0xd1, 0xab, 0xb7, + 0x7b, 0x74, 0x28, 0xc0, 0x42, 0xb0, 0x6f, 0x2f, + 0x99, 0xd8, 0xd0, 0x7c, 0x98, 0x79, 0xd9, 0x96, + 0x00, 0x12, 0x7a, 0x31, 0x98, 0x5f, 0x10, 0x99, + 0xbb, 0xd7, 0xd6, 0xc1, 0x51, 0x9e, 0xde, 0x8f, + 0x5e, 0xeb, 0x4a, 0x61, 0x0b, 0x34, 0x9a, 0xc0, + 0x1e, 0xa2, 0x35, 0x06, 0x91, 0x75, 0x6b, 0xd1, + 0x05, 0xc9, 0x74, 0xa5, 0x3e, 0xdd, 0xb3, 0x5d, + 0x1d, 0x41, 0x00, 0xb0, 0x12, 0xe5, 0x22, 0xab, + 0x41, 0xf4, 0xc5, 0xf2, 0xfd, 0xe7, 0x6b, 0x59, + 0xcb, 0x8b, 0x96, 0xd8, 0x85, 0xcf, 0xe4, 0x08, + 0x0d, 0x13, 0x28, 0xa0, 0xd6, 0x36, 0xcc, 0x0e, + 0xdc, 0x05, 0x80, 0x0b, 0x76, 0xac, 0xca, 0x8f, + 0xef, 0x67, 0x20, 0x84, 0xd1, 0xf5, 0x2a, 0x8b, + 0xbd, 0x8e, 0x09, 0x93, 0x32, 0x09, 0x92, 0xc7, + 0xff, 0xba, 0xe1, 0x7c, 0x40, 0x84, 0x41, 0xe0, + 0xee, 0x88, 0x3f, 0xc8, 0xa8, 0xb0, 0x5e, 0x22, + 0xf5, 0xff, 0x7f, 0x8d, 0x1b, 0x48, 0xc7, 0x4c, + 0x46, 0x8c, 0x46, 0x7a, 0x02, 0x8f, 0x09, 0xfd, + 0x7c, 0xe9, 0x11, 0x09, 0xa5, 0x70, 0xa2, 0xd5, + 0xc4, 0xd5, 0xf4, 0xfa, 0x18, 0xc5, 0xdd, 0x3e, + 0x45, 0x62, 0xaf, 0xe2, 0x4e, 0xf7, 0x71, 0x90, + 0x1f, 0x59, 0xaf, 0x64, 0x58, 0x98, 0xac, 0xef, + 0x08, 0x8a, 0xba, 0xe0, 0x7e, 0x92, 0xd5, 0x2e, + 0xb2, 0xde, 0x55, 0x04, 0x5b, 0xb1, 0xb7, 0xc4, + 0x16, 0x4e, 0xf2, 0xd7, 0xa6, 0xca, 0xc1, 0x5e, + 0xeb, 0x92, 0x6d, 0x7e, 0xa2, 0xf0, 0x8b, 0x66, + 0xe1, 0xf7, 0x59, 0xf3, 0xae, 0xe4, 0x46, 0x14, + 0x72, 0x5a, 0xa3, 0xc7, 0x48, 0x2b, 0x30, 0x84, + 0x4c, 0x14, 0x3f, 0xf8, 0x5b, 0x53, 0xf1, 0xe5, + 0x83, 0xc5, 0x01, 0x25, 0x7d, 0xdd, 0xd0, 0x96, + 0xb8, 0x12, 0x68, 0xda, 0xa3, 0x03, 0xf1, 0x72, + 0x34, 0xc2, 0x33, 0x35, 0x41, 0xf0, 0xbb, 0x8e, + 0x19, 0x06, 0x48, 0xc5, 0x80, 0x7c, 0x86, 0x6d, + 0x71, 0x93, 0x22, 0x86, 0x09, 0xad, 0xb9, 0x48, + 0x68, 0x6f, 0x7d, 0xe2, 0x94, 0xa8, 0x02, 0xcc, + 0x38, 0xf7, 0xfe, 0x52, 0x08, 0xf5, 0xea, 0x31, + 0x96, 0xd0, 0x16, 0x7b, 0x9b, 0xdd, 0x02, 0xf0, + 0xd2, 0xa5, 0x22, 0x1c, 0xa5, 0x08, 0xf8, 0x93, + 0xaf, 0x5c, 0x4b, 0x4b, 0xb9, 0xf4, 0xf5, 0x20, + 0xfd, 0x84, 0x28, 0x9b, 0x3d, 0xbe, 0x7e, 0x61, + 0x49, 0x7a, 0x7e, 0x2a, 0x58, 0x40, 0x37, 0xea, + 0x63, 0x7b, 0x69, 0x81, 0x12, 0x71, 0x74, 0xaf, + 0x57, 0xb4, 0x71, 0xdf, 0x4b, 0x27, 0x68, 0xfd, + 0x79, 0xc1, 0x54, 0x0f, 0xb3, 0xed, 0xf2, 0xea, + 0x22, 0xcb, 0x69, 0xbe, 0xc0, 0xcf, 0x8d, 0x93, + 0x3d, 0x9c, 0x6f, 0xdd, 0x64, 0x5e, 0x85, 0x05, + 0x91, 0xcc, 0xa3, 0xd6, 0x2c, 0x0c, 0xc0 + }, + .len = 4024 + }, + .validDataLenInBits = { + .len = 4019 + }, + .validCipherLenInBits = { + .len = 4019 + }, + .validCipherOffsetLenInBits = { + .len = 128 + } +}; + +#endif /* TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ */ -- 2.7.4