1/*-
2 *   BSD LICENSE
3 *
4 *   Copyright(c) 2016 Intel Corporation. All rights reserved.
5 *
6 *   Redistribution and use in source and binary forms, with or without
7 *   modification, are permitted provided that the following conditions
8 *   are met:
9 *
10 *   * Redistributions of source code must retain the above copyright
11 *     notice, this list of conditions and the following disclaimer.
12 *   * Redistributions in binary form must reproduce the above copyright
13 *     notice, this list of conditions and the following disclaimer in
14 *     the documentation and/or other materials provided with the
15 *     distribution.
16 *   * Neither the name of Intel Corporation nor the names of its
17 *     contributors may be used to endorse or promote products derived
18 *     from this software without specific prior written permission.
19 *
20 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 *   "AS IS" AND ANY ExPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 *   SPECIAL, ExEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_
34#define TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_
35
36struct zuc_test_data {
37	struct {
38		uint8_t data[64];
39		unsigned len;
40	} key;
41
42	struct {
43		uint8_t data[64] __rte_aligned(16);
44		unsigned len;
45	} iv;
46
47	struct {
48		uint8_t data[1024];
49		unsigned len; /* length must be in Bits */
50	} plaintext;
51
52	struct {
53		uint8_t data[1024];
54		unsigned len; /* length must be in Bits */
55	} ciphertext;
56
57	struct {
58		unsigned len;
59	} validDataLenInBits;
60
61	struct {
62		unsigned len;
63	} validCipherLenInBits;
64
65	struct {
66		unsigned len;
67	} validCipherOffsetLenInBits;
68
69	struct {
70		unsigned len;
71	} validAuthLenInBits;
72
73	struct {
74		unsigned len;
75	} validAuthOffsetLenInBits;
76
77	struct {
78		uint8_t data[64];
79		unsigned len;
80	} aad;
81
82	struct {
83		uint8_t data[64];
84		unsigned len;
85	} digest;
86};
87struct zuc_test_data zuc_test_case_1 = {
88	.key = {
89		.data = {
90			0x17, 0x3D, 0x14, 0xBA, 0x50, 0x03, 0x73, 0x1D,
91			0x7A, 0x60, 0x04, 0x94, 0x70, 0xF0, 0x0A, 0x29
92		},
93		.len = 16
94	},
95	.iv = {
96		.data = {
97			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
98			0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
99		},
100		.len = 16
101	},
102	.plaintext = {
103		.data = {
104			0x6C, 0xF6, 0x53, 0x40, 0x73, 0x55, 0x52, 0xAB,
105			0x0C, 0x97, 0x52, 0xFA, 0x6F, 0x90, 0x25, 0xFE,
106			0x0B, 0xD6, 0x75, 0xD9, 0x00, 0x58, 0x75, 0xB2,
107			0x00
108		},
109		.len = 200
110	},
111	.ciphertext = {
112		.data = {
113			0xA6, 0xC8, 0x5F, 0xC6, 0x6A, 0xFB, 0x85, 0x33,
114			0xAA, 0xFC, 0x25, 0x18, 0xDF, 0xE7, 0x84, 0x94,
115			0x0E, 0xE1, 0xE4, 0xB0, 0x30, 0x23, 0x8C, 0xC8,
116			0x00
117		},
118		.len = 200
119	},
120	.validDataLenInBits = {
121		.len = 193
122	},
123	.validCipherLenInBits = {
124		.len = 193
125	},
126	.validCipherOffsetLenInBits = {
127		.len = 128
128	}
129};
130
131struct zuc_test_data zuc_test_case_2 = {
132	.key = {
133		.data = {
134			0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
135			0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A
136		},
137		.len = 16
138	},
139	.iv = {
140		.data = {
141			0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
142			0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
143		},
144		.len = 16
145	},
146	.plaintext = {
147		.data = {
148			0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
149			0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
150			0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07, 0xE4, 0x67,
151			0xC4, 0xE5, 0x60, 0x00, 0xBA, 0x33, 0x8F, 0x5D,
152			0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
153			0x46, 0xC8, 0x0D, 0x3B, 0x38, 0xF0, 0x7F, 0x4B,
154			0xE2, 0xD8, 0xFF, 0x58, 0x05, 0xF5, 0x13, 0x22,
155			0x29, 0xBD, 0xE9, 0x3B, 0xBB, 0xDC, 0xAF, 0x38,
156			0x2B, 0xF1, 0xEE, 0x97, 0x2F, 0xBF, 0x99, 0x77,
157			0xBA, 0xDA, 0x89, 0x45, 0x84, 0x7A, 0x2A, 0x6C,
158			0x9A, 0xD3, 0x4A, 0x66, 0x75, 0x54, 0xE0, 0x4D,
159			0x1F, 0x7F, 0xA2, 0xC3, 0x32, 0x41, 0xBD, 0x8F,
160			0x01, 0xBA, 0x22, 0x0D
161		},
162		.len = 800
163	},
164	.ciphertext = {
165		.data = {
166			0x13, 0x1D, 0x43, 0xE0, 0xDE, 0xA1, 0xBE, 0x5C,
167			0x5A, 0x1B, 0xFD, 0x97, 0x1D, 0x85, 0x2C, 0xBF,
168			0x71, 0x2D, 0x7B, 0x4F, 0x57, 0x96, 0x1F, 0xEA,
169			0x32, 0x08, 0xAF, 0xA8, 0xBC, 0xA4, 0x33, 0xF4,
170			0x56, 0xAD, 0x09, 0xC7, 0x41, 0x7E, 0x58, 0xBC,
171			0x69, 0xCF, 0x88, 0x66, 0xD1, 0x35, 0x3F, 0x74,
172			0x86, 0x5E, 0x80, 0x78, 0x1D, 0x20, 0x2D, 0xFB,
173			0x3E, 0xCF, 0xF7, 0xFC, 0xBC, 0x3B, 0x19, 0x0F,
174			0xE8, 0x2A, 0x20, 0x4E, 0xD0, 0xE3, 0x50, 0xFC,
175			0x0F, 0x6F, 0x26, 0x13, 0xB2, 0xF2, 0xBC, 0xA6,
176			0xDF, 0x5A, 0x47, 0x3A, 0x57, 0xA4, 0xA0, 0x0D,
177			0x98, 0x5E, 0xBA, 0xD8, 0x80, 0xD6, 0xF2, 0x38,
178			0x64, 0xA0, 0x7B, 0x01
179		},
180		.len = 800
181	},
182	.validDataLenInBits = {
183		.len = 800
184	},
185	.validCipherLenInBits = {
186		.len = 800
187	},
188	.validCipherOffsetLenInBits = {
189		.len = 128
190	}
191};
192
193struct zuc_test_data zuc_test_case_3 = {
194	.key = {
195		.data = {
196			0xD4, 0x55, 0x2A, 0x8F, 0xD6, 0xE6, 0x1C, 0xC8,
197			0x1A, 0x20, 0x09, 0x14, 0x1A, 0x29, 0xC1, 0x0B
198		},
199		.len = 16
200	},
201	.iv = {
202		.data = {
203			0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00,
204			0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00
205		},
206		.len = 16
207	},
208	.plaintext = {
209		.data = {
210			0x38, 0xF0, 0x7F, 0x4B, 0xE2, 0xD8, 0xFF, 0x58,
211			0x05, 0xF5, 0x13, 0x22, 0x29, 0xBD, 0xE9, 0x3B,
212			0xBB, 0xDC, 0xAF, 0x38, 0x2B, 0xF1, 0xEE, 0x97,
213			0x2F, 0xBF, 0x99, 0x77, 0xBA, 0xDA, 0x89, 0x45,
214			0x84, 0x7A, 0x2A, 0x6C, 0x9A, 0xD3, 0x4A, 0x66,
215			0x75, 0x54, 0xE0, 0x4D, 0x1F, 0x7F, 0xA2, 0xC3,
216			0x32, 0x41, 0xBD, 0x8F, 0x01, 0xBA, 0x22, 0x0D,
217			0x3C, 0xA4, 0xEC, 0x41, 0xE0, 0x74, 0x59, 0x5F,
218			0x54, 0xAE, 0x2B, 0x45, 0x4F, 0xD9, 0x71, 0x43,
219			0x20, 0x43, 0x60, 0x19, 0x65, 0xCC, 0xA8, 0x5C,
220			0x24, 0x17, 0xED, 0x6C, 0xBE, 0xC3, 0xBA, 0xDA,
221			0x84, 0xFC, 0x8A, 0x57, 0x9A, 0xEA, 0x78, 0x37,
222			0xB0, 0x27, 0x11, 0x77, 0x24, 0x2A, 0x64, 0xDC,
223			0x0A, 0x9D, 0xE7, 0x1A, 0x8E, 0xDE, 0xE8, 0x6C,
224			0xA3, 0xD4, 0x7D, 0x03, 0x3D, 0x6B, 0xF5, 0x39,
225			0x80, 0x4E, 0xCA, 0x86, 0xC5, 0x84, 0xA9, 0x05,
226			0x2D, 0xE4, 0x6A, 0xD3, 0xFC, 0xED, 0x65, 0x54,
227			0x3B, 0xD9, 0x02, 0x07, 0x37, 0x2B, 0x27, 0xAF,
228			0xB7, 0x92, 0x34, 0xF5, 0xFF, 0x43, 0xEA, 0x87,
229			0x08, 0x20, 0xE2, 0xC2, 0xB7, 0x8A, 0x8A, 0xAE,
230			0x61, 0xCC, 0xE5, 0x2A, 0x05, 0x15, 0xE3, 0x48,
231			0xD1, 0x96, 0x66, 0x4A, 0x34, 0x56, 0xB1, 0x82,
232			0xA0, 0x7C, 0x40, 0x6E, 0x4A, 0x20, 0x79, 0x12,
233			0x71, 0xCF, 0xED, 0xA1, 0x65, 0xD5, 0x35, 0xEC,
234			0x5E, 0xA2, 0xD4, 0xDF, 0x40
235		},
236		.len = 1576
237	},
238	.ciphertext = {
239		.data = {
240			0x83, 0x83, 0xB0, 0x22, 0x9F, 0xCC, 0x0B, 0x9D,
241			0x22, 0x95, 0xEC, 0x41, 0xC9, 0x77, 0xE9, 0xC2,
242			0xBB, 0x72, 0xE2, 0x20, 0x37, 0x81, 0x41, 0xF9,
243			0xC8, 0x31, 0x8F, 0x3A, 0x27, 0x0D, 0xFB, 0xCD,
244			0xEE, 0x64, 0x11, 0xC2, 0xB3, 0x04, 0x4F, 0x17,
245			0x6D, 0xC6, 0xE0, 0x0F, 0x89, 0x60, 0xF9, 0x7A,
246			0xFA, 0xCD, 0x13, 0x1A, 0xD6, 0xA3, 0xB4, 0x9B,
247			0x16, 0xB7, 0xBA, 0xBC, 0xF2, 0xA5, 0x09, 0xEB,
248			0xB1, 0x6A, 0x75, 0xDC, 0xAB, 0x14, 0xFF, 0x27,
249			0x5D, 0xBE, 0xEE, 0xA1, 0xA2, 0xB1, 0x55, 0xF9,
250			0xD5, 0x2C, 0x26, 0x45, 0x2D, 0x01, 0x87, 0xC3,
251			0x10, 0xA4, 0xEE, 0x55, 0xBE, 0xAA, 0x78, 0xAB,
252			0x40, 0x24, 0x61, 0x5B, 0xA9, 0xF5, 0xD5, 0xAD,
253			0xC7, 0x72, 0x8F, 0x73, 0x56, 0x06, 0x71, 0xF0,
254			0x13, 0xE5, 0xE5, 0x50, 0x08, 0x5D, 0x32, 0x91,
255			0xDF, 0x7D, 0x5F, 0xEC, 0xED, 0xDE, 0xD5, 0x59,
256			0x64, 0x1B, 0x6C, 0x2F, 0x58, 0x52, 0x33, 0xBC,
257			0x71, 0xE9, 0x60, 0x2B, 0xD2, 0x30, 0x58, 0x55,
258			0xBB, 0xD2, 0x5F, 0xFA, 0x7F, 0x17, 0xEC, 0xBC,
259			0x04, 0x2D, 0xAA, 0xE3, 0x8C, 0x1F, 0x57, 0xAD,
260			0x8E, 0x8E, 0xBD, 0x37, 0x34, 0x6F, 0x71, 0xBE,
261			0xFD, 0xBB, 0x74, 0x32, 0xE0, 0xE0, 0xBB, 0x2C,
262			0xFC, 0x09, 0xBC, 0xD9, 0x65, 0x70, 0xCB, 0x0C,
263			0x0C, 0x39, 0xDF, 0x5E, 0x29, 0x29, 0x4E, 0x82,
264			0x70, 0x3A, 0x63, 0x7F, 0x80
265		},
266		.len = 1576
267	},
268	.validDataLenInBits = {
269		.len = 1570
270	},
271	.validCipherLenInBits = {
272		.len = 1570
273	},
274	.validCipherOffsetLenInBits = {
275		.len = 128
276	},
277	.aad = {
278		.data = {
279			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
280			0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
281		},
282		.len = 16
283	},
284	.digest = {
285		.data = {0xE8, 0x60, 0x5A, 0x3E},
286		.len  = 4
287	},
288	.validAuthLenInBits = {
289		.len = 120
290	},
291	.validAuthOffsetLenInBits = {
292		.len = 128
293	}
294};
295
296struct zuc_test_data zuc_test_case_4 = {
297	.key = {
298		.data = {
299			0xDB, 0x84, 0xB4, 0xFB, 0xCC, 0xDA, 0x56, 0x3B,
300			0x66, 0x22, 0x7B, 0xFE, 0x45, 0x6F, 0x0F, 0x77
301		},
302		.len = 16
303	},
304	.iv = {
305		.data = {
306			0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00,
307			0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00
308		},
309		.len = 16
310	},
311	.plaintext = {
312		.data = {
313			0xE5, 0x39, 0xF3, 0xB8, 0x97, 0x32, 0x40, 0xDA,
314			0x03, 0xF2, 0xB8, 0xAA, 0x05, 0xEE, 0x0A, 0x00,
315			0xDB, 0xAF, 0xC0, 0xE1, 0x82, 0x05, 0x5D, 0xFE,
316			0x3D, 0x73, 0x83, 0xD9, 0x2C, 0xEF, 0x40, 0xE9,
317			0x29, 0x28, 0x60, 0x5D, 0x52, 0xD0, 0x5F, 0x4F,
318			0x90, 0x18, 0xA1, 0xF1, 0x89, 0xAE, 0x39, 0x97,
319			0xCE, 0x19, 0x15, 0x5F, 0xB1, 0x22, 0x1D, 0xB8,
320			0xBB, 0x09, 0x51, 0xA8, 0x53, 0xAD, 0x85, 0x2C,
321			0xE1, 0x6C, 0xFF, 0x07, 0x38, 0x2C, 0x93, 0xA1,
322			0x57, 0xDE, 0x00, 0xDD, 0xB1, 0x25, 0xC7, 0x53,
323			0x9F, 0xD8, 0x50, 0x45, 0xE4, 0xEE, 0x07, 0xE0,
324			0xC4, 0x3F, 0x9E, 0x9D, 0x6F, 0x41, 0x4F, 0xC4,
325			0xD1, 0xC6, 0x29, 0x17, 0x81, 0x3F, 0x74, 0xC0,
326			0x0F, 0xC8, 0x3F, 0x3E, 0x2E, 0xD7, 0xC4, 0x5B,
327			0xA5, 0x83, 0x52, 0x64, 0xB4, 0x3E, 0x0B, 0x20,
328			0xAF, 0xDA, 0x6B, 0x30, 0x53, 0xBF, 0xB6, 0x42,
329			0x3B, 0x7F, 0xCE, 0x25, 0x47, 0x9F, 0xF5, 0xF1,
330			0x39, 0xDD, 0x9B, 0x5B, 0x99, 0x55, 0x58, 0xE2,
331			0xA5, 0x6B, 0xE1, 0x8D, 0xD5, 0x81, 0xCD, 0x01,
332			0x7C, 0x73, 0x5E, 0x6F, 0x0D, 0x0D, 0x97, 0xC4,
333			0xDD, 0xC1, 0xD1, 0xDA, 0x70, 0xC6, 0xDB, 0x4A,
334			0x12, 0xCC, 0x92, 0x77, 0x8E, 0x2F, 0xBB, 0xD6,
335			0xF3, 0xBA, 0x52, 0xAF, 0x91, 0xC9, 0xC6, 0xB6,
336			0x4E, 0x8D, 0xA4, 0xF7, 0xA2, 0xC2, 0x66, 0xD0,
337			0x2D, 0x00, 0x17, 0x53, 0xDF, 0x08, 0x96, 0x03,
338			0x93, 0xC5, 0xD5, 0x68, 0x88, 0xBF, 0x49, 0xEB,
339			0x5C, 0x16, 0xD9, 0xA8, 0x04, 0x27, 0xA4, 0x16,
340			0xBC, 0xB5, 0x97, 0xDF, 0x5B, 0xFE, 0x6F, 0x13,
341			0x89, 0x0A, 0x07, 0xEE, 0x13, 0x40, 0xE6, 0x47,
342			0x6B, 0x0D, 0x9A, 0xA8, 0xF8, 0x22, 0xAB, 0x0F,
343			0xD1, 0xAB, 0x0D, 0x20, 0x4F, 0x40, 0xB7, 0xCE,
344			0x6F, 0x2E, 0x13, 0x6E, 0xB6, 0x74, 0x85, 0xE5,
345			0x07, 0x80, 0x4D, 0x50, 0x45, 0x88, 0xAD, 0x37,
346			0xFF, 0xD8, 0x16, 0x56, 0x8B, 0x2D, 0xC4, 0x03,
347			0x11, 0xDF, 0xB6, 0x54, 0xCD, 0xEA, 0xD4, 0x7E,
348			0x23, 0x85, 0xC3, 0x43, 0x62, 0x03, 0xDD, 0x83,
349			0x6F, 0x9C, 0x64, 0xD9, 0x74, 0x62, 0xAD, 0x5D,
350			0xFA, 0x63, 0xB5, 0xCF, 0xE0, 0x8A, 0xCB, 0x95,
351			0x32, 0x86, 0x6F, 0x5C, 0xA7, 0x87, 0x56, 0x6F,
352			0xCA, 0x93, 0xE6, 0xB1, 0x69, 0x3E, 0xE1, 0x5C,
353			0xF6, 0xF7, 0xA2, 0xD6, 0x89, 0xD9, 0x74, 0x17,
354			0x98, 0xDC, 0x1C, 0x23, 0x8E, 0x1B, 0xE6, 0x50,
355			0x73, 0x3B, 0x18, 0xFB, 0x34, 0xFF, 0x88, 0x0E,
356			0x16, 0xBB, 0xD2, 0x1B, 0x47, 0xAC
357		},
358		.len = 2800
359	},
360	.ciphertext = {
361		.data = {
362			0x4B, 0xBF, 0xA9, 0x1B, 0xA2, 0x5D, 0x47, 0xDB,
363			0x9A, 0x9F, 0x19, 0x0D, 0x96, 0x2A, 0x19, 0xAB,
364			0x32, 0x39, 0x26, 0xB3, 0x51, 0xFB, 0xD3, 0x9E,
365			0x35, 0x1E, 0x05, 0xDA, 0x8B, 0x89, 0x25, 0xE3,
366			0x0B, 0x1C, 0xCE, 0x0D, 0x12, 0x21, 0x10, 0x10,
367			0x95, 0x81, 0x5C, 0xC7, 0xCB, 0x63, 0x19, 0x50,
368			0x9E, 0xC0, 0xD6, 0x79, 0x40, 0x49, 0x19, 0x87,
369			0xE1, 0x3F, 0x0A, 0xFF, 0xAC, 0x33, 0x2A, 0xA6,
370			0xAA, 0x64, 0x62, 0x6D, 0x3E, 0x9A, 0x19, 0x17,
371			0x51, 0x9E, 0x0B, 0x97, 0xB6, 0x55, 0xC6, 0xA1,
372			0x65, 0xE4, 0x4C, 0xA9, 0xFE, 0xAC, 0x07, 0x90,
373			0xD2, 0xA3, 0x21, 0xAD, 0x3D, 0x86, 0xB7, 0x9C,
374			0x51, 0x38, 0x73, 0x9F, 0xA3, 0x8D, 0x88, 0x7E,
375			0xC7, 0xDE, 0xF4, 0x49, 0xCE, 0x8A, 0xBD, 0xD3,
376			0xE7, 0xF8, 0xDC, 0x4C, 0xA9, 0xE7, 0xB7, 0x33,
377			0x14, 0xAD, 0x31, 0x0F, 0x90, 0x25, 0xE6, 0x19,
378			0x46, 0xB3, 0xA5, 0x6D, 0xC6, 0x49, 0xEC, 0x0D,
379			0xA0, 0xD6, 0x39, 0x43, 0xDF, 0xF5, 0x92, 0xCF,
380			0x96, 0x2A, 0x7E, 0xFB, 0x2C, 0x85, 0x24, 0xE3,
381			0x5A, 0x2A, 0x6E, 0x78, 0x79, 0xD6, 0x26, 0x04,
382			0xEF, 0x26, 0x86, 0x95, 0xFA, 0x40, 0x03, 0x02,
383			0x7E, 0x22, 0xE6, 0x08, 0x30, 0x77, 0x52, 0x20,
384			0x64, 0xBD, 0x4A, 0x5B, 0x90, 0x6B, 0x5F, 0x53,
385			0x12, 0x74, 0xF2, 0x35, 0xED, 0x50, 0x6C, 0xFF,
386			0x01, 0x54, 0xC7, 0x54, 0x92, 0x8A, 0x0C, 0xE5,
387			0x47, 0x6F, 0x2C, 0xB1, 0x02, 0x0A, 0x12, 0x22,
388			0xD3, 0x2C, 0x14, 0x55, 0xEC, 0xAE, 0xF1, 0xE3,
389			0x68, 0xFB, 0x34, 0x4D, 0x17, 0x35, 0xBF, 0xBE,
390			0xDE, 0xB7, 0x1D, 0x0A, 0x33, 0xA2, 0xA5, 0x4B,
391			0x1D, 0xA5, 0xA2, 0x94, 0xE6, 0x79, 0x14, 0x4D,
392			0xDF, 0x11, 0xEB, 0x1A, 0x3D, 0xE8, 0xCF, 0x0C,
393			0xC0, 0x61, 0x91, 0x79, 0x74, 0xF3, 0x5C, 0x1D,
394			0x9C, 0xA0, 0xAC, 0x81, 0x80, 0x7F, 0x8F, 0xCC,
395			0xE6, 0x19, 0x9A, 0x6C, 0x77, 0x12, 0xDA, 0x86,
396			0x50, 0x21, 0xB0, 0x4C, 0xE0, 0x43, 0x95, 0x16,
397			0xF1, 0xA5, 0x26, 0xCC, 0xDA, 0x9F, 0xD9, 0xAB,
398			0xBD, 0x53, 0xC3, 0xA6, 0x84, 0xF9, 0xAE, 0x1E,
399			0x7E, 0xE6, 0xB1, 0x1D, 0xA1, 0x38, 0xEA, 0x82,
400			0x6C, 0x55, 0x16, 0xB5, 0xAA, 0xDF, 0x1A, 0xBB,
401			0xE3, 0x6F, 0xA7, 0xFF, 0xF9, 0x2E, 0x3A, 0x11,
402			0x76, 0x06, 0x4E, 0x8D, 0x95, 0xF2, 0xE4, 0x88,
403			0x2B, 0x55, 0x00, 0xB9, 0x32, 0x28, 0xB2, 0x19,
404			0x4A, 0x47, 0x5C, 0x1A, 0x27, 0xF6, 0x3F, 0x9F,
405			0xFD, 0x26, 0x49, 0x89, 0xA1, 0xBC
406		},
407		.len = 2800
408	},
409	.validDataLenInBits = {
410		.len = 2798
411	},
412	.validCipherLenInBits = {
413		.len = 2798
414	},
415	.validCipherOffsetLenInBits = {
416		.len = 128
417	}
418};
419
420struct zuc_test_data zuc_test_case_5 = {
421	.key = {
422		.data = {
423			0xE1, 0x3F, 0xED, 0x21, 0xB4, 0x6E, 0x4E, 0x7E,
424			0xC3, 0x12, 0x53, 0xB2, 0xBB, 0x17, 0xB3, 0xE0
425		},
426		.len = 16
427	},
428	.iv = {
429		.data = {
430			0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00,
431			0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00
432		},
433		.len = 16
434	},
435	.plaintext = {
436		.data = {
437			0x8D, 0x74, 0xE2, 0x0D, 0x54, 0x89, 0x4E, 0x06,
438			0xD3, 0xCB, 0x13, 0xCB, 0x39, 0x33, 0x06, 0x5E,
439			0x86, 0x74, 0xBE, 0x62, 0xAD, 0xB1, 0xC7, 0x2B,
440			0x3A, 0x64, 0x69, 0x65, 0xAB, 0x63, 0xCB, 0x7B,
441			0x78, 0x54, 0xDF, 0xDC, 0x27, 0xE8, 0x49, 0x29,
442			0xF4, 0x9C, 0x64, 0xB8, 0x72, 0xA4, 0x90, 0xB1,
443			0x3F, 0x95, 0x7B, 0x64, 0x82, 0x7E, 0x71, 0xF4,
444			0x1F, 0xBD, 0x42, 0x69, 0xA4, 0x2C, 0x97, 0xF8,
445			0x24, 0x53, 0x70, 0x27, 0xF8, 0x6E, 0x9F, 0x4A,
446			0xD8, 0x2D, 0x1D, 0xF4, 0x51, 0x69, 0x0F, 0xDD,
447			0x98, 0xB6, 0xD0, 0x3F, 0x3A, 0x0E, 0xBE, 0x3A,
448			0x31, 0x2D, 0x6B, 0x84, 0x0B, 0xA5, 0xA1, 0x82,
449			0x0B, 0x2A, 0x2C, 0x97, 0x09, 0xC0, 0x90, 0xD2,
450			0x45, 0xED, 0x26, 0x7C, 0xF8, 0x45, 0xAE, 0x41,
451			0xFA, 0x97, 0x5D, 0x33, 0x33, 0xAC, 0x30, 0x09,
452			0xFD, 0x40, 0xEB, 0xA9, 0xEB, 0x5B, 0x88, 0x57,
453			0x14, 0xB7, 0x68, 0xB6, 0x97, 0x13, 0x8B, 0xAF,
454			0x21, 0x38, 0x0E, 0xCA, 0x49, 0xF6, 0x44, 0xD4,
455			0x86, 0x89, 0xE4, 0x21, 0x57, 0x60, 0xB9, 0x06,
456			0x73, 0x9F, 0x0D, 0x2B, 0x3F, 0x09, 0x11, 0x33,
457			0xCA, 0x15, 0xD9, 0x81, 0xCB, 0xE4, 0x01, 0xBA,
458			0xF7, 0x2D, 0x05, 0xAC, 0xE0, 0x5C, 0xCC, 0xB2,
459			0xD2, 0x97, 0xF4, 0xEF, 0x6A, 0x5F, 0x58, 0xD9,
460			0x12, 0x46, 0xCF, 0xA7, 0x72, 0x15, 0xB8, 0x92,
461			0xAB, 0x44, 0x1D, 0x52, 0x78, 0x45, 0x27, 0x95,
462			0xCC, 0xB7, 0xF5, 0xD7, 0x90, 0x57, 0xA1, 0xC4,
463			0xF7, 0x7F, 0x80, 0xD4, 0x6D, 0xB2, 0x03, 0x3C,
464			0xB7, 0x9B, 0xED, 0xF8, 0xE6, 0x05, 0x51, 0xCE,
465			0x10, 0xC6, 0x67, 0xF6, 0x2A, 0x97, 0xAB, 0xAF,
466			0xAB, 0xBC, 0xD6, 0x77, 0x20, 0x18, 0xDF, 0x96,
467			0xA2, 0x82, 0xEA, 0x73, 0x7C, 0xE2, 0xCB, 0x33,
468			0x12, 0x11, 0xF6, 0x0D, 0x53, 0x54, 0xCE, 0x78,
469			0xF9, 0x91, 0x8D, 0x9C, 0x20, 0x6C, 0xA0, 0x42,
470			0xC9, 0xB6, 0x23, 0x87, 0xDD, 0x70, 0x96, 0x04,
471			0xA5, 0x0A, 0xF1, 0x6D, 0x8D, 0x35, 0xA8, 0x90,
472			0x6B, 0xE4, 0x84, 0xCF, 0x2E, 0x74, 0xA9, 0x28,
473			0x99, 0x40, 0x36, 0x43, 0x53, 0x24, 0x9B, 0x27,
474			0xB4, 0xC9, 0xAE, 0x29, 0xED, 0xDF, 0xC7, 0xDA,
475			0x64, 0x18, 0x79, 0x1A, 0x4E, 0x7B, 0xAA, 0x06,
476			0x60, 0xFA, 0x64, 0x51, 0x1F, 0x2D, 0x68, 0x5C,
477			0xC3, 0xA5, 0xFF, 0x70, 0xE0, 0xD2, 0xB7, 0x42,
478			0x92, 0xE3, 0xB8, 0xA0, 0xCD, 0x6B, 0x04, 0xB1,
479			0xC7, 0x90, 0xB8, 0xEA, 0xD2, 0x70, 0x37, 0x08,
480			0x54, 0x0D, 0xEA, 0x2F, 0xC0, 0x9C, 0x3D, 0xA7,
481			0x70, 0xF6, 0x54, 0x49, 0xE8, 0x4D, 0x81, 0x7A,
482			0x4F, 0x55, 0x10, 0x55, 0xE1, 0x9A, 0xB8, 0x50,
483			0x18, 0xA0, 0x02, 0x8B, 0x71, 0xA1, 0x44, 0xD9,
484			0x67, 0x91, 0xE9, 0xA3, 0x57, 0x79, 0x33, 0x50,
485			0x4E, 0xEE, 0x00, 0x60, 0x34, 0x0C, 0x69, 0xD2,
486			0x74, 0xE1, 0xBF, 0x9D, 0x80, 0x5D, 0xCB, 0xCC,
487			0x1A, 0x6F, 0xAA, 0x97, 0x68, 0x00, 0xB6, 0xFF,
488			0x2B, 0x67, 0x1D, 0xC4, 0x63, 0x65, 0x2F, 0xA8,
489			0xA3, 0x3E, 0xE5, 0x09, 0x74, 0xC1, 0xC2, 0x1B,
490			0xE0, 0x1E, 0xAB, 0xB2, 0x16, 0x74, 0x30, 0x26,
491			0x9D, 0x72, 0xEE, 0x51, 0x1C, 0x9D, 0xDE, 0x30,
492			0x79, 0x7C, 0x9A, 0x25, 0xD8, 0x6C, 0xE7, 0x4F,
493			0x5B, 0x96, 0x1B, 0xE5, 0xFD, 0xFB, 0x68, 0x07,
494			0x81, 0x40, 0x39, 0xE7, 0x13, 0x76, 0x36, 0xBD,
495			0x1D, 0x7F, 0xA9, 0xE0, 0x9E, 0xFD, 0x20, 0x07,
496			0x50, 0x59, 0x06, 0xA5, 0xAC, 0x45, 0xDF, 0xDE,
497			0xED, 0x77, 0x57, 0xBB, 0xEE, 0x74, 0x57, 0x49,
498			0xC2, 0x96, 0x33, 0x35, 0x0B, 0xEE, 0x0E, 0xA6,
499			0xF4, 0x09, 0xDF, 0x45, 0x80, 0x16, 0x00
500		},
501		.len = 4024
502	},
503	.ciphertext = {
504		.data = {
505			0x94, 0xEA, 0xA4, 0xAA, 0x30, 0xA5, 0x71, 0x37,
506			0xDD, 0xF0, 0x9B, 0x97, 0xB2, 0x56, 0x18, 0xA2,
507			0x0A, 0x13, 0xE2, 0xF1, 0x0F, 0xA5, 0xBF, 0x81,
508			0x61, 0xA8, 0x79, 0xCC, 0x2A, 0xE7, 0x97, 0xA6,
509			0xB4, 0xCF, 0x2D, 0x9D, 0xF3, 0x1D, 0xEB, 0xB9,
510			0x90, 0x5C, 0xCF, 0xEC, 0x97, 0xDE, 0x60, 0x5D,
511			0x21, 0xC6, 0x1A, 0xB8, 0x53, 0x1B, 0x7F, 0x3C,
512			0x9D, 0xA5, 0xF0, 0x39, 0x31, 0xF8, 0xA0, 0x64,
513			0x2D, 0xE4, 0x82, 0x11, 0xF5, 0xF5, 0x2F, 0xFE,
514			0xA1, 0x0F, 0x39, 0x2A, 0x04, 0x76, 0x69, 0x98,
515			0x5D, 0xA4, 0x54, 0xA2, 0x8F, 0x08, 0x09, 0x61,
516			0xA6, 0xC2, 0xB6, 0x2D, 0xAA, 0x17, 0xF3, 0x3C,
517			0xD6, 0x0A, 0x49, 0x71, 0xF4, 0x8D, 0x2D, 0x90,
518			0x93, 0x94, 0xA5, 0x5F, 0x48, 0x11, 0x7A, 0xCE,
519			0x43, 0xD7, 0x08, 0xE6, 0xB7, 0x7D, 0x3D, 0xC4,
520			0x6D, 0x8B, 0xC0, 0x17, 0xD4, 0xD1, 0xAB, 0xB7,
521			0x7B, 0x74, 0x28, 0xC0, 0x42, 0xB0, 0x6F, 0x2F,
522			0x99, 0xD8, 0xD0, 0x7C, 0x98, 0x79, 0xD9, 0x96,
523			0x00, 0x12, 0x7A, 0x31, 0x98, 0x5F, 0x10, 0x99,
524			0xBB, 0xD7, 0xD6, 0xC1, 0x51, 0x9E, 0xDE, 0x8F,
525			0x5E, 0xEB, 0x4A, 0x61, 0x0B, 0x34, 0x9A, 0xC0,
526			0x1E, 0xA2, 0x35, 0x06, 0x91, 0x75, 0x6B, 0xD1,
527			0x05, 0xC9, 0x74, 0xA5, 0x3E, 0xDD, 0xB3, 0x5D,
528			0x1D, 0x41, 0x00, 0xB0, 0x12, 0xE5, 0x22, 0xAB,
529			0x41, 0xF4, 0xC5, 0xF2, 0xFD, 0xE7, 0x6B, 0x59,
530			0xCB, 0x8B, 0x96, 0xD8, 0x85, 0xCF, 0xE4, 0x08,
531			0x0D, 0x13, 0x28, 0xA0, 0xD6, 0x36, 0xCC, 0x0E,
532			0xDC, 0x05, 0x80, 0x0B, 0x76, 0xAC, 0xCA, 0x8F,
533			0xEF, 0x67, 0x20, 0x84, 0xD1, 0xF5, 0x2A, 0x8B,
534			0xBD, 0x8E, 0x09, 0x93, 0x32, 0x09, 0x92, 0xC7,
535			0xFF, 0xBA, 0xE1, 0x7C, 0x40, 0x84, 0x41, 0xE0,
536			0xEE, 0x88, 0x3F, 0xC8, 0xA8, 0xB0, 0x5E, 0x22,
537			0xF5, 0xFF, 0x7F, 0x8D, 0x1B, 0x48, 0xC7, 0x4C,
538			0x46, 0x8C, 0x46, 0x7A, 0x02, 0x8F, 0x09, 0xFD,
539			0x7C, 0xE9, 0x11, 0x09, 0xA5, 0x70, 0xA2, 0xD5,
540			0xC4, 0xD5, 0xF4, 0xFA, 0x18, 0xC5, 0xDD, 0x3E,
541			0x45, 0x62, 0xAF, 0xE2, 0x4E, 0xF7, 0x71, 0x90,
542			0x1F, 0x59, 0xAF, 0x64, 0x58, 0x98, 0xAC, 0xEF,
543			0x08, 0x8A, 0xBA, 0xE0, 0x7E, 0x92, 0xD5, 0x2E,
544			0xB2, 0xDE, 0x55, 0x04, 0x5B, 0xB1, 0xB7, 0xC4,
545			0x16, 0x4E, 0xF2, 0xD7, 0xA6, 0xCA, 0xC1, 0x5E,
546			0xEB, 0x92, 0x6D, 0x7E, 0xA2, 0xF0, 0x8B, 0x66,
547			0xE1, 0xF7, 0x59, 0xF3, 0xAE, 0xE4, 0x46, 0x14,
548			0x72, 0x5A, 0xA3, 0xC7, 0x48, 0x2B, 0x30, 0x84,
549			0x4C, 0x14, 0x3F, 0xF8, 0x5B, 0x53, 0xF1, 0xE5,
550			0x83, 0xC5, 0x01, 0x25, 0x7D, 0xDD, 0xD0, 0x96,
551			0xB8, 0x12, 0x68, 0xDA, 0xA3, 0x03, 0xF1, 0x72,
552			0x34, 0xC2, 0x33, 0x35, 0x41, 0xF0, 0xBB, 0x8E,
553			0x19, 0x06, 0x48, 0xC5, 0x80, 0x7C, 0x86, 0x6D,
554			0x71, 0x93, 0x22, 0x86, 0x09, 0xAD, 0xB9, 0x48,
555			0x68, 0x6F, 0x7D, 0xE2, 0x94, 0xA8, 0x02, 0xCC,
556			0x38, 0xF7, 0xFE, 0x52, 0x08, 0xF5, 0xEA, 0x31,
557			0x96, 0xD0, 0x16, 0x7B, 0x9B, 0xDD, 0x02, 0xF0,
558			0xD2, 0xA5, 0x22, 0x1C, 0xA5, 0x08, 0xF8, 0x93,
559			0xAF, 0x5C, 0x4B, 0x4B, 0xB9, 0xF4, 0xF5, 0x20,
560			0xFD, 0x84, 0x28, 0x9B, 0x3D, 0xBE, 0x7E, 0x61,
561			0x49, 0x7A, 0x7E, 0x2A, 0x58, 0x40, 0x37, 0xEA,
562			0x63, 0x7B, 0x69, 0x81, 0x12, 0x71, 0x74, 0xAF,
563			0x57, 0xB4, 0x71, 0xDF, 0x4B, 0x27, 0x68, 0xFD,
564			0x79, 0xC1, 0x54, 0x0F, 0xB3, 0xED, 0xF2, 0xEA,
565			0x22, 0xCB, 0x69, 0xBE, 0xC0, 0xCF, 0x8D, 0x93,
566			0x3D, 0x9C, 0x6F, 0xDD, 0x64, 0x5E, 0x85, 0x05,
567			0x91, 0xCC, 0xA3, 0xD6, 0x2C, 0x0C, 0xC0
568		},
569		.len = 4024
570	},
571	.validDataLenInBits = {
572		.len = 4019
573	},
574	.validCipherLenInBits = {
575		.len = 4019
576	},
577	.validCipherOffsetLenInBits = {
578		.len = 128
579	}
580};
581
582#endif /* TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_ */
583