X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=test%2Ftest%2Ftest_cryptodev_zuc_test_vectors.h;h=9ff821a18d9460f068ddb2673dfe4241d56d67f0;hb=56252de779a68df5f49c04a49b404fa693719d01;hp=a900e9165943bb77cbc4d202d19113cbbf06d905;hpb=a81a81850fb1021248a7117c6537ba99e30fa40f;p=dpdk.git diff --git a/test/test/test_cryptodev_zuc_test_vectors.h b/test/test/test_cryptodev_zuc_test_vectors.h index a900e91659..9ff821a18d 100644 --- a/test/test/test_cryptodev_zuc_test_vectors.h +++ b/test/test/test_cryptodev_zuc_test_vectors.h @@ -1,33 +1,5 @@ -/*- - * 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. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2016-2017 Intel Corporation */ #ifndef TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ @@ -42,7 +14,7 @@ struct wireless_test_data { struct { uint8_t data[64] __rte_aligned(16); unsigned len; - } iv; + } cipher_iv; struct { uint8_t data[2048]; @@ -62,22 +34,14 @@ struct wireless_test_data { unsigned len; } validCipherLenInBits; - struct { - unsigned len; - } validCipherOffsetLenInBits; - struct { unsigned len; } validAuthLenInBits; - struct { - unsigned len; - } validAuthOffsetLenInBits; - struct { uint8_t data[64]; unsigned len; - } aad; + } auth_iv; struct { uint8_t data[64]; @@ -92,7 +56,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 @@ -122,9 +86,6 @@ static struct wireless_test_data zuc_test_case_cipher_193b = { }, .validCipherLenInBits = { .len = 193 - }, - .validCipherOffsetLenInBits = { - .len = 128 } }; @@ -136,7 +97,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,9 +145,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b = { }, .validCipherLenInBits = { .len = 800 - }, - .validCipherOffsetLenInBits = { - .len = 128 } }; @@ -198,7 +156,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 @@ -270,10 +228,7 @@ static struct wireless_test_data zuc_test_case_cipher_1570b = { }, .validCipherLenInBits = { .len = 1570 - }, - .validCipherOffsetLenInBits = { - .len = 128 - }, + } }; static struct wireless_test_data zuc_test_case_cipher_2798b = { @@ -284,7 +239,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 @@ -394,9 +349,6 @@ static struct wireless_test_data zuc_test_case_cipher_2798b = { }, .validCipherLenInBits = { .len = 2798 - }, - .validCipherOffsetLenInBits = { - .len = 128 } }; @@ -408,7 +360,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 @@ -556,9 +508,6 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = { }, .validCipherLenInBits = { .len = 4019 - }, - .validCipherOffsetLenInBits = { - .len = 128 } }; @@ -570,7 +519,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 @@ -601,10 +550,7 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = { .validCipherLenInBits = { .len = 200 }, - .validCipherOffsetLenInBits = { - .len = 128 - }, - .aad = { + .auth_iv = { .data = { 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 @@ -617,9 +563,6 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = { }, .validAuthLenInBits = { .len = 200 - }, - .validAuthOffsetLenInBits = { - .len = 128 } }; @@ -631,7 +574,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 @@ -680,10 +623,7 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = { .validCipherLenInBits = { .len = 800 }, - .validCipherOffsetLenInBits = { - .len = 128 - }, - .aad = { + .auth_iv = { .data = { 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 @@ -696,9 +636,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = { }, .validAuthLenInBits = { .len = 120 - }, - .validAuthOffsetLenInBits = { - .len = 128 } }; @@ -710,7 +647,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 @@ -724,9 +661,6 @@ struct wireless_test_data zuc_test_case_auth_1b = { .validAuthLenInBits = { .len = 1 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0xC8, 0xA9, 0x59, 0x5E}, .len = 4 @@ -741,7 +675,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 @@ -758,9 +692,6 @@ struct wireless_test_data zuc_test_case_auth_90b = { .validAuthLenInBits = { .len = 90 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0x67, 0x19, 0xA0, 0x88}, .len = 4 @@ -775,7 +706,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 @@ -800,9 +731,6 @@ struct wireless_test_data zuc_test_case_auth_577b = { .validAuthLenInBits = { .len = 577 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0xFA, 0xE8, 0xFF, 0x0B}, .len = 4 @@ -817,7 +745,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 @@ -865,9 +793,6 @@ struct wireless_test_data zuc_test_case_auth_2079b = { .validAuthLenInBits = { .len = 2079 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0x00, 0x4A, 0xC4, 0xD6}, .len = 4 @@ -882,7 +807,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 @@ -986,9 +911,6 @@ struct wireless_test_data zuc_test_auth_5670b = { .validAuthLenInBits = { .len = 5670 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0x0C, 0xA1, 0x27, 0x92}, .len = 4 @@ -1000,7 +922,7 @@ static struct wireless_test_data zuc_test_case_auth_128b = { .data = { 0x0 }, .len = 16 }, - .aad = { + .auth_iv = { .data = { 0x0 }, .len = 16 }, @@ -1011,9 +933,6 @@ static struct wireless_test_data zuc_test_case_auth_128b = { .validAuthLenInBits = { .len = 8 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = { 0x39, 0x0a, 0x91, 0xb7 }, .len = 4 @@ -1028,7 +947,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 @@ -1076,9 +995,6 @@ static struct wireless_test_data zuc_test_case_auth_2080b = { .validAuthLenInBits = { .len = 2080 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0x03, 0x95, 0x32, 0xe1}, .len = 4 @@ -1093,7 +1009,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 @@ -1118,9 +1034,6 @@ static struct wireless_test_data zuc_test_case_auth_584b = { .validAuthLenInBits = { .len = 584 }, - .validAuthOffsetLenInBits = { - .len = 128 - }, .digest = { .data = {0x24, 0xa8, 0x42, 0xb3}, .len = 4