]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - crypto/testmgr.h
crypto: testmgr - add test vectors for partial ctr(cast5) and ctr(cast6)
[mirror_ubuntu-zesty-kernel.git] / crypto / testmgr.h
CommitLineData
da7f033d
HX
1/*
2 * Algorithm testing framework and tests.
3 *
4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
6 * Copyright (c) 2007 Nokia Siemens Networks
7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
8 *
69435b94
AH
9 * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
10 * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
11 * gcm/gcm-test-vectors.tar.gz
12 * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
13 * Adrian Hoban <adrian.hoban@intel.com>
14 * Gabriele Paoloni <gabriele.paoloni@intel.com>
15 * Tadeusz Struk (tadeusz.struk@intel.com)
16 * Copyright (c) 2010, Intel Corporation.
17 *
da7f033d
HX
18 * This program is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU General Public License as published by the Free
20 * Software Foundation; either version 2 of the License, or (at your option)
21 * any later version.
22 *
23 */
24#ifndef _CRYPTO_TESTMGR_H
25#define _CRYPTO_TESTMGR_H
26
0c01aed5
GU
27#include <linux/netlink.h>
28#include <linux/zlib.h>
29
8064efb8
GU
30#include <crypto/compress.h>
31
da7f033d
HX
32#define MAX_DIGEST_SIZE 64
33#define MAX_TAP 8
34
35#define MAX_KEYLEN 56
36#define MAX_IVLEN 32
37
38struct hash_testvec {
39 /* only used with keyed hash algorithms */
40 char *key;
41 char *plaintext;
42 char *digest;
43 unsigned char tap[MAX_TAP];
44 unsigned char psize;
45 unsigned char np;
46 unsigned char ksize;
47};
48
49struct cipher_testvec {
50 char *key;
51 char *iv;
52 char *input;
53 char *result;
54 unsigned short tap[MAX_TAP];
55 int np;
f44d83d1 56 unsigned char also_non_np;
da7f033d
HX
57 unsigned char fail;
58 unsigned char wk; /* weak key flag */
59 unsigned char klen;
60 unsigned short ilen;
61 unsigned short rlen;
62};
63
64struct aead_testvec {
65 char *key;
66 char *iv;
67 char *input;
68 char *assoc;
69 char *result;
70 unsigned char tap[MAX_TAP];
71 unsigned char atap[MAX_TAP];
72 int np;
73 int anp;
74 unsigned char fail;
e44a1b44 75 unsigned char novrfy; /* ccm dec verification failure expected */
da7f033d
HX
76 unsigned char wk; /* weak key flag */
77 unsigned char klen;
78 unsigned short ilen;
79 unsigned short alen;
80 unsigned short rlen;
81};
82
7647d6ce
JW
83struct cprng_testvec {
84 char *key;
85 char *dt;
86 char *v;
87 char *result;
88 unsigned char klen;
89 unsigned short dtlen;
90 unsigned short vlen;
91 unsigned short rlen;
92 unsigned short loops;
93};
94
da7f033d
HX
95static char zeroed_string[48];
96
97/*
98 * MD4 test vectors from RFC1320
99 */
100#define MD4_TEST_VECTORS 7
101
102static struct hash_testvec md4_tv_template [] = {
103 {
104 .plaintext = "",
105 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
106 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
107 }, {
108 .plaintext = "a",
109 .psize = 1,
110 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
111 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
112 }, {
113 .plaintext = "abc",
114 .psize = 3,
115 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
116 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
117 }, {
118 .plaintext = "message digest",
119 .psize = 14,
120 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
121 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
122 }, {
123 .plaintext = "abcdefghijklmnopqrstuvwxyz",
124 .psize = 26,
125 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
126 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
127 .np = 2,
128 .tap = { 13, 13 },
129 }, {
130 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
131 .psize = 62,
132 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
133 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
134 }, {
135 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
136 "45678901234567890",
137 .psize = 80,
138 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
139 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
140 },
141};
142
143/*
144 * MD5 test vectors from RFC1321
145 */
146#define MD5_TEST_VECTORS 7
147
148static struct hash_testvec md5_tv_template[] = {
149 {
150 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
151 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
152 }, {
153 .plaintext = "a",
154 .psize = 1,
155 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
156 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
157 }, {
158 .plaintext = "abc",
159 .psize = 3,
160 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
161 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
162 }, {
163 .plaintext = "message digest",
164 .psize = 14,
165 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
166 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
167 }, {
168 .plaintext = "abcdefghijklmnopqrstuvwxyz",
169 .psize = 26,
170 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
171 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
172 .np = 2,
173 .tap = {13, 13}
174 }, {
175 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
176 .psize = 62,
177 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
178 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
179 }, {
180 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
181 "345678901234567890",
182 .psize = 80,
183 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
184 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
185 }
186
187};
188
189/*
190 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
191 */
192#define RMD128_TEST_VECTORS 10
193
194static struct hash_testvec rmd128_tv_template[] = {
195 {
196 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
197 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
198 }, {
199 .plaintext = "a",
200 .psize = 1,
201 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
202 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
203 }, {
204 .plaintext = "abc",
205 .psize = 3,
206 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
207 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
208 }, {
209 .plaintext = "message digest",
210 .psize = 14,
211 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
212 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
213 }, {
214 .plaintext = "abcdefghijklmnopqrstuvwxyz",
215 .psize = 26,
216 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
217 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
218 }, {
219 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
220 "fghijklmnopqrstuvwxyz0123456789",
221 .psize = 62,
222 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
223 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
224 }, {
225 .plaintext = "1234567890123456789012345678901234567890"
226 "1234567890123456789012345678901234567890",
227 .psize = 80,
228 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
229 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
230 }, {
231 .plaintext = "abcdbcdecdefdefgefghfghighij"
232 "hijkijkljklmklmnlmnomnopnopq",
233 .psize = 56,
234 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
235 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
236 .np = 2,
237 .tap = { 28, 28 },
238 }, {
239 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
240 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
241 "lmnopqrsmnopqrstnopqrstu",
242 .psize = 112,
243 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
244 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
245 }, {
246 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
247 .psize = 32,
248 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
249 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
250 }
251};
252
253/*
254 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
255 */
256#define RMD160_TEST_VECTORS 10
257
258static struct hash_testvec rmd160_tv_template[] = {
259 {
260 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
261 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
262 }, {
263 .plaintext = "a",
264 .psize = 1,
265 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
266 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
267 }, {
268 .plaintext = "abc",
269 .psize = 3,
270 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
271 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
272 }, {
273 .plaintext = "message digest",
274 .psize = 14,
275 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
276 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
277 }, {
278 .plaintext = "abcdefghijklmnopqrstuvwxyz",
279 .psize = 26,
280 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
281 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
282 }, {
283 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
284 "fghijklmnopqrstuvwxyz0123456789",
285 .psize = 62,
286 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
287 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
288 }, {
289 .plaintext = "1234567890123456789012345678901234567890"
290 "1234567890123456789012345678901234567890",
291 .psize = 80,
292 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
293 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
294 }, {
295 .plaintext = "abcdbcdecdefdefgefghfghighij"
296 "hijkijkljklmklmnlmnomnopnopq",
297 .psize = 56,
298 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
299 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
300 .np = 2,
301 .tap = { 28, 28 },
302 }, {
303 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
304 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
305 "lmnopqrsmnopqrstnopqrstu",
306 .psize = 112,
307 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
308 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
309 }, {
310 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
311 .psize = 32,
312 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
313 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
314 }
315};
316
317/*
318 * RIPEMD-256 test vectors
319 */
320#define RMD256_TEST_VECTORS 8
321
322static struct hash_testvec rmd256_tv_template[] = {
323 {
324 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
325 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
326 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
327 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
328 }, {
329 .plaintext = "a",
330 .psize = 1,
331 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
332 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
333 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
334 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
335 }, {
336 .plaintext = "abc",
337 .psize = 3,
338 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
339 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
340 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
341 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
342 }, {
343 .plaintext = "message digest",
344 .psize = 14,
345 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
346 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
347 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
348 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
349 }, {
350 .plaintext = "abcdefghijklmnopqrstuvwxyz",
351 .psize = 26,
352 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
353 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
354 "\x78\x96\x11\x8a\x51\x97\x96\x87"
355 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
356 }, {
357 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
358 "fghijklmnopqrstuvwxyz0123456789",
359 .psize = 62,
360 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
361 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
362 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
363 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
364 }, {
365 .plaintext = "1234567890123456789012345678901234567890"
366 "1234567890123456789012345678901234567890",
367 .psize = 80,
368 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
369 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
370 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
371 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
372 }, {
373 .plaintext = "abcdbcdecdefdefgefghfghighij"
374 "hijkijkljklmklmnlmnomnopnopq",
375 .psize = 56,
376 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
377 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
378 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
379 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
380 .np = 2,
381 .tap = { 28, 28 },
382 }
383};
384
385/*
386 * RIPEMD-320 test vectors
387 */
388#define RMD320_TEST_VECTORS 8
389
390static struct hash_testvec rmd320_tv_template[] = {
391 {
392 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
393 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
394 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
395 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
396 }, {
397 .plaintext = "a",
398 .psize = 1,
399 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
400 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
401 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
402 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
403 }, {
404 .plaintext = "abc",
405 .psize = 3,
406 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
407 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
408 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
409 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
410 }, {
411 .plaintext = "message digest",
412 .psize = 14,
413 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
414 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
415 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
416 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
417 }, {
418 .plaintext = "abcdefghijklmnopqrstuvwxyz",
419 .psize = 26,
420 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
421 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
422 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
423 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
424 }, {
425 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
426 "fghijklmnopqrstuvwxyz0123456789",
427 .psize = 62,
428 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
429 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
430 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
431 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
432 }, {
433 .plaintext = "1234567890123456789012345678901234567890"
434 "1234567890123456789012345678901234567890",
435 .psize = 80,
436 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
437 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
438 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
439 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
440 }, {
441 .plaintext = "abcdbcdecdefdefgefghfghighij"
442 "hijkijkljklmklmnlmnomnopnopq",
443 .psize = 56,
444 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
445 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
446 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
447 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
448 .np = 2,
449 .tap = { 28, 28 },
450 }
451};
452
453/*
454 * SHA1 test vectors from from FIPS PUB 180-1
bd1f2996 455 * Long vector from CAVS 5.0
da7f033d 456 */
bd1f2996 457#define SHA1_TEST_VECTORS 3
da7f033d
HX
458
459static struct hash_testvec sha1_tv_template[] = {
460 {
461 .plaintext = "abc",
462 .psize = 3,
463 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
464 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
465 }, {
466 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
467 .psize = 56,
468 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
469 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
470 .np = 2,
471 .tap = { 28, 28 }
bd1f2996
HX
472 }, {
473 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
474 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
475 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
476 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
477 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
478 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
479 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
480 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
481 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
482 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
483 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
484 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
485 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
486 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
487 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
488 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
489 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
490 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
491 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
492 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
493 "\x5a\x90\x11",
494 .psize = 163,
495 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
496 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
497 .np = 4,
498 .tap = { 63, 64, 31, 5 }
da7f033d
HX
499 }
500};
501
502
503/*
504 * SHA224 test vectors from from FIPS PUB 180-2
505 */
506#define SHA224_TEST_VECTORS 2
507
508static struct hash_testvec sha224_tv_template[] = {
509 {
510 .plaintext = "abc",
511 .psize = 3,
512 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
513 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
514 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
515 "\xE3\x6C\x9D\xA7",
516 }, {
517 .plaintext =
518 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
519 .psize = 56,
520 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
521 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
522 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
523 "\x52\x52\x25\x25",
524 .np = 2,
525 .tap = { 28, 28 }
526 }
527};
528
529/*
530 * SHA256 test vectors from from NIST
531 */
532#define SHA256_TEST_VECTORS 2
533
534static struct hash_testvec sha256_tv_template[] = {
535 {
536 .plaintext = "abc",
537 .psize = 3,
538 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
539 "\x41\x41\x40\xde\x5d\xae\x22\x23"
540 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
541 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
542 }, {
543 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
544 .psize = 56,
545 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
546 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
547 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
548 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
549 .np = 2,
550 .tap = { 28, 28 }
551 },
552};
553
554/*
555 * SHA384 test vectors from from NIST and kerneli
556 */
557#define SHA384_TEST_VECTORS 4
558
559static struct hash_testvec sha384_tv_template[] = {
560 {
561 .plaintext= "abc",
562 .psize = 3,
563 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
564 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
565 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
566 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
567 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
568 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
569 }, {
570 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
571 .psize = 56,
572 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
573 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
574 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
575 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
576 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
577 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
578 }, {
579 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
580 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
581 .psize = 112,
582 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
583 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
584 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
585 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
586 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
587 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
588 }, {
589 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
590 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
591 .psize = 104,
592 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
593 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
594 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
595 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
596 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
597 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
598 .np = 4,
599 .tap = { 26, 26, 26, 26 }
600 },
601};
602
603/*
604 * SHA512 test vectors from from NIST and kerneli
605 */
606#define SHA512_TEST_VECTORS 4
607
608static struct hash_testvec sha512_tv_template[] = {
609 {
610 .plaintext = "abc",
611 .psize = 3,
612 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
613 "\xcc\x41\x73\x49\xae\x20\x41\x31"
614 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
615 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
616 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
617 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
618 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
619 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
620 }, {
621 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
622 .psize = 56,
623 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
624 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
625 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
626 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
627 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
628 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
629 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
630 "\x54\xec\x63\x12\x38\xca\x34\x45",
631 }, {
632 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
633 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
634 .psize = 112,
635 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
636 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
637 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
638 "\x72\x99\xae\xad\xb6\x88\x90\x18"
639 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
640 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
641 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
642 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
643 }, {
644 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
645 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
646 .psize = 104,
647 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
648 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
649 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
650 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
651 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
652 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
653 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
654 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
655 .np = 4,
656 .tap = { 26, 26, 26, 26 }
657 },
658};
659
660
661/*
662 * WHIRLPOOL test vectors from Whirlpool package
663 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
664 * submission
665 */
666#define WP512_TEST_VECTORS 8
667
668static struct hash_testvec wp512_tv_template[] = {
669 {
670 .plaintext = "",
671 .psize = 0,
672 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
673 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
674 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
675 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
676 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
677 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
678 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
679 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
680
681
682 }, {
683 .plaintext = "a",
684 .psize = 1,
685 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
686 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
687 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
688 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
689 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
690 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
691 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
692 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
693 }, {
694 .plaintext = "abc",
695 .psize = 3,
696 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
697 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
698 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
699 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
700 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
701 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
702 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
703 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
704 }, {
705 .plaintext = "message digest",
706 .psize = 14,
707 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
708 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
709 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
710 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
711 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
712 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
713 "\x92\xED\x92\x00\x52\x83\x8F\x33"
714 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
715 }, {
716 .plaintext = "abcdefghijklmnopqrstuvwxyz",
717 .psize = 26,
718 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
719 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
720 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
721 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
722 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
723 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
724 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
725 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
726 }, {
727 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
728 "abcdefghijklmnopqrstuvwxyz0123456789",
729 .psize = 62,
730 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
731 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
732 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
733 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
734 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
735 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
736 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
737 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
738 }, {
739 .plaintext = "1234567890123456789012345678901234567890"
740 "1234567890123456789012345678901234567890",
741 .psize = 80,
742 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
743 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
744 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
745 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
746 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
747 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
748 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
749 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
750 }, {
751 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
752 .psize = 32,
753 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
754 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
755 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
756 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
757 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
758 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
759 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
760 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
761 },
762};
763
764#define WP384_TEST_VECTORS 8
765
766static struct hash_testvec wp384_tv_template[] = {
767 {
768 .plaintext = "",
769 .psize = 0,
770 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
771 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
772 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
773 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
774 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
775 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
776
777
778 }, {
779 .plaintext = "a",
780 .psize = 1,
781 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
782 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
783 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
784 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
785 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
786 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
787 }, {
788 .plaintext = "abc",
789 .psize = 3,
790 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
791 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
792 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
793 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
794 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
795 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
796 }, {
797 .plaintext = "message digest",
798 .psize = 14,
799 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
800 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
801 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
802 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
803 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
804 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
805 }, {
806 .plaintext = "abcdefghijklmnopqrstuvwxyz",
807 .psize = 26,
808 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
809 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
810 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
811 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
812 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
813 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
814 }, {
815 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
816 "abcdefghijklmnopqrstuvwxyz0123456789",
817 .psize = 62,
818 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
819 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
820 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
821 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
822 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
823 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
824 }, {
825 .plaintext = "1234567890123456789012345678901234567890"
826 "1234567890123456789012345678901234567890",
827 .psize = 80,
828 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
829 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
830 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
831 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
832 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
833 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
834 }, {
835 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
836 .psize = 32,
837 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
838 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
839 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
840 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
841 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
842 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
843 },
844};
845
846#define WP256_TEST_VECTORS 8
847
848static struct hash_testvec wp256_tv_template[] = {
849 {
850 .plaintext = "",
851 .psize = 0,
852 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
853 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
854 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
855 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
856
857
858 }, {
859 .plaintext = "a",
860 .psize = 1,
861 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
862 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
863 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
864 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
865 }, {
866 .plaintext = "abc",
867 .psize = 3,
868 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
869 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
870 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
871 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
872 }, {
873 .plaintext = "message digest",
874 .psize = 14,
875 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
876 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
877 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
878 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
879 }, {
880 .plaintext = "abcdefghijklmnopqrstuvwxyz",
881 .psize = 26,
882 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
883 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
884 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
885 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
886 }, {
887 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
888 "abcdefghijklmnopqrstuvwxyz0123456789",
889 .psize = 62,
890 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
891 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
892 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
893 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
894 }, {
895 .plaintext = "1234567890123456789012345678901234567890"
896 "1234567890123456789012345678901234567890",
897 .psize = 80,
898 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
899 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
900 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
901 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
902 }, {
903 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
904 .psize = 32,
905 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
906 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
907 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
908 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
909 },
910};
911
912/*
913 * TIGER test vectors from Tiger website
914 */
915#define TGR192_TEST_VECTORS 6
916
917static struct hash_testvec tgr192_tv_template[] = {
918 {
919 .plaintext = "",
920 .psize = 0,
921 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
922 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
923 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
924 }, {
925 .plaintext = "abc",
926 .psize = 3,
927 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
928 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
929 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
930 }, {
931 .plaintext = "Tiger",
932 .psize = 5,
933 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
934 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
935 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
936 }, {
937 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
938 .psize = 64,
939 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
940 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
941 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
942 }, {
943 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
944 .psize = 64,
945 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
946 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
947 "\x57\x89\x65\x65\x97\x5f\x91\x97",
948 }, {
949 .plaintext = "Tiger - A Fast New Hash Function, "
950 "by Ross Anderson and Eli Biham, "
951 "proceedings of Fast Software Encryption 3, "
952 "Cambridge, 1996.",
953 .psize = 125,
954 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
955 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
956 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
957 },
958};
959
960#define TGR160_TEST_VECTORS 6
961
962static struct hash_testvec tgr160_tv_template[] = {
963 {
964 .plaintext = "",
965 .psize = 0,
966 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
967 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
968 "\xf3\x73\xde\x2d",
969 }, {
970 .plaintext = "abc",
971 .psize = 3,
972 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
973 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
974 "\x93\x5f\x7b\x95",
975 }, {
976 .plaintext = "Tiger",
977 .psize = 5,
978 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
979 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
980 "\x37\x79\x0c\x11",
981 }, {
982 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
983 .psize = 64,
984 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
985 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
986 "\xb5\x86\x44\x50",
987 }, {
988 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
989 .psize = 64,
990 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
991 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
992 "\x57\x89\x65\x65",
993 }, {
994 .plaintext = "Tiger - A Fast New Hash Function, "
995 "by Ross Anderson and Eli Biham, "
996 "proceedings of Fast Software Encryption 3, "
997 "Cambridge, 1996.",
998 .psize = 125,
999 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1000 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1001 "\xdd\x68\x15\x1d",
1002 },
1003};
1004
1005#define TGR128_TEST_VECTORS 6
1006
1007static struct hash_testvec tgr128_tv_template[] = {
1008 {
1009 .plaintext = "",
1010 .psize = 0,
1011 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1012 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1013 }, {
1014 .plaintext = "abc",
1015 .psize = 3,
1016 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1017 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1018 }, {
1019 .plaintext = "Tiger",
1020 .psize = 5,
1021 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1022 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1023 }, {
1024 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1025 .psize = 64,
1026 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1027 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1028 }, {
1029 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1030 .psize = 64,
1031 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1032 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1033 }, {
1034 .plaintext = "Tiger - A Fast New Hash Function, "
1035 "by Ross Anderson and Eli Biham, "
1036 "proceedings of Fast Software Encryption 3, "
1037 "Cambridge, 1996.",
1038 .psize = 125,
1039 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1040 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1041 },
1042};
1043
507069c9
YS
1044#define GHASH_TEST_VECTORS 1
1045
1046static struct hash_testvec ghash_tv_template[] =
1047{
1048 {
1049
1050 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1051 .ksize = 16,
1052 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1053 .psize = 16,
1054 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1055 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1056 },
1057};
1058
da7f033d
HX
1059/*
1060 * HMAC-MD5 test vectors from RFC2202
1061 * (These need to be fixed to not use strlen).
1062 */
1063#define HMAC_MD5_TEST_VECTORS 7
1064
1065static struct hash_testvec hmac_md5_tv_template[] =
1066{
1067 {
1068 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1069 .ksize = 16,
1070 .plaintext = "Hi There",
1071 .psize = 8,
1072 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1073 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1074 }, {
1075 .key = "Jefe",
1076 .ksize = 4,
1077 .plaintext = "what do ya want for nothing?",
1078 .psize = 28,
1079 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1080 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1081 .np = 2,
1082 .tap = {14, 14}
1083 }, {
1084 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1085 .ksize = 16,
1086 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1087 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1088 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1089 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1090 .psize = 50,
1091 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1092 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1093 }, {
1094 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1095 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1096 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1097 .ksize = 25,
1098 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1099 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1100 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1101 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1102 .psize = 50,
1103 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1104 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1105 }, {
1106 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1107 .ksize = 16,
1108 .plaintext = "Test With Truncation",
1109 .psize = 20,
1110 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1111 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1112 }, {
1113 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1114 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1115 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1116 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1117 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1118 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1119 "\xaa\xaa",
1120 .ksize = 80,
1121 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1122 .psize = 54,
1123 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1124 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1125 }, {
1126 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1127 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1128 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1129 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1130 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1131 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1132 "\xaa\xaa",
1133 .ksize = 80,
1134 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1135 "Block-Size Data",
1136 .psize = 73,
1137 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1138 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1139 },
1140};
1141
1142/*
1143 * HMAC-RIPEMD128 test vectors from RFC2286
1144 */
1145#define HMAC_RMD128_TEST_VECTORS 7
1146
1147static struct hash_testvec hmac_rmd128_tv_template[] = {
1148 {
1149 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1150 .ksize = 16,
1151 .plaintext = "Hi There",
1152 .psize = 8,
1153 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1154 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1155 }, {
1156 .key = "Jefe",
1157 .ksize = 4,
1158 .plaintext = "what do ya want for nothing?",
1159 .psize = 28,
1160 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1161 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1162 .np = 2,
1163 .tap = { 14, 14 },
1164 }, {
1165 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1166 .ksize = 16,
1167 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1168 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1169 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1170 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1171 .psize = 50,
1172 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1173 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1174 }, {
1175 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1176 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1177 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1178 .ksize = 25,
1179 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1180 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1181 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1182 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1183 .psize = 50,
1184 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1185 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1186 }, {
1187 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1188 .ksize = 16,
1189 .plaintext = "Test With Truncation",
1190 .psize = 20,
1191 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1192 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1193 }, {
1194 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1195 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1196 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1197 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1198 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1199 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1200 "\xaa\xaa",
1201 .ksize = 80,
1202 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1203 .psize = 54,
1204 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1205 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1206 }, {
1207 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1208 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1209 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1210 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1211 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1212 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1213 "\xaa\xaa",
1214 .ksize = 80,
1215 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1216 "Block-Size Data",
1217 .psize = 73,
1218 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1219 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1220 },
1221};
1222
1223/*
1224 * HMAC-RIPEMD160 test vectors from RFC2286
1225 */
1226#define HMAC_RMD160_TEST_VECTORS 7
1227
1228static struct hash_testvec hmac_rmd160_tv_template[] = {
1229 {
1230 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1231 .ksize = 20,
1232 .plaintext = "Hi There",
1233 .psize = 8,
1234 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1235 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1236 }, {
1237 .key = "Jefe",
1238 .ksize = 4,
1239 .plaintext = "what do ya want for nothing?",
1240 .psize = 28,
1241 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1242 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1243 .np = 2,
1244 .tap = { 14, 14 },
1245 }, {
1246 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1247 .ksize = 20,
1248 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1249 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1250 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1251 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1252 .psize = 50,
1253 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1254 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1255 }, {
1256 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1257 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1258 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1259 .ksize = 25,
1260 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1261 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1262 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1263 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1264 .psize = 50,
1265 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1266 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1267 }, {
1268 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1269 .ksize = 20,
1270 .plaintext = "Test With Truncation",
1271 .psize = 20,
1272 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1273 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1274 }, {
1275 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1276 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1277 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1278 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1279 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1280 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1281 "\xaa\xaa",
1282 .ksize = 80,
1283 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1284 .psize = 54,
1285 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1286 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1287 }, {
1288 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1289 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1290 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1291 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1292 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1293 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1294 "\xaa\xaa",
1295 .ksize = 80,
1296 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1297 "Block-Size Data",
1298 .psize = 73,
1299 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1300 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1301 },
1302};
1303
1304/*
1305 * HMAC-SHA1 test vectors from RFC2202
1306 */
1307#define HMAC_SHA1_TEST_VECTORS 7
1308
1309static struct hash_testvec hmac_sha1_tv_template[] = {
1310 {
1311 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1312 .ksize = 20,
1313 .plaintext = "Hi There",
1314 .psize = 8,
1315 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1316 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1317 "\x46\xbe",
1318 }, {
1319 .key = "Jefe",
1320 .ksize = 4,
1321 .plaintext = "what do ya want for nothing?",
1322 .psize = 28,
1323 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1324 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1325 .np = 2,
1326 .tap = { 14, 14 }
1327 }, {
1328 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1329 .ksize = 20,
1330 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1331 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1332 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1333 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1334 .psize = 50,
1335 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1336 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1337 }, {
1338 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1339 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1340 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1341 .ksize = 25,
1342 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1343 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1344 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1345 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1346 .psize = 50,
1347 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1348 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1349 }, {
1350 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1351 .ksize = 20,
1352 .plaintext = "Test With Truncation",
1353 .psize = 20,
1354 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1355 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1356 }, {
1357 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1358 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1359 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1360 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1361 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1362 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1363 "\xaa\xaa",
1364 .ksize = 80,
1365 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1366 .psize = 54,
1367 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1368 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1369 }, {
1370 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1371 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1372 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1373 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1374 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1375 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1376 "\xaa\xaa",
1377 .ksize = 80,
1378 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1379 "Block-Size Data",
1380 .psize = 73,
1381 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1382 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1383 },
1384};
1385
1386
1387/*
1388 * SHA224 HMAC test vectors from RFC4231
1389 */
1390#define HMAC_SHA224_TEST_VECTORS 4
1391
1392static struct hash_testvec hmac_sha224_tv_template[] = {
1393 {
1394 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1395 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1396 "\x0b\x0b\x0b\x0b",
1397 .ksize = 20,
1398 /* ("Hi There") */
1399 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1400 .psize = 8,
1401 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1402 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1403 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1404 "\x53\x68\x4b\x22",
1405 }, {
1406 .key = "Jefe",
1407 .ksize = 4,
1408 /* ("what do ya want for nothing?") */
1409 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1410 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1411 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1412 "\x69\x6e\x67\x3f",
1413 .psize = 28,
1414 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1415 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1416 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1417 "\x8f\xd0\x5e\x44",
1418 .np = 4,
1419 .tap = { 7, 7, 7, 7 }
1420 }, {
1421 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1422 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1423 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1424 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1425 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1426 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1427 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1428 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1429 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1430 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1431 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1432 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1433 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1434 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1435 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1436 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1437 "\xaa\xaa\xaa",
1438 .ksize = 131,
1439 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
1440 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1441 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1442 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1443 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1444 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1445 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1446 "\x20\x46\x69\x72\x73\x74",
1447 .psize = 54,
1448 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1449 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1450 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1451 "\x3f\xa6\x87\x0e",
1452 }, {
1453 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1454 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1455 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1456 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1457 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1460 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1461 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1462 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1463 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1464 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1465 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1466 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1467 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1468 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1469 "\xaa\xaa\xaa",
1470 .ksize = 131,
1471 /* ("This is a test using a larger than block-size key and a")
1472 (" larger than block-size data. The key needs to be")
1473 (" hashed before being used by the HMAC algorithm.") */
1474 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1475 "\x61\x20\x74\x65\x73\x74\x20\x75"
1476 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1477 "\x61\x72\x67\x65\x72\x20\x74\x68"
1478 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1479 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1480 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1481 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1482 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1483 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1484 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1485 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1486 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1487 "\x20\x68\x61\x73\x68\x65\x64\x20"
1488 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1489 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1490 "\x64\x20\x62\x79\x20\x74\x68\x65"
1491 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1492 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1493 .psize = 152,
1494 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1495 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1496 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1497 "\xf6\xf5\x65\xd1",
1498 },
1499};
1500
1501/*
1502 * HMAC-SHA256 test vectors from
1503 * draft-ietf-ipsec-ciph-sha-256-01.txt
1504 */
1505#define HMAC_SHA256_TEST_VECTORS 10
1506
1507static struct hash_testvec hmac_sha256_tv_template[] = {
1508 {
1509 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1510 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1511 "\x11\x12\x13\x14\x15\x16\x17\x18"
1512 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1513 .ksize = 32,
1514 .plaintext = "abc",
1515 .psize = 3,
1516 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1517 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1518 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1519 "\x92\x75\x90\x21\xcf\xab\x81\x81",
1520 }, {
1521 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1522 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1523 "\x11\x12\x13\x14\x15\x16\x17\x18"
1524 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1525 .ksize = 32,
1526 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1527 .psize = 56,
1528 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1529 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1530 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1531 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1532 }, {
1533 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1534 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1535 "\x11\x12\x13\x14\x15\x16\x17\x18"
1536 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1537 .ksize = 32,
1538 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1539 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1540 .psize = 112,
1541 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1542 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1543 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1544 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1545 }, {
1546 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1547 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1548 "\x0b\x0b\x0b\x0b\x0b\x0b",
1549 .ksize = 32,
1550 .plaintext = "Hi There",
1551 .psize = 8,
1552 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1553 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1554 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1555 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1556 }, {
1557 .key = "Jefe",
1558 .ksize = 4,
1559 .plaintext = "what do ya want for nothing?",
1560 .psize = 28,
1561 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1562 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1563 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1564 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1565 .np = 2,
1566 .tap = { 14, 14 }
1567 }, {
1568 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1569 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1570 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1571 .ksize = 32,
1572 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1573 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1574 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1575 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1576 .psize = 50,
1577 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1578 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1579 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1580 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1581 }, {
1582 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1583 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1584 "\x11\x12\x13\x14\x15\x16\x17\x18"
1585 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1586 "\x21\x22\x23\x24\x25",
1587 .ksize = 37,
1588 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1589 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1590 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1591 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1592 .psize = 50,
1593 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1594 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1595 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1596 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1597 }, {
1598 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1599 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1600 "\x0c\x0c\x0c\x0c\x0c\x0c",
1601 .ksize = 32,
1602 .plaintext = "Test With Truncation",
1603 .psize = 20,
1604 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1605 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1606 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1607 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1608 }, {
1609 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1610 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1611 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1612 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1613 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1614 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1615 "\xaa\xaa",
1616 .ksize = 80,
1617 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1618 .psize = 54,
1619 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1620 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1621 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1622 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1623 }, {
1624 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1625 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1626 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1627 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1628 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1629 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1630 "\xaa\xaa",
1631 .ksize = 80,
1632 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1633 "One Block-Size Data",
1634 .psize = 73,
1635 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1636 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1637 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1638 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1639 },
1640};
1641
1642#define XCBC_AES_TEST_VECTORS 6
1643
1644static struct hash_testvec aes_xcbc128_tv_template[] = {
1645 {
1646 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1647 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1648 .plaintext = zeroed_string,
1649 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1650 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1651 .psize = 0,
1652 .ksize = 16,
1653 }, {
1654 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1655 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1656 .plaintext = "\x00\x01\x02",
1657 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1658 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1659 .psize = 3,
1660 .ksize = 16,
1661 } , {
1662 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1663 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1664 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1665 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1666 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1667 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1668 .psize = 16,
1669 .ksize = 16,
1670 }, {
1671 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1672 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1673 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1674 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1675 "\x10\x11\x12\x13",
1676 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1677 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1678 .tap = { 10, 10 },
1679 .psize = 20,
1680 .np = 2,
1681 .ksize = 16,
1682 }, {
1683 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1684 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1685 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1686 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1687 "\x10\x11\x12\x13\x14\x15\x16\x17"
1688 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1689 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1690 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1691 .psize = 32,
1692 .ksize = 16,
1693 }, {
1694 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1695 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1696 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1697 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1698 "\x10\x11\x12\x13\x14\x15\x16\x17"
1699 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1700 "\x20\x21",
1701 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1702 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1703 .tap = { 17, 17 },
1704 .psize = 34,
1705 .np = 2,
1706 .ksize = 16,
1707 }
1708};
1709
304a204e
SW
1710#define VMAC_AES_TEST_VECTORS 8
1711static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
f1939f7c
SW
1712 '\x02', '\x03', '\x02', '\x02',
1713 '\x02', '\x04', '\x01', '\x07',
1714 '\x04', '\x01', '\x04', '\x03',};
304a204e
SW
1715static char vmac_string2[128] = {'a', 'b', 'c',};
1716static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
1717 'a', 'b', 'c', 'a', 'b', 'c',
1718 'a', 'b', 'c', 'a', 'b', 'c',
1719 'a', 'b', 'c', 'a', 'b', 'c',
1720 'a', 'b', 'c', 'a', 'b', 'c',
1721 'a', 'b', 'c', 'a', 'b', 'c',
1722 'a', 'b', 'c', 'a', 'b', 'c',
1723 'a', 'b', 'c', 'a', 'b', 'c',
1724 };
1725
f1939f7c
SW
1726static struct hash_testvec aes_vmac128_tv_template[] = {
1727 {
304a204e
SW
1728 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1729 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1730 .plaintext = NULL,
1731 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1732 .psize = 0,
1733 .ksize = 16,
1734 }, {
1735 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1736 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1737 .plaintext = vmac_string1,
1738 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1739 .psize = 128,
1740 .ksize = 16,
1741 }, {
1742 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1743 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1744 .plaintext = vmac_string2,
1745 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1746 .psize = 128,
1747 .ksize = 16,
1748 }, {
f1939f7c
SW
1749 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1750 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
304a204e
SW
1751 .plaintext = vmac_string3,
1752 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1753 .psize = 128,
1754 .ksize = 16,
1755 }, {
1756 .key = "abcdefghijklmnop",
1757 .plaintext = NULL,
1758 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1759 .psize = 0,
1760 .ksize = 16,
1761 }, {
1762 .key = "abcdefghijklmnop",
1763 .plaintext = vmac_string1,
1764 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1765 .psize = 128,
1766 .ksize = 16,
1767 }, {
1768 .key = "abcdefghijklmnop",
1769 .plaintext = vmac_string2,
1770 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1771 .psize = 128,
1772 .ksize = 16,
1773 }, {
1774 .key = "abcdefghijklmnop",
1775 .plaintext = vmac_string3,
1776 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
f1939f7c
SW
1777 .psize = 128,
1778 .ksize = 16,
1779 },
1780};
1781
da7f033d
HX
1782/*
1783 * SHA384 HMAC test vectors from RFC4231
1784 */
1785
1786#define HMAC_SHA384_TEST_VECTORS 4
1787
1788static struct hash_testvec hmac_sha384_tv_template[] = {
1789 {
1790 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1791 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1792 "\x0b\x0b\x0b\x0b",
1793 .ksize = 20,
1794 .plaintext = "Hi There",
1795 .psize = 8,
1796 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1797 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1798 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1799 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1800 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1801 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1802 }, {
1803 .key = "Jefe",
1804 .ksize = 4,
1805 .plaintext = "what do ya want for nothing?",
1806 .psize = 28,
1807 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1808 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1809 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1810 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1811 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1812 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
1813 .np = 4,
1814 .tap = { 7, 7, 7, 7 }
1815 }, {
1816 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1817 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1818 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1819 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1820 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1821 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1822 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1823 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1824 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1825 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1826 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1827 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1828 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1829 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1830 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1831 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1832 "\xaa\xaa\xaa",
1833 .ksize = 131,
1834 .plaintext = "Test Using Larger Than Block-Siz"
1835 "e Key - Hash Key First",
1836 .psize = 54,
1837 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1838 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1839 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1840 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1841 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1842 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
1843 }, {
1844 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1845 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1846 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1847 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1848 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1849 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1850 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1851 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1852 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1853 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1854 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1855 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1856 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1857 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1858 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1859 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1860 "\xaa\xaa\xaa",
1861 .ksize = 131,
1862 .plaintext = "This is a test u"
1863 "sing a larger th"
1864 "an block-size ke"
1865 "y and a larger t"
1866 "han block-size d"
1867 "ata. The key nee"
1868 "ds to be hashed "
1869 "before being use"
1870 "d by the HMAC al"
1871 "gorithm.",
1872 .psize = 152,
1873 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1874 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1875 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1876 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1877 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1878 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
1879 },
1880};
1881
1882/*
1883 * SHA512 HMAC test vectors from RFC4231
1884 */
1885
1886#define HMAC_SHA512_TEST_VECTORS 4
1887
1888static struct hash_testvec hmac_sha512_tv_template[] = {
1889 {
1890 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1891 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1892 "\x0b\x0b\x0b\x0b",
1893 .ksize = 20,
1894 .plaintext = "Hi There",
1895 .psize = 8,
1896 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1897 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1898 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1899 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1900 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1901 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1902 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1903 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
1904 }, {
1905 .key = "Jefe",
1906 .ksize = 4,
1907 .plaintext = "what do ya want for nothing?",
1908 .psize = 28,
1909 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1910 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1911 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1912 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1913 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1914 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1915 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1916 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
1917 .np = 4,
1918 .tap = { 7, 7, 7, 7 }
1919 }, {
1920 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1921 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1922 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1923 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1924 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1925 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1926 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1927 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1928 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1929 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1930 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1931 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1932 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1933 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1934 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1935 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1936 "\xaa\xaa\xaa",
1937 .ksize = 131,
1938 .plaintext = "Test Using Large"
1939 "r Than Block-Siz"
1940 "e Key - Hash Key"
1941 " First",
1942 .psize = 54,
1943 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1944 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1945 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1946 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1947 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1948 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1949 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1950 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
1951 }, {
1952 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1953 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1954 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1955 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1956 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1957 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1958 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1959 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1960 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1961 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1962 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1963 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1964 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1965 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1966 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1967 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1968 "\xaa\xaa\xaa",
1969 .ksize = 131,
1970 .plaintext =
1971 "This is a test u"
1972 "sing a larger th"
1973 "an block-size ke"
1974 "y and a larger t"
1975 "han block-size d"
1976 "ata. The key nee"
1977 "ds to be hashed "
1978 "before being use"
1979 "d by the HMAC al"
1980 "gorithm.",
1981 .psize = 152,
1982 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
1983 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
1984 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
1985 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
1986 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
1987 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
1988 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
1989 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
1990 },
1991};
1992
1993/*
1994 * DES test vectors.
1995 */
1996#define DES_ENC_TEST_VECTORS 10
1997#define DES_DEC_TEST_VECTORS 4
1998#define DES_CBC_ENC_TEST_VECTORS 5
1999#define DES_CBC_DEC_TEST_VECTORS 4
2000#define DES3_EDE_ENC_TEST_VECTORS 3
2001#define DES3_EDE_DEC_TEST_VECTORS 3
2002#define DES3_EDE_CBC_ENC_TEST_VECTORS 1
2003#define DES3_EDE_CBC_DEC_TEST_VECTORS 1
2004
2005static struct cipher_testvec des_enc_tv_template[] = {
2006 { /* From Applied Cryptography */
2007 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2008 .klen = 8,
2009 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2010 .ilen = 8,
2011 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2012 .rlen = 8,
2013 }, { /* Same key, different plaintext block */
2014 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2015 .klen = 8,
2016 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2017 .ilen = 8,
2018 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2019 .rlen = 8,
2020 }, { /* Sbox test from NBS */
2021 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2022 .klen = 8,
2023 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2024 .ilen = 8,
2025 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2026 .rlen = 8,
2027 }, { /* Three blocks */
2028 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2029 .klen = 8,
2030 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2031 "\x22\x33\x44\x55\x66\x77\x88\x99"
2032 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2033 .ilen = 24,
2034 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2035 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2036 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2037 .rlen = 24,
2038 }, { /* Weak key */
2039 .fail = 1,
2040 .wk = 1,
2041 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2042 .klen = 8,
2043 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2044 .ilen = 8,
2045 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2046 .rlen = 8,
2047 }, { /* Two blocks -- for testing encryption across pages */
2048 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2049 .klen = 8,
2050 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2051 "\x22\x33\x44\x55\x66\x77\x88\x99",
2052 .ilen = 16,
2053 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2054 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2055 .rlen = 16,
2056 .np = 2,
2057 .tap = { 8, 8 }
2058 }, { /* Four blocks -- for testing encryption with chunking */
2059 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2060 .klen = 8,
2061 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2062 "\x22\x33\x44\x55\x66\x77\x88\x99"
2063 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2064 "\x22\x33\x44\x55\x66\x77\x88\x99",
2065 .ilen = 32,
2066 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2067 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2068 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2069 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2070 .rlen = 32,
2071 .np = 3,
2072 .tap = { 14, 10, 8 }
2073 }, {
2074 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2075 .klen = 8,
2076 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2077 "\x22\x33\x44\x55\x66\x77\x88\x99"
2078 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2079 .ilen = 24,
2080 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2081 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2082 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2083 .rlen = 24,
2084 .np = 4,
2085 .tap = { 2, 1, 3, 18 }
2086 }, {
2087 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2088 .klen = 8,
2089 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2090 "\x22\x33\x44\x55\x66\x77\x88\x99",
2091 .ilen = 16,
2092 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2093 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2094 .rlen = 16,
2095 .np = 5,
2096 .tap = { 2, 2, 2, 2, 8 }
2097 }, {
2098 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2099 .klen = 8,
2100 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2101 .ilen = 8,
2102 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2103 .rlen = 8,
2104 .np = 8,
2105 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
2106 },
2107};
2108
2109static struct cipher_testvec des_dec_tv_template[] = {
2110 { /* From Applied Cryptography */
2111 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2112 .klen = 8,
2113 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2114 .ilen = 8,
2115 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2116 .rlen = 8,
2117 }, { /* Sbox test from NBS */
2118 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2119 .klen = 8,
2120 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2121 .ilen = 8,
2122 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2123 .rlen = 8,
2124 }, { /* Two blocks, for chunking test */
2125 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2126 .klen = 8,
2127 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2128 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2129 .ilen = 16,
2130 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2131 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2132 .rlen = 16,
2133 .np = 2,
2134 .tap = { 8, 8 }
2135 }, {
2136 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2137 .klen = 8,
2138 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2139 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2140 .ilen = 16,
2141 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2142 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2143 .rlen = 16,
2144 .np = 3,
2145 .tap = { 3, 12, 1 }
2146 },
2147};
2148
2149static struct cipher_testvec des_cbc_enc_tv_template[] = {
2150 { /* From OpenSSL */
2151 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2152 .klen = 8,
2153 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2154 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2155 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2156 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2157 .ilen = 24,
2158 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2159 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2160 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2161 .rlen = 24,
2162 }, { /* FIPS Pub 81 */
2163 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2164 .klen = 8,
2165 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2166 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2167 .ilen = 8,
2168 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2169 .rlen = 8,
2170 }, {
2171 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2172 .klen = 8,
2173 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2174 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2175 .ilen = 8,
2176 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2177 .rlen = 8,
2178 }, {
2179 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2180 .klen = 8,
2181 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2182 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2183 .ilen = 8,
2184 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2185 .rlen = 8,
2186 }, { /* Copy of openssl vector for chunk testing */
2187 /* From OpenSSL */
2188 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2189 .klen = 8,
2190 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2191 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2192 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2193 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2194 .ilen = 24,
2195 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2196 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2197 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2198 .rlen = 24,
2199 .np = 2,
2200 .tap = { 13, 11 }
2201 },
2202};
2203
2204static struct cipher_testvec des_cbc_dec_tv_template[] = {
2205 { /* FIPS Pub 81 */
2206 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2207 .klen = 8,
2208 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2209 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2210 .ilen = 8,
2211 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2212 .rlen = 8,
2213 }, {
2214 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2215 .klen = 8,
2216 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2217 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2218 .ilen = 8,
2219 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2220 .rlen = 8,
2221 }, {
2222 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2223 .klen = 8,
2224 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2225 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2226 .ilen = 8,
2227 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2228 .rlen = 8,
2229 }, { /* Copy of above, for chunk testing */
2230 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2231 .klen = 8,
2232 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2233 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2234 .ilen = 8,
2235 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2236 .rlen = 8,
2237 .np = 2,
2238 .tap = { 4, 4 }
2239 },
2240};
2241
2242static struct cipher_testvec des3_ede_enc_tv_template[] = {
2243 { /* These are from openssl */
2244 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2245 "\x55\x55\x55\x55\x55\x55\x55\x55"
2246 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2247 .klen = 24,
2248 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2249 .ilen = 8,
2250 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2251 .rlen = 8,
2252 }, {
2253 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2254 "\x86\x02\x87\x66\x59\x08\x21\x98"
2255 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2256 .klen = 24,
2257 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2258 .ilen = 8,
2259 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2260 .rlen = 8,
2261 }, {
2262 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2263 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2264 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2265 .klen = 24,
2266 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2267 .ilen = 8,
2268 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2269 .rlen = 8,
2270 },
2271};
2272
2273static struct cipher_testvec des3_ede_dec_tv_template[] = {
2274 { /* These are from openssl */
2275 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2276 "\x55\x55\x55\x55\x55\x55\x55\x55"
2277 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2278 .klen = 24,
2279 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2280 .ilen = 8,
2281 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2282 .rlen = 8,
2283 }, {
2284 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2285 "\x86\x02\x87\x66\x59\x08\x21\x98"
2286 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2287 .klen = 24,
2288 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2289 .ilen = 8,
2290 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2291 .rlen = 8,
2292 }, {
2293 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2294 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2295 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2296 .klen = 24,
2297 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2298 .ilen = 8,
2299 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2300 .rlen = 8,
2301 },
2302};
2303
2304static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2305 { /* Generated from openssl */
2306 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2307 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2308 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2309 .klen = 24,
2310 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2311 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2312 "\x53\x20\x63\x65\x65\x72\x73\x74"
2313 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2314 "\x20\x79\x65\x53\x72\x63\x74\x65"
2315 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2316 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2317 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2318 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2319 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2320 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2321 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2322 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2323 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2324 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2325 "\x63\x65\x65\x72\x73\x74\x54\x20"
2326 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2327 .ilen = 128,
2328 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2329 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2330 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2331 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2332 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2333 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2334 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2335 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2336 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2337 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2338 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2339 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2340 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2341 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2342 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2343 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2344 .rlen = 128,
2345 },
2346};
2347
2348static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2349 { /* Generated from openssl */
2350 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2351 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2352 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2353 .klen = 24,
2354 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2355 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2356 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2357 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2358 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2359 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2360 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2361 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2362 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2363 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2364 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2365 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2366 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2367 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2368 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2369 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2370 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2371 .ilen = 128,
2372 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2373 "\x53\x20\x63\x65\x65\x72\x73\x74"
2374 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2375 "\x20\x79\x65\x53\x72\x63\x74\x65"
2376 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2377 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2378 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2379 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2380 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2381 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2382 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2383 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2384 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2385 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2386 "\x63\x65\x65\x72\x73\x74\x54\x20"
2387 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2388 .rlen = 128,
2389 },
2390};
2391
2392/*
2393 * Blowfish test vectors.
2394 */
85b63e34
JK
2395#define BF_ENC_TEST_VECTORS 7
2396#define BF_DEC_TEST_VECTORS 7
2397#define BF_CBC_ENC_TEST_VECTORS 2
2398#define BF_CBC_DEC_TEST_VECTORS 2
2399#define BF_CTR_ENC_TEST_VECTORS 2
2400#define BF_CTR_DEC_TEST_VECTORS 2
da7f033d
HX
2401
2402static struct cipher_testvec bf_enc_tv_template[] = {
2403 { /* DES test vectors from OpenSSL */
2404 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2405 .klen = 8,
2406 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2407 .ilen = 8,
2408 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2409 .rlen = 8,
2410 }, {
2411 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2412 .klen = 8,
2413 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2414 .ilen = 8,
2415 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2416 .rlen = 8,
2417 }, {
2418 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2419 .klen = 8,
2420 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2421 .ilen = 8,
2422 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2423 .rlen = 8,
2424 }, { /* Vary the keylength... */
2425 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2426 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2427 .klen = 16,
2428 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2429 .ilen = 8,
2430 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2431 .rlen = 8,
2432 }, {
2433 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2434 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2435 "\x00\x11\x22\x33\x44",
2436 .klen = 21,
2437 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2438 .ilen = 8,
2439 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2440 .rlen = 8,
2441 }, { /* Generated with bf488 */
2442 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2443 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2444 "\x00\x11\x22\x33\x44\x55\x66\x77"
2445 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2446 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2447 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2448 "\xff\xff\xff\xff\xff\xff\xff\xff",
2449 .klen = 56,
2450 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2451 .ilen = 8,
2452 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2453 .rlen = 8,
85b63e34
JK
2454 }, { /* Generated with Crypto++ */
2455 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2456 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2457 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2458 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2459 .klen = 32,
2460 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2461 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2462 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2463 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2464 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2465 .ilen = 40,
2466 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2467 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2468 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2469 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2470 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2471 .rlen = 40,
f44d83d1
JK
2472 .also_non_np = 1,
2473 .np = 2,
2474 .tap = { 40 - 8, 8 },
da7f033d
HX
2475 },
2476};
2477
2478static struct cipher_testvec bf_dec_tv_template[] = {
2479 { /* DES test vectors from OpenSSL */
2480 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2481 .klen = 8,
2482 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2483 .ilen = 8,
2484 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2485 .rlen = 8,
2486 }, {
2487 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2488 .klen = 8,
2489 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2490 .ilen = 8,
2491 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2492 .rlen = 8,
2493 }, {
2494 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2495 .klen = 8,
2496 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2497 .ilen = 8,
2498 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2499 .rlen = 8,
2500 }, { /* Vary the keylength... */
2501 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2502 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2503 .klen = 16,
2504 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2505 .ilen = 8,
2506 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2507 .rlen = 8,
2508 }, {
2509 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2510 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2511 "\x00\x11\x22\x33\x44",
2512 .klen = 21,
2513 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2514 .ilen = 8,
2515 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2516 .rlen = 8,
2517 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
2518 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2519 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2520 "\x00\x11\x22\x33\x44\x55\x66\x77"
2521 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2522 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2523 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2524 "\xff\xff\xff\xff\xff\xff\xff\xff",
2525 .klen = 56,
2526 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2527 .ilen = 8,
2528 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2529 .rlen = 8,
85b63e34
JK
2530 }, { /* Generated with Crypto++ */
2531 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2532 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2533 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2534 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2535 .klen = 32,
2536 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2537 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2538 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2539 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2540 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2541 .ilen = 40,
2542 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2543 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2544 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2545 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2546 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2547 .rlen = 40,
f44d83d1
JK
2548 .also_non_np = 1,
2549 .np = 2,
2550 .tap = { 40 - 8, 8 },
da7f033d
HX
2551 },
2552};
2553
2554static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2555 { /* From OpenSSL */
2556 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2557 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2558 .klen = 16,
2559 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2560 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2561 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2562 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2563 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2564 .ilen = 32,
2565 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2566 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2567 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2568 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2569 .rlen = 32,
85b63e34
JK
2570 }, { /* Generated with Crypto++ */
2571 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2572 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2573 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2574 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2575 .klen = 32,
2576 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2577 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2578 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2579 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2580 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2581 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2582 .ilen = 40,
2583 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2584 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2585 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2586 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2587 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2588 .rlen = 40,
f44d83d1
JK
2589 .also_non_np = 1,
2590 .np = 2,
2591 .tap = { 40 - 8, 8 },
da7f033d
HX
2592 },
2593};
2594
2595static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2596 { /* From OpenSSL */
2597 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2598 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2599 .klen = 16,
2600 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2601 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2602 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2603 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2604 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2605 .ilen = 32,
2606 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2607 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2608 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2609 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2610 .rlen = 32,
85b63e34
JK
2611 }, { /* Generated with Crypto++ */
2612 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2613 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2614 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2615 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2616 .klen = 32,
2617 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2618 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2619 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2620 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2621 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2622 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2623 .ilen = 40,
2624 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2625 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2626 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2627 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2628 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2629 .rlen = 40,
f44d83d1
JK
2630 .also_non_np = 1,
2631 .np = 2,
2632 .tap = { 40 - 8, 8 },
85b63e34
JK
2633 },
2634};
2635
2636static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2637 { /* Generated with Crypto++ */
2638 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2639 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2640 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2641 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2642 .klen = 32,
2643 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2644 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2645 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2646 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2647 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2648 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2649 .ilen = 40,
2650 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2651 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2652 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2653 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2654 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2655 .rlen = 40,
2656 }, { /* Generated with Crypto++ */
2657 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2658 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2659 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2660 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2661 .klen = 32,
2662 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2663 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2664 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2665 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2666 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2667 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2668 "\x6D\x04\x9B",
2669 .ilen = 43,
2670 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2671 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2672 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2673 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2674 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2675 "\x3D\xA7\xE9",
2676 .rlen = 43,
f44d83d1
JK
2677 .also_non_np = 1,
2678 .np = 2,
2679 .tap = { 43 - 8, 8 },
85b63e34
JK
2680 },
2681};
2682
2683static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2684 { /* Generated with Crypto++ */
2685 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2686 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2687 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2688 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2689 .klen = 32,
2690 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2691 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2692 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2693 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2694 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2695 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2696 .ilen = 40,
2697 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2698 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2699 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2700 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2701 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2702 .rlen = 40,
2703 }, { /* Generated with Crypto++ */
2704 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2705 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2706 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2707 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2708 .klen = 32,
2709 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2710 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2711 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2712 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2713 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2714 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2715 "\x3D\xA7\xE9",
2716 .ilen = 43,
2717 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2718 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2719 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2720 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2721 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2722 "\x6D\x04\x9B",
2723 .rlen = 43,
f44d83d1
JK
2724 .also_non_np = 1,
2725 .np = 2,
2726 .tap = { 43 - 8, 8 },
da7f033d
HX
2727 },
2728};
2729
2730/*
2731 * Twofish test vectors.
2732 */
573da620
JK
2733#define TF_ENC_TEST_VECTORS 4
2734#define TF_DEC_TEST_VECTORS 4
2735#define TF_CBC_ENC_TEST_VECTORS 5
2736#define TF_CBC_DEC_TEST_VECTORS 5
2737#define TF_CTR_ENC_TEST_VECTORS 2
2738#define TF_CTR_DEC_TEST_VECTORS 2
0b2a1551
JK
2739#define TF_LRW_ENC_TEST_VECTORS 8
2740#define TF_LRW_DEC_TEST_VECTORS 8
aed265b9
JK
2741#define TF_XTS_ENC_TEST_VECTORS 5
2742#define TF_XTS_DEC_TEST_VECTORS 5
da7f033d
HX
2743
2744static struct cipher_testvec tf_enc_tv_template[] = {
2745 {
2746 .key = zeroed_string,
2747 .klen = 16,
2748 .input = zeroed_string,
2749 .ilen = 16,
2750 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2751 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2752 .rlen = 16,
2753 }, {
2754 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2755 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2756 "\x00\x11\x22\x33\x44\x55\x66\x77",
2757 .klen = 24,
2758 .input = zeroed_string,
2759 .ilen = 16,
2760 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2761 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2762 .rlen = 16,
2763 }, {
2764 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2765 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2766 "\x00\x11\x22\x33\x44\x55\x66\x77"
2767 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2768 .klen = 32,
2769 .input = zeroed_string,
2770 .ilen = 16,
2771 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2772 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2773 .rlen = 16,
573da620
JK
2774 }, { /* Generated with Crypto++ */
2775 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2776 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2777 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2778 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2779 .klen = 32,
2780 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2781 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2782 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2783 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2784 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2785 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2786 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
2787 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2788 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2789 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2790 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2791 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2792 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2793 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2794 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2795 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2796 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2797 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2798 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2799 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2800 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2801 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2802 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2803 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2804 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2805 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2806 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2807 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2808 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2809 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2810 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2811 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2812 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2813 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2814 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2815 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2816 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2817 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2818 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2819 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2820 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2821 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2822 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2823 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2824 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2825 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2826 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2827 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2828 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2829 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2830 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2831 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2832 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2833 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2834 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2835 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2836 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2837 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2838 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2839 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2840 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2841 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
2842 .ilen = 496,
573da620
JK
2843 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2844 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2845 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2846 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2847 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2848 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2849 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
4da7de4d
JG
2850 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
2851 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
2852 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
2853 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
2854 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
2855 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
2856 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
2857 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
2858 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
2859 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
2860 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
2861 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
2862 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
2863 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
2864 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
2865 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
2866 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
2867 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
2868 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
2869 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
2870 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
2871 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
2872 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
2873 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
2874 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
2875 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
2876 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
2877 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
2878 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
2879 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
2880 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
2881 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
2882 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
2883 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
2884 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
2885 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
2886 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
2887 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
2888 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
2889 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
2890 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
2891 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
2892 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
2893 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
2894 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
2895 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
2896 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
2897 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
2898 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
2899 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
2900 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
2901 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
2902 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
2903 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
2904 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
2905 .rlen = 496,
f44d83d1
JK
2906 .also_non_np = 1,
2907 .np = 2,
2908 .tap = { 496 - 16, 16 },
da7f033d
HX
2909 },
2910};
2911
2912static struct cipher_testvec tf_dec_tv_template[] = {
2913 {
2914 .key = zeroed_string,
2915 .klen = 16,
2916 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2917 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2918 .ilen = 16,
2919 .result = zeroed_string,
2920 .rlen = 16,
2921 }, {
2922 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2923 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2924 "\x00\x11\x22\x33\x44\x55\x66\x77",
2925 .klen = 24,
2926 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2927 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2928 .ilen = 16,
2929 .result = zeroed_string,
2930 .rlen = 16,
2931 }, {
2932 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2933 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2934 "\x00\x11\x22\x33\x44\x55\x66\x77"
2935 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2936 .klen = 32,
2937 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2938 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2939 .ilen = 16,
2940 .result = zeroed_string,
2941 .rlen = 16,
573da620
JK
2942 }, { /* Generated with Crypto++ */
2943 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2944 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2945 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2946 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2947 .klen = 32,
2948 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2949 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2950 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2951 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2952 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2953 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2954 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
4da7de4d
JG
2955 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
2956 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
2957 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
2958 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
2959 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
2960 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
2961 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
2962 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
2963 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
2964 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
2965 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
2966 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
2967 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
2968 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
2969 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
2970 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
2971 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
2972 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
2973 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
2974 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
2975 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
2976 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
2977 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
2978 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
2979 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
2980 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
2981 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
2982 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
2983 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
2984 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
2985 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
2986 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
2987 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
2988 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
2989 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
2990 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
2991 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
2992 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
2993 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
2994 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
2995 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
2996 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
2997 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
2998 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
2999 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
3000 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
3001 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
3002 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
3003 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
3004 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
3005 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
3006 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
3007 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
3008 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
3009 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
3010 .ilen = 496,
573da620
JK
3011 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3012 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3013 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3014 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3015 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3016 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3017 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
3018 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3019 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3020 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3021 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3022 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3023 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3024 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3025 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3026 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3027 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3028 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3029 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3030 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3031 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3032 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3033 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3034 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3035 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3036 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3037 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3038 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3039 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3040 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3041 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3042 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3043 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3044 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3045 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3046 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3047 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3048 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3049 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3050 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3051 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3052 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3053 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3054 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3055 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3056 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3057 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3058 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3059 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3060 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3061 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3062 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3063 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3064 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3065 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3066 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3067 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3068 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3069 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3070 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3071 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3072 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3073 .rlen = 496,
f44d83d1
JK
3074 .also_non_np = 1,
3075 .np = 2,
3076 .tap = { 496 - 16, 16 },
da7f033d
HX
3077 },
3078};
3079
3080static struct cipher_testvec tf_cbc_enc_tv_template[] = {
3081 { /* Generated with Nettle */
3082 .key = zeroed_string,
3083 .klen = 16,
3084 .iv = zeroed_string,
3085 .input = zeroed_string,
3086 .ilen = 16,
3087 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3088 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3089 .rlen = 16,
3090 }, {
3091 .key = zeroed_string,
3092 .klen = 16,
3093 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3094 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3095 .input = zeroed_string,
3096 .ilen = 16,
3097 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3098 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3099 .rlen = 16,
3100 }, {
3101 .key = zeroed_string,
3102 .klen = 16,
3103 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3104 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3105 .input = zeroed_string,
3106 .ilen = 16,
3107 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3108 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3109 .rlen = 16,
3110 }, {
3111 .key = zeroed_string,
3112 .klen = 16,
3113 .iv = zeroed_string,
3114 .input = zeroed_string,
3115 .ilen = 48,
3116 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3117 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3118 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3119 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3120 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3121 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3122 .rlen = 48,
573da620
JK
3123 }, { /* Generated with Crypto++ */
3124 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3125 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3126 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3127 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3128 .klen = 32,
3129 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3130 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3131 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3132 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3133 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3134 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3135 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3136 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3137 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
3138 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3139 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3140 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3141 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3142 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3143 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3144 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3145 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3146 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3147 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3148 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3149 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3150 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3151 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3152 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3153 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3154 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3155 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3156 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3157 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3158 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3159 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3160 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3161 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3162 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3163 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3164 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3165 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3166 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3167 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3168 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3169 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3170 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3171 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3172 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3173 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3174 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3175 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3176 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3177 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3178 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3179 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3180 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3181 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3182 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3183 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3184 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3185 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3186 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3187 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3188 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3189 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3190 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3191 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3192 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3193 .ilen = 496,
573da620
JK
3194 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3195 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3196 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3197 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3198 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3199 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3200 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
4da7de4d
JG
3201 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3202 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3203 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3204 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3205 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3206 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3207 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3208 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3209 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3210 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3211 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3212 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3213 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3214 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3215 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3216 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3217 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3218 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3219 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3220 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3221 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3222 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3223 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3224 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3225 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3226 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3227 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3228 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3229 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3230 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3231 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3232 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3233 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3234 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3235 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3236 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3237 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3238 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3239 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3240 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3241 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3242 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3243 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3244 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3245 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3246 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3247 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3248 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3249 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3250 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3251 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3252 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3253 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3254 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3255 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3256 .rlen = 496,
f44d83d1
JK
3257 .also_non_np = 1,
3258 .np = 2,
3259 .tap = { 496 - 16, 16 },
da7f033d
HX
3260 },
3261};
3262
3263static struct cipher_testvec tf_cbc_dec_tv_template[] = {
3264 { /* Reverse of the first four above */
3265 .key = zeroed_string,
3266 .klen = 16,
3267 .iv = zeroed_string,
3268 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3269 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3270 .ilen = 16,
3271 .result = zeroed_string,
3272 .rlen = 16,
3273 }, {
3274 .key = zeroed_string,
3275 .klen = 16,
3276 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3277 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3278 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3279 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3280 .ilen = 16,
3281 .result = zeroed_string,
3282 .rlen = 16,
3283 }, {
3284 .key = zeroed_string,
3285 .klen = 16,
3286 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3287 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3288 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3289 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3290 .ilen = 16,
3291 .result = zeroed_string,
3292 .rlen = 16,
3293 }, {
3294 .key = zeroed_string,
3295 .klen = 16,
3296 .iv = zeroed_string,
3297 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3298 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3299 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3300 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3301 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3302 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3303 .ilen = 48,
3304 .result = zeroed_string,
3305 .rlen = 48,
573da620
JK
3306 }, { /* Generated with Crypto++ */
3307 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3308 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3309 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3310 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3311 .klen = 32,
3312 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3313 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3314 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3315 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3316 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3317 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3318 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3319 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3320 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
4da7de4d
JG
3321 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3322 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3323 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3324 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3325 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3326 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3327 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3328 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3329 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3330 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3331 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3332 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3333 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3334 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3335 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3336 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3337 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3338 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3339 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3340 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3341 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3342 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3343 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3344 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3345 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3346 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3347 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3348 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3349 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3350 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3351 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3352 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3353 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3354 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3355 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3356 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3357 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3358 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3359 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3360 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3361 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3362 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3363 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3364 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3365 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3366 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3367 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3368 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3369 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3370 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3371 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3372 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3373 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3374 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3375 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3376 .ilen = 496,
573da620
JK
3377 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3378 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3379 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3380 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3381 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3382 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3383 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
3384 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3385 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3386 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3387 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3388 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3389 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3390 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3391 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3392 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3393 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3394 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3395 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3396 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3397 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3398 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3399 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3400 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3401 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3402 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3403 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3404 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3405 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3406 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3407 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3408 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3409 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3410 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3411 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3412 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3413 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3414 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3415 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3416 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3417 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3418 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3419 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3420 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3421 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3422 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3423 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3424 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3425 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3426 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3427 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3428 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3429 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3430 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3431 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3432 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3433 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3434 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3435 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3436 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3437 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3438 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3439 .rlen = 496,
f44d83d1
JK
3440 .also_non_np = 1,
3441 .np = 2,
3442 .tap = { 496 - 16, 16 },
573da620
JK
3443 },
3444};
3445
3446static struct cipher_testvec tf_ctr_enc_tv_template[] = {
3447 { /* Generated with Crypto++ */
3448 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3449 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3450 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3451 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3452 .klen = 32,
3453 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3454 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3455 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3456 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3457 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3458 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3459 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3460 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3461 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
3462 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3463 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3464 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3465 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3466 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3467 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3468 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3469 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3470 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3471 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3472 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3473 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3474 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3475 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3476 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3477 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3478 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3479 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3480 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3481 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3482 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3483 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3484 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3485 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3486 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3487 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3488 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3489 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3490 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3491 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3492 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3493 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3494 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3495 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3496 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3497 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3498 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3499 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3500 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3501 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3502 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3503 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3504 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3505 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3506 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3507 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3508 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3509 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3510 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3511 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3512 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3513 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3514 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3515 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3516 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3517 .ilen = 496,
573da620
JK
3518 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3519 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3520 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3521 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3522 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3523 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3524 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4da7de4d
JG
3525 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3526 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3527 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3528 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3529 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3530 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3531 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3532 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3533 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3534 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3535 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3536 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3537 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3538 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3539 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3540 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3541 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3542 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3543 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3544 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3545 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3546 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3547 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3548 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3549 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3550 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3551 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3552 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3553 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3554 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3555 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3556 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3557 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3558 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3559 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3560 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3561 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3562 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3563 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3564 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3565 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3566 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3567 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3568 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3569 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3570 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3571 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3572 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3573 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3574 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3575 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3576 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3577 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3578 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3579 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
3580 .rlen = 496,
573da620
JK
3581 }, { /* Generated with Crypto++ */
3582 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3583 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3584 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3585 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3586 .klen = 32,
3587 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3588 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3589 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3590 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3591 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3592 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3593 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3594 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3595 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3596 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4da7de4d
JG
3597 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3598 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3599 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3600 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3601 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3602 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3603 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3604 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3605 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3606 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3607 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3608 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3609 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3610 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3611 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3612 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3613 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3614 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3615 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3616 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3617 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3618 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3619 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3620 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3621 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3622 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3623 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3624 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3625 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3626 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3627 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3628 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3629 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3630 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3631 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3632 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3633 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3634 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3635 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3636 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3637 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3638 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3639 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3640 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3641 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3642 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3643 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3644 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3645 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3646 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3647 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3648 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3649 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3650 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3651 "\x2B\xC2\x59",
3652 .ilen = 499,
573da620
JK
3653 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3654 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3655 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3656 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3657 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3658 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3659 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3660 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4da7de4d
JG
3661 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3662 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3663 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3664 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3665 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3666 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3667 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3668 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3669 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3670 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3671 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3672 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3673 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3674 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3675 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3676 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3677 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3678 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3679 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3680 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3681 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3682 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3683 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3684 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3685 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3686 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3687 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3688 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3689 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3690 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3691 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3692 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3693 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3694 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3695 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3696 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3697 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3698 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3699 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3700 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3701 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3702 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3703 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3704 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3705 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3706 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3707 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3708 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3709 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3710 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3711 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3712 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3713 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3714 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
3715 "\x6C\x82\x9D",
3716 .rlen = 499,
f44d83d1
JK
3717 .also_non_np = 1,
3718 .np = 2,
3719 .tap = { 499 - 16, 16 },
573da620
JK
3720 },
3721};
3722
3723static struct cipher_testvec tf_ctr_dec_tv_template[] = {
3724 { /* Generated with Crypto++ */
3725 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3726 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3727 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3728 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3729 .klen = 32,
3730 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3731 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3732 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3733 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3734 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3735 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3736 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3737 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3738 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4da7de4d
JG
3739 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3740 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3741 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3742 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3743 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3744 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3745 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3746 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3747 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3748 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3749 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3750 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3751 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3752 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3753 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3754 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3755 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3756 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3757 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3758 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3759 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3760 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3761 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3762 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3763 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3764 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3765 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3766 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3767 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3768 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3769 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3770 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3771 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3772 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3773 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3774 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3775 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3776 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3777 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3778 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3779 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3780 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3781 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3782 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3783 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3784 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3785 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3786 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3787 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3788 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3789 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3790 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3791 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3792 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3793 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
3794 .ilen = 496,
573da620
JK
3795 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3796 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3797 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3798 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3799 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3800 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3801 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4da7de4d
JG
3802 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3803 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3804 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3805 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3806 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3807 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3808 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3809 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3810 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3811 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3812 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3813 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3814 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3815 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3816 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3817 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3818 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3819 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3820 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3821 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3822 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3823 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3824 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3825 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3826 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3827 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3828 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3829 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3830 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3831 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3832 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3833 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3834 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3835 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3836 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3837 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3838 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3839 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3840 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3841 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3842 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3843 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3844 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3845 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3846 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3847 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3848 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3849 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3850 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3851 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3852 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3853 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3854 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3855 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3856 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3857 .rlen = 496,
573da620
JK
3858 }, { /* Generated with Crypto++ */
3859 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3860 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3861 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3862 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3863 .klen = 32,
3864 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3865 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3866 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3867 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3868 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3869 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3870 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3871 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3872 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3873 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4da7de4d
JG
3874 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3875 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3876 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3877 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3878 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3879 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3880 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3881 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3882 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3883 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3884 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3885 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3886 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3887 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3888 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3889 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3890 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3891 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3892 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3893 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3894 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3895 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3896 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3897 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3898 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3899 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3900 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3901 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3902 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3903 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3904 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3905 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3906 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3907 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3908 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3909 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3910 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3911 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3912 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3913 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3914 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3915 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3916 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3917 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3918 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3919 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3920 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3921 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3922 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3923 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3924 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3925 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3926 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3927 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
3928 "\x6C\x82\x9D",
3929 .ilen = 499,
573da620
JK
3930 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3931 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3932 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3933 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3934 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3935 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3936 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3937 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4da7de4d
JG
3938 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3939 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3940 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3941 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3942 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3943 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3944 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3945 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3946 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3947 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3948 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3949 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3950 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3951 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3952 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3953 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3954 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3955 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3956 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3957 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3958 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3959 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3960 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3961 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3962 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3963 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3964 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3965 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3966 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3967 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3968 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3969 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3970 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3971 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3972 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3973 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3974 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3975 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3976 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3977 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3978 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3979 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3980 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3981 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3982 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3983 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3984 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3985 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3986 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3987 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3988 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3989 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3990 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3991 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3992 "\x2B\xC2\x59",
3993 .rlen = 499,
f44d83d1
JK
3994 .also_non_np = 1,
3995 .np = 2,
3996 .tap = { 499 - 16, 16 },
da7f033d
HX
3997 },
3998};
3999
0b2a1551
JK
4000static struct cipher_testvec tf_lrw_enc_tv_template[] = {
4001 /* Generated from AES-LRW test vectors */
4002 {
4003 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4004 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4005 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4006 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4007 .klen = 32,
4008 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4009 "\x00\x00\x00\x00\x00\x00\x00\x01",
4010 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4011 "\x38\x39\x41\x42\x43\x44\x45\x46",
4012 .ilen = 16,
4013 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4014 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4015 .rlen = 16,
4016 }, {
4017 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4018 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4019 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4020 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4021 .klen = 32,
4022 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4023 "\x00\x00\x00\x00\x00\x00\x00\x02",
4024 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4025 "\x38\x39\x41\x42\x43\x44\x45\x46",
4026 .ilen = 16,
4027 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4028 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4029 .rlen = 16,
4030 }, {
4031 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4032 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4033 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4034 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4035 .klen = 32,
4036 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4037 "\x00\x00\x00\x02\x00\x00\x00\x00",
4038 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4039 "\x38\x39\x41\x42\x43\x44\x45\x46",
4040 .ilen = 16,
4041 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4042 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4043 .rlen = 16,
4044 }, {
4045 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4046 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4047 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4048 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4049 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4050 .klen = 40,
4051 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4052 "\x00\x00\x00\x00\x00\x00\x00\x01",
4053 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4054 "\x38\x39\x41\x42\x43\x44\x45\x46",
4055 .ilen = 16,
4056 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4057 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4058 .rlen = 16,
4059 }, {
4060 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4061 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4062 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4063 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4064 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4065 .klen = 40,
4066 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4067 "\x00\x00\x00\x02\x00\x00\x00\x00",
4068 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4069 "\x38\x39\x41\x42\x43\x44\x45\x46",
4070 .ilen = 16,
4071 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4072 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4073 .rlen = 16,
4074 }, {
4075 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4076 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4077 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4078 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4079 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4080 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4081 .klen = 48,
4082 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4083 "\x00\x00\x00\x00\x00\x00\x00\x01",
4084 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4085 "\x38\x39\x41\x42\x43\x44\x45\x46",
4086 .ilen = 16,
4087 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4088 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4089 .rlen = 16,
4090 }, {
4091 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4092 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4093 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4094 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4095 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4096 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4097 .klen = 48,
4098 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4099 "\x00\x00\x00\x02\x00\x00\x00\x00",
4100 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4101 "\x38\x39\x41\x42\x43\x44\x45\x46",
4102 .ilen = 16,
4103 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4104 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4105 .rlen = 16,
4106 }, {
4107 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4108 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4109 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4110 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4111 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4112 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4113 .klen = 48,
4114 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4115 "\x00\x00\x00\x00\x00\x00\x00\x01",
4116 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4117 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4118 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4119 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4120 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4121 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4122 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4123 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4124 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4125 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4126 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4127 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4128 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4129 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4130 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4131 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4132 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4133 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4134 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4135 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4136 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4137 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4138 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4139 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4140 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4141 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4142 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4143 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4144 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4145 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4146 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4147 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4148 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4149 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4150 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4151 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4152 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4153 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4154 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4155 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4156 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4157 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4158 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4159 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4160 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4161 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4162 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4163 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4164 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4165 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4166 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4167 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4168 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4169 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4170 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4171 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4172 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4173 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4174 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4175 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4176 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4177 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4178 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4179 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4180 .ilen = 512,
4181 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4182 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4183 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4184 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4185 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4186 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4187 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4188 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4189 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4190 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4191 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4192 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4193 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4194 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4195 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4196 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4197 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4198 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4199 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4200 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4201 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4202 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4203 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4204 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4205 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4206 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4207 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4208 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4209 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4210 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4211 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4212 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4213 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4214 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4215 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4216 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4217 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4218 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4219 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4220 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4221 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4222 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4223 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4224 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4225 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4226 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4227 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4228 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4229 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4230 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4231 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4232 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4233 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4234 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4235 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4236 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4237 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4238 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4239 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4240 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4241 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4242 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
4243 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4244 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4245 .rlen = 512,
f44d83d1
JK
4246 .also_non_np = 1,
4247 .np = 2,
4248 .tap = { 512 - 16, 16 },
0b2a1551
JK
4249 },
4250};
4251
4252static struct cipher_testvec tf_lrw_dec_tv_template[] = {
4253 /* Generated from AES-LRW test vectors */
4254 /* same as enc vectors with input and result reversed */
4255 {
4256 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4257 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4258 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4259 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4260 .klen = 32,
4261 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4262 "\x00\x00\x00\x00\x00\x00\x00\x01",
4263 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4264 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4265 .ilen = 16,
4266 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4267 "\x38\x39\x41\x42\x43\x44\x45\x46",
4268 .rlen = 16,
4269 }, {
4270 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4271 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4272 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4273 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4274 .klen = 32,
4275 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4276 "\x00\x00\x00\x00\x00\x00\x00\x02",
4277 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4278 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4279 .ilen = 16,
4280 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4281 "\x38\x39\x41\x42\x43\x44\x45\x46",
4282 .rlen = 16,
4283 }, {
4284 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4285 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4286 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4287 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4288 .klen = 32,
4289 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4290 "\x00\x00\x00\x02\x00\x00\x00\x00",
4291 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4292 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4293 .ilen = 16,
4294 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4295 "\x38\x39\x41\x42\x43\x44\x45\x46",
4296 .rlen = 16,
4297 }, {
4298 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4299 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4300 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4301 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4302 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4303 .klen = 40,
4304 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4305 "\x00\x00\x00\x00\x00\x00\x00\x01",
4306 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4307 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4308 .ilen = 16,
4309 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4310 "\x38\x39\x41\x42\x43\x44\x45\x46",
4311 .rlen = 16,
4312 }, {
4313 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4314 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4315 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4316 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4317 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4318 .klen = 40,
4319 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4320 "\x00\x00\x00\x02\x00\x00\x00\x00",
4321 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4322 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4323 .ilen = 16,
4324 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4325 "\x38\x39\x41\x42\x43\x44\x45\x46",
4326 .rlen = 16,
4327 }, {
4328 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4329 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4330 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4331 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4332 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4333 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4334 .klen = 48,
4335 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4336 "\x00\x00\x00\x00\x00\x00\x00\x01",
4337 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4338 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4339 .ilen = 16,
4340 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4341 "\x38\x39\x41\x42\x43\x44\x45\x46",
4342 .rlen = 16,
4343 }, {
4344 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4345 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4346 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4347 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4348 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4349 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4350 .klen = 48,
4351 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4352 "\x00\x00\x00\x02\x00\x00\x00\x00",
4353 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4354 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4355 .ilen = 16,
4356 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4357 "\x38\x39\x41\x42\x43\x44\x45\x46",
4358 .rlen = 16,
4359 }, {
4360 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4361 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4362 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4363 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4364 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4365 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4366 .klen = 48,
4367 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4368 "\x00\x00\x00\x00\x00\x00\x00\x01",
4369 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4370 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4371 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4372 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4373 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4374 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4375 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4376 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4377 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4378 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4379 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4380 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4381 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4382 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4383 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4384 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4385 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4386 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4387 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4388 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4389 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4390 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4391 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4392 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4393 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4394 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4395 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4396 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4397 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4398 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4399 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4400 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4401 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4402 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4403 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4404 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4405 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4406 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4407 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4408 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4409 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4410 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4411 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4412 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4413 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4414 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4415 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4416 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4417 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4418 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4419 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4420 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4421 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4422 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4423 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4424 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4425 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4426 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4427 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4428 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4429 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4430 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
4431 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4432 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4433 .ilen = 512,
4434 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4435 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4436 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4437 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4438 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4439 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4440 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4441 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4442 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4443 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4444 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4445 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4446 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4447 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4448 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4449 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4450 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4451 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4452 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4453 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4454 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4455 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4456 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4457 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4458 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4459 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4460 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4461 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4462 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4463 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4464 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4465 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4466 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4467 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4468 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4469 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4470 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4471 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4472 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4473 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4474 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4475 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4476 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4477 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4478 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4479 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4480 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4481 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4482 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4483 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4484 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4485 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4486 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4487 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4488 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4489 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4490 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4491 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4492 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4493 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4494 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4495 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4496 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4497 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4498 .rlen = 512,
f44d83d1
JK
4499 .also_non_np = 1,
4500 .np = 2,
4501 .tap = { 512 - 16, 16 },
0b2a1551
JK
4502 },
4503};
4504
aed265b9
JK
4505static struct cipher_testvec tf_xts_enc_tv_template[] = {
4506 /* Generated from AES-XTS test vectors */
4507{
4508 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
4509 "\x00\x00\x00\x00\x00\x00\x00\x00"
4510 "\x00\x00\x00\x00\x00\x00\x00\x00"
4511 "\x00\x00\x00\x00\x00\x00\x00\x00",
4512 .klen = 32,
4513 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4514 "\x00\x00\x00\x00\x00\x00\x00\x00",
4515 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
4516 "\x00\x00\x00\x00\x00\x00\x00\x00"
4517 "\x00\x00\x00\x00\x00\x00\x00\x00"
4518 "\x00\x00\x00\x00\x00\x00\x00\x00",
4519 .ilen = 32,
4520 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
4521 "\x30\x74\xe4\x44\x52\x77\x97\x43"
4522 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
4523 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
4524 .rlen = 32,
4525 }, {
4526 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
4527 "\x11\x11\x11\x11\x11\x11\x11\x11"
4528 "\x22\x22\x22\x22\x22\x22\x22\x22"
4529 "\x22\x22\x22\x22\x22\x22\x22\x22",
4530 .klen = 32,
4531 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4532 "\x00\x00\x00\x00\x00\x00\x00\x00",
4533 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
4534 "\x44\x44\x44\x44\x44\x44\x44\x44"
4535 "\x44\x44\x44\x44\x44\x44\x44\x44"
4536 "\x44\x44\x44\x44\x44\x44\x44\x44",
4537 .ilen = 32,
4538 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
4539 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
4540 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
4541 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
4542 .rlen = 32,
4543 }, {
4544 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
4545 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
4546 "\x22\x22\x22\x22\x22\x22\x22\x22"
4547 "\x22\x22\x22\x22\x22\x22\x22\x22",
4548 .klen = 32,
4549 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4550 "\x00\x00\x00\x00\x00\x00\x00\x00",
4551 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
4552 "\x44\x44\x44\x44\x44\x44\x44\x44"
4553 "\x44\x44\x44\x44\x44\x44\x44\x44"
4554 "\x44\x44\x44\x44\x44\x44\x44\x44",
4555 .ilen = 32,
4556 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
4557 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
4558 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
4559 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
4560 .rlen = 32,
4561 }, {
4562 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4563 "\x23\x53\x60\x28\x74\x71\x35\x26"
4564 "\x31\x41\x59\x26\x53\x58\x97\x93"
4565 "\x23\x84\x62\x64\x33\x83\x27\x95",
4566 .klen = 32,
4567 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4568 "\x00\x00\x00\x00\x00\x00\x00\x00",
4569 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4570 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4571 "\x10\x11\x12\x13\x14\x15\x16\x17"
4572 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4573 "\x20\x21\x22\x23\x24\x25\x26\x27"
4574 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4575 "\x30\x31\x32\x33\x34\x35\x36\x37"
4576 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4577 "\x40\x41\x42\x43\x44\x45\x46\x47"
4578 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4579 "\x50\x51\x52\x53\x54\x55\x56\x57"
4580 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4581 "\x60\x61\x62\x63\x64\x65\x66\x67"
4582 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4583 "\x70\x71\x72\x73\x74\x75\x76\x77"
4584 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4585 "\x80\x81\x82\x83\x84\x85\x86\x87"
4586 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4587 "\x90\x91\x92\x93\x94\x95\x96\x97"
4588 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4589 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4590 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4591 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4592 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4593 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4594 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4595 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4596 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4597 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4598 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4599 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4600 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4601 "\x00\x01\x02\x03\x04\x05\x06\x07"
4602 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4603 "\x10\x11\x12\x13\x14\x15\x16\x17"
4604 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4605 "\x20\x21\x22\x23\x24\x25\x26\x27"
4606 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4607 "\x30\x31\x32\x33\x34\x35\x36\x37"
4608 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4609 "\x40\x41\x42\x43\x44\x45\x46\x47"
4610 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4611 "\x50\x51\x52\x53\x54\x55\x56\x57"
4612 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4613 "\x60\x61\x62\x63\x64\x65\x66\x67"
4614 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4615 "\x70\x71\x72\x73\x74\x75\x76\x77"
4616 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4617 "\x80\x81\x82\x83\x84\x85\x86\x87"
4618 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4619 "\x90\x91\x92\x93\x94\x95\x96\x97"
4620 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4621 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4622 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4623 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4624 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4625 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4626 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4627 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4628 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4629 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4630 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4631 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4632 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4633 .ilen = 512,
4634 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
4635 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
4636 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
4637 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
4638 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
4639 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
4640 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
4641 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
4642 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
4643 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
4644 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
4645 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
4646 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
4647 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
4648 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
4649 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
4650 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
4651 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
4652 "\x39\x80\x39\x09\x97\x65\xf2\x83"
4653 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
4654 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
4655 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
4656 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
4657 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
4658 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
4659 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
4660 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
4661 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
4662 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
4663 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
4664 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
4665 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
4666 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
4667 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
4668 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
4669 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
4670 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
4671 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
4672 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
4673 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
4674 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
4675 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
4676 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
4677 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
4678 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
4679 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
4680 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
4681 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
4682 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
4683 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
4684 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
4685 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
4686 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
4687 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
4688 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
4689 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
4690 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
4691 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
4692 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
4693 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
4694 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
4695 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
4696 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
4697 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
4698 .rlen = 512,
4699 }, {
4700 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4701 "\x23\x53\x60\x28\x74\x71\x35\x26"
4702 "\x62\x49\x77\x57\x24\x70\x93\x69"
4703 "\x99\x59\x57\x49\x66\x96\x76\x27"
4704 "\x31\x41\x59\x26\x53\x58\x97\x93"
4705 "\x23\x84\x62\x64\x33\x83\x27\x95"
4706 "\x02\x88\x41\x97\x16\x93\x99\x37"
4707 "\x51\x05\x82\x09\x74\x94\x45\x92",
4708 .klen = 64,
4709 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
4710 "\x00\x00\x00\x00\x00\x00\x00\x00",
4711 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4712 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4713 "\x10\x11\x12\x13\x14\x15\x16\x17"
4714 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4715 "\x20\x21\x22\x23\x24\x25\x26\x27"
4716 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4717 "\x30\x31\x32\x33\x34\x35\x36\x37"
4718 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4719 "\x40\x41\x42\x43\x44\x45\x46\x47"
4720 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4721 "\x50\x51\x52\x53\x54\x55\x56\x57"
4722 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4723 "\x60\x61\x62\x63\x64\x65\x66\x67"
4724 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4725 "\x70\x71\x72\x73\x74\x75\x76\x77"
4726 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4727 "\x80\x81\x82\x83\x84\x85\x86\x87"
4728 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4729 "\x90\x91\x92\x93\x94\x95\x96\x97"
4730 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4731 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4732 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4733 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4734 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4735 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4736 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4737 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4738 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4739 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4740 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4741 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4742 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4743 "\x00\x01\x02\x03\x04\x05\x06\x07"
4744 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4745 "\x10\x11\x12\x13\x14\x15\x16\x17"
4746 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4747 "\x20\x21\x22\x23\x24\x25\x26\x27"
4748 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4749 "\x30\x31\x32\x33\x34\x35\x36\x37"
4750 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4751 "\x40\x41\x42\x43\x44\x45\x46\x47"
4752 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4753 "\x50\x51\x52\x53\x54\x55\x56\x57"
4754 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4755 "\x60\x61\x62\x63\x64\x65\x66\x67"
4756 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4757 "\x70\x71\x72\x73\x74\x75\x76\x77"
4758 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4759 "\x80\x81\x82\x83\x84\x85\x86\x87"
4760 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4761 "\x90\x91\x92\x93\x94\x95\x96\x97"
4762 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4763 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4764 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4765 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4766 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4767 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4768 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4769 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4770 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4771 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4772 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4773 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4774 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4775 .ilen = 512,
4776 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
4777 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
4778 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
4779 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
4780 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
4781 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
4782 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
4783 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
4784 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
4785 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
4786 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
4787 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
4788 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
4789 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
4790 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
4791 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
4792 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
4793 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
4794 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
4795 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
4796 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
4797 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
4798 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
4799 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
4800 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
4801 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
4802 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
4803 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
4804 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
4805 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
4806 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
4807 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
4808 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
4809 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
4810 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
4811 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
4812 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
4813 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
4814 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
4815 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
4816 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
4817 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
4818 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
4819 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
4820 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
4821 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
4822 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
4823 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
4824 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
4825 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
4826 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
4827 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
4828 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
4829 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
4830 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
4831 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
4832 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
4833 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
4834 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
4835 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
4836 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
4837 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
4838 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
4839 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
4840 .rlen = 512,
f44d83d1
JK
4841 .also_non_np = 1,
4842 .np = 2,
4843 .tap = { 512 - 16, 16 },
aed265b9
JK
4844 },
4845};
4846
4847static struct cipher_testvec tf_xts_dec_tv_template[] = {
4848 /* Generated from AES-XTS test vectors */
4849 /* same as enc vectors with input and result reversed */
4850 {
4851 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
4852 "\x00\x00\x00\x00\x00\x00\x00\x00"
4853 "\x00\x00\x00\x00\x00\x00\x00\x00"
4854 "\x00\x00\x00\x00\x00\x00\x00\x00",
4855 .klen = 32,
4856 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4857 "\x00\x00\x00\x00\x00\x00\x00\x00",
4858 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
4859 "\x30\x74\xe4\x44\x52\x77\x97\x43"
4860 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
4861 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
4862 .ilen = 32,
4863 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
4864 "\x00\x00\x00\x00\x00\x00\x00\x00"
4865 "\x00\x00\x00\x00\x00\x00\x00\x00"
4866 "\x00\x00\x00\x00\x00\x00\x00\x00",
4867 .rlen = 32,
4868 }, {
4869 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
4870 "\x11\x11\x11\x11\x11\x11\x11\x11"
4871 "\x22\x22\x22\x22\x22\x22\x22\x22"
4872 "\x22\x22\x22\x22\x22\x22\x22\x22",
4873 .klen = 32,
4874 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4875 "\x00\x00\x00\x00\x00\x00\x00\x00",
4876 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
4877 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
4878 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
4879 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
4880 .ilen = 32,
4881 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
4882 "\x44\x44\x44\x44\x44\x44\x44\x44"
4883 "\x44\x44\x44\x44\x44\x44\x44\x44"
4884 "\x44\x44\x44\x44\x44\x44\x44\x44",
4885 .rlen = 32,
4886 }, {
4887 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
4888 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
4889 "\x22\x22\x22\x22\x22\x22\x22\x22"
4890 "\x22\x22\x22\x22\x22\x22\x22\x22",
4891 .klen = 32,
4892 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4893 "\x00\x00\x00\x00\x00\x00\x00\x00",
4894 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
4895 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
4896 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
4897 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
4898 .ilen = 32,
4899 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
4900 "\x44\x44\x44\x44\x44\x44\x44\x44"
4901 "\x44\x44\x44\x44\x44\x44\x44\x44"
4902 "\x44\x44\x44\x44\x44\x44\x44\x44",
4903 .rlen = 32,
4904 }, {
4905 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4906 "\x23\x53\x60\x28\x74\x71\x35\x26"
4907 "\x31\x41\x59\x26\x53\x58\x97\x93"
4908 "\x23\x84\x62\x64\x33\x83\x27\x95",
4909 .klen = 32,
4910 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4911 "\x00\x00\x00\x00\x00\x00\x00\x00",
4912 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
4913 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
4914 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
4915 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
4916 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
4917 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
4918 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
4919 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
4920 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
4921 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
4922 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
4923 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
4924 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
4925 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
4926 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
4927 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
4928 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
4929 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
4930 "\x39\x80\x39\x09\x97\x65\xf2\x83"
4931 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
4932 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
4933 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
4934 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
4935 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
4936 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
4937 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
4938 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
4939 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
4940 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
4941 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
4942 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
4943 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
4944 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
4945 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
4946 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
4947 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
4948 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
4949 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
4950 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
4951 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
4952 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
4953 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
4954 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
4955 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
4956 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
4957 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
4958 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
4959 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
4960 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
4961 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
4962 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
4963 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
4964 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
4965 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
4966 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
4967 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
4968 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
4969 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
4970 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
4971 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
4972 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
4973 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
4974 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
4975 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
4976 .ilen = 512,
4977 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4978 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4979 "\x10\x11\x12\x13\x14\x15\x16\x17"
4980 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4981 "\x20\x21\x22\x23\x24\x25\x26\x27"
4982 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4983 "\x30\x31\x32\x33\x34\x35\x36\x37"
4984 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4985 "\x40\x41\x42\x43\x44\x45\x46\x47"
4986 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4987 "\x50\x51\x52\x53\x54\x55\x56\x57"
4988 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4989 "\x60\x61\x62\x63\x64\x65\x66\x67"
4990 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4991 "\x70\x71\x72\x73\x74\x75\x76\x77"
4992 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4993 "\x80\x81\x82\x83\x84\x85\x86\x87"
4994 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4995 "\x90\x91\x92\x93\x94\x95\x96\x97"
4996 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4997 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4998 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4999 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5000 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5001 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5002 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5003 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5004 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5005 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5006 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5007 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5008 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5009 "\x00\x01\x02\x03\x04\x05\x06\x07"
5010 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5011 "\x10\x11\x12\x13\x14\x15\x16\x17"
5012 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5013 "\x20\x21\x22\x23\x24\x25\x26\x27"
5014 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5015 "\x30\x31\x32\x33\x34\x35\x36\x37"
5016 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5017 "\x40\x41\x42\x43\x44\x45\x46\x47"
5018 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5019 "\x50\x51\x52\x53\x54\x55\x56\x57"
5020 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5021 "\x60\x61\x62\x63\x64\x65\x66\x67"
5022 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5023 "\x70\x71\x72\x73\x74\x75\x76\x77"
5024 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5025 "\x80\x81\x82\x83\x84\x85\x86\x87"
5026 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5027 "\x90\x91\x92\x93\x94\x95\x96\x97"
5028 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5029 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5030 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5031 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5032 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5033 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5034 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5035 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5036 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5037 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5038 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5039 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5040 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5041 .rlen = 512,
5042 }, {
5043 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5044 "\x23\x53\x60\x28\x74\x71\x35\x26"
5045 "\x62\x49\x77\x57\x24\x70\x93\x69"
5046 "\x99\x59\x57\x49\x66\x96\x76\x27"
5047 "\x31\x41\x59\x26\x53\x58\x97\x93"
5048 "\x23\x84\x62\x64\x33\x83\x27\x95"
5049 "\x02\x88\x41\x97\x16\x93\x99\x37"
5050 "\x51\x05\x82\x09\x74\x94\x45\x92",
5051 .klen = 64,
5052 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
5053 "\x00\x00\x00\x00\x00\x00\x00\x00",
5054 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
5055 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
5056 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
5057 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
5058 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
5059 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
5060 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
5061 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
5062 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
5063 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
5064 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
5065 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
5066 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
5067 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
5068 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
5069 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
5070 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
5071 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
5072 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
5073 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
5074 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
5075 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
5076 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
5077 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
5078 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
5079 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
5080 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
5081 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
5082 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
5083 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
5084 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
5085 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
5086 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
5087 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
5088 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
5089 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
5090 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
5091 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
5092 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
5093 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
5094 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
5095 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
5096 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
5097 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
5098 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
5099 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
5100 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
5101 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
5102 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
5103 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
5104 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
5105 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
5106 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
5107 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
5108 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
5109 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
5110 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
5111 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
5112 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
5113 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
5114 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
5115 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
5116 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
5117 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
5118 .ilen = 512,
5119 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5120 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5121 "\x10\x11\x12\x13\x14\x15\x16\x17"
5122 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5123 "\x20\x21\x22\x23\x24\x25\x26\x27"
5124 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5125 "\x30\x31\x32\x33\x34\x35\x36\x37"
5126 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5127 "\x40\x41\x42\x43\x44\x45\x46\x47"
5128 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5129 "\x50\x51\x52\x53\x54\x55\x56\x57"
5130 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5131 "\x60\x61\x62\x63\x64\x65\x66\x67"
5132 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5133 "\x70\x71\x72\x73\x74\x75\x76\x77"
5134 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5135 "\x80\x81\x82\x83\x84\x85\x86\x87"
5136 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5137 "\x90\x91\x92\x93\x94\x95\x96\x97"
5138 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5139 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5140 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5141 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5142 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5143 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5144 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5145 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5146 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5147 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5148 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5149 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5150 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5151 "\x00\x01\x02\x03\x04\x05\x06\x07"
5152 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5153 "\x10\x11\x12\x13\x14\x15\x16\x17"
5154 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5155 "\x20\x21\x22\x23\x24\x25\x26\x27"
5156 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5157 "\x30\x31\x32\x33\x34\x35\x36\x37"
5158 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5159 "\x40\x41\x42\x43\x44\x45\x46\x47"
5160 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5161 "\x50\x51\x52\x53\x54\x55\x56\x57"
5162 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5163 "\x60\x61\x62\x63\x64\x65\x66\x67"
5164 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5165 "\x70\x71\x72\x73\x74\x75\x76\x77"
5166 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5167 "\x80\x81\x82\x83\x84\x85\x86\x87"
5168 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5169 "\x90\x91\x92\x93\x94\x95\x96\x97"
5170 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5171 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5172 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5173 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5174 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5175 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5176 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5177 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5178 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5179 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5180 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5181 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5182 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5183 .rlen = 512,
f44d83d1
JK
5184 .also_non_np = 1,
5185 .np = 2,
5186 .tap = { 512 - 16, 16 },
aed265b9
JK
5187 },
5188};
5189
da7f033d
HX
5190/*
5191 * Serpent test vectors. These are backwards because Serpent writes
5192 * octet sequences in right-to-left mode.
5193 */
9d25917d
JK
5194#define SERPENT_ENC_TEST_VECTORS 5
5195#define SERPENT_DEC_TEST_VECTORS 5
da7f033d
HX
5196
5197#define TNEPRES_ENC_TEST_VECTORS 4
5198#define TNEPRES_DEC_TEST_VECTORS 4
5199
9d25917d
JK
5200#define SERPENT_CBC_ENC_TEST_VECTORS 1
5201#define SERPENT_CBC_DEC_TEST_VECTORS 1
5202
5203#define SERPENT_CTR_ENC_TEST_VECTORS 2
5204#define SERPENT_CTR_DEC_TEST_VECTORS 2
5205
d7bfc0fa
JK
5206#define SERPENT_LRW_ENC_TEST_VECTORS 8
5207#define SERPENT_LRW_DEC_TEST_VECTORS 8
5208
18be20b9
JK
5209#define SERPENT_XTS_ENC_TEST_VECTORS 5
5210#define SERPENT_XTS_DEC_TEST_VECTORS 5
5211
da7f033d
HX
5212static struct cipher_testvec serpent_enc_tv_template[] = {
5213 {
5214 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5215 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5216 .ilen = 16,
5217 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5218 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5219 .rlen = 16,
5220 }, {
5221 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5222 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5223 .klen = 16,
5224 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5225 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5226 .ilen = 16,
5227 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5228 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5229 .rlen = 16,
5230 }, {
5231 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5232 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5233 "\x10\x11\x12\x13\x14\x15\x16\x17"
5234 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5235 .klen = 32,
5236 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5237 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5238 .ilen = 16,
5239 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5240 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5241 .rlen = 16,
5242 }, {
5243 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5244 .klen = 16,
5245 .input = zeroed_string,
5246 .ilen = 16,
5247 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5248 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5249 .rlen = 16,
9d25917d
JK
5250 }, { /* Generated with Crypto++ */
5251 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5252 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5253 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5254 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5255 .klen = 32,
5256 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5257 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5258 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5259 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5260 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5261 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5262 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5263 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5264 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5265 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5266 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5267 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5268 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5269 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5270 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5271 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5272 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5273 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5274 .ilen = 144,
5275 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5276 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5277 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5278 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5279 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5280 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5281 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5282 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5283 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5284 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5285 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5286 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5287 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5288 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5289 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5290 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5291 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5292 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5293 .rlen = 144,
f44d83d1
JK
5294 .also_non_np = 1,
5295 .np = 2,
5296 .tap = { 144 - 16, 16 },
da7f033d
HX
5297 },
5298};
5299
5300static struct cipher_testvec tnepres_enc_tv_template[] = {
5301 { /* KeySize=128, PT=0, I=1 */
5302 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5303 "\x00\x00\x00\x00\x00\x00\x00\x00",
5304 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5305 "\x00\x00\x00\x00\x00\x00\x00\x00",
5306 .klen = 16,
5307 .ilen = 16,
5308 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
5309 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
5310 .rlen = 16,
5311 }, { /* KeySize=192, PT=0, I=1 */
5312 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5313 "\x00\x00\x00\x00\x00\x00\x00\x00"
5314 "\x00\x00\x00\x00\x00\x00\x00\x00",
5315 .klen = 24,
5316 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5317 "\x00\x00\x00\x00\x00\x00\x00\x00",
5318 .ilen = 16,
5319 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
5320 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
5321 .rlen = 16,
5322 }, { /* KeySize=256, PT=0, I=1 */
5323 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5324 "\x00\x00\x00\x00\x00\x00\x00\x00"
5325 "\x00\x00\x00\x00\x00\x00\x00\x00"
5326 "\x00\x00\x00\x00\x00\x00\x00\x00",
5327 .klen = 32,
5328 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5329 "\x00\x00\x00\x00\x00\x00\x00\x00",
5330 .ilen = 16,
5331 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
5332 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
5333 .rlen = 16,
5334 }, { /* KeySize=256, I=257 */
5335 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
5336 "\x17\x16\x15\x14\x13\x12\x11\x10"
5337 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5338 "\x07\x06\x05\x04\x03\x02\x01\x00",
5339 .klen = 32,
5340 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5341 "\x07\x06\x05\x04\x03\x02\x01\x00",
5342 .ilen = 16,
5343 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
5344 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
5345 .rlen = 16,
5346 },
5347};
5348
5349
5350static struct cipher_testvec serpent_dec_tv_template[] = {
5351 {
5352 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5353 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5354 .ilen = 16,
5355 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5356 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5357 .rlen = 16,
5358 }, {
5359 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5360 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5361 .klen = 16,
5362 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5363 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5364 .ilen = 16,
5365 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5366 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5367 .rlen = 16,
5368 }, {
5369 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5370 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5371 "\x10\x11\x12\x13\x14\x15\x16\x17"
5372 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5373 .klen = 32,
5374 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5375 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5376 .ilen = 16,
5377 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5378 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5379 .rlen = 16,
5380 }, {
5381 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5382 .klen = 16,
5383 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5384 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5385 .ilen = 16,
5386 .result = zeroed_string,
5387 .rlen = 16,
9d25917d
JK
5388 }, { /* Generated with Crypto++ */
5389 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5390 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5391 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5392 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5393 .klen = 32,
5394 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5395 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5396 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5397 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5398 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5399 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5400 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5401 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5402 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5403 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5404 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5405 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5406 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5407 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5408 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5409 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5410 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5411 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5412 .ilen = 144,
5413 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5414 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5415 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5416 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5417 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5418 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5419 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5420 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5421 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5422 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5423 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5424 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5425 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5426 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5427 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5428 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5429 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5430 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5431 .rlen = 144,
f44d83d1
JK
5432 .also_non_np = 1,
5433 .np = 2,
5434 .tap = { 144 - 16, 16 },
da7f033d
HX
5435 },
5436};
5437
5438static struct cipher_testvec tnepres_dec_tv_template[] = {
5439 {
5440 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
5441 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
5442 .ilen = 16,
5443 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5444 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5445 .rlen = 16,
5446 }, {
5447 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5448 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5449 .klen = 16,
5450 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
5451 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
5452 .ilen = 16,
5453 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5454 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5455 .rlen = 16,
5456 }, {
5457 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5458 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5459 "\x10\x11\x12\x13\x14\x15\x16\x17"
5460 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5461 .klen = 32,
5462 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
5463 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
5464 .ilen = 16,
5465 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5466 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5467 .rlen = 16,
5468 }, { /* KeySize=128, I=121 */
5469 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5470 .klen = 16,
5471 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
5472 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
5473 .ilen = 16,
5474 .result = zeroed_string,
5475 .rlen = 16,
5476 },
5477};
5478
9d25917d
JK
5479static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
5480 { /* Generated with Crypto++ */
5481 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5482 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5483 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5484 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5485 .klen = 32,
5486 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5487 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5488 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5489 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5490 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5491 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5492 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5493 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5494 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5495 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5496 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5497 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5498 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5499 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5500 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5501 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5502 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5503 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5504 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5505 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5506 .ilen = 144,
5507 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
5508 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
5509 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
5510 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
5511 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
5512 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
5513 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
5514 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
5515 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
5516 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
5517 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
5518 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
5519 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
5520 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
5521 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
5522 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
5523 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
5524 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
5525 .rlen = 144,
f44d83d1
JK
5526 .also_non_np = 1,
5527 .np = 2,
5528 .tap = { 144 - 16, 16 },
9d25917d
JK
5529 },
5530};
5531
5532static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
5533 { /* Generated with Crypto++ */
5534 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5535 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5536 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5537 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5538 .klen = 32,
5539 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5540 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5541 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
5542 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
5543 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
5544 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
5545 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
5546 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
5547 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
5548 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
5549 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
5550 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
5551 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
5552 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
5553 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
5554 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
5555 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
5556 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
5557 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
5558 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
5559 .ilen = 144,
5560 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5561 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5562 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5563 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5564 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5565 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5566 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5567 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5568 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5569 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5570 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5571 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5572 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5573 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5574 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5575 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5576 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5577 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5578 .rlen = 144,
f44d83d1
JK
5579 .also_non_np = 1,
5580 .np = 2,
5581 .tap = { 144 - 16, 16 },
9d25917d
JK
5582 },
5583};
5584
5585static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
5586 { /* Generated with Crypto++ */
5587 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5588 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5589 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5590 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5591 .klen = 32,
5592 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5593 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5594 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5595 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5596 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5597 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5598 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5599 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5600 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5601 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5602 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5603 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5604 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5605 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5606 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5607 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5608 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5609 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5610 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5611 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5612 .ilen = 144,
5613 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
5614 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
5615 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
5616 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
5617 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
5618 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
5619 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
5620 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
5621 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
5622 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
5623 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
5624 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
5625 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
5626 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
5627 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
5628 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
5629 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
5630 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
5631 .rlen = 144,
5632 }, { /* Generated with Crypto++ */
5633 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5634 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5635 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5636 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5637 .klen = 32,
5638 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5639 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5640 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5641 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5642 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5643 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5644 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5645 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5646 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5647 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5648 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5649 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5650 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5651 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5652 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5653 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5654 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5655 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5656 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5657 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5658 "\xF1\x65\xFC",
5659 .ilen = 147,
5660 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
5661 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
5662 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
5663 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
5664 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
5665 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
5666 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
5667 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
5668 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
5669 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
5670 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
5671 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
5672 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
5673 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
5674 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
5675 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
5676 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
5677 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
5678 "\xE6\xD0\x97",
5679 .rlen = 147,
f44d83d1
JK
5680 .also_non_np = 1,
5681 .np = 2,
5682 .tap = { 147 - 16, 16 },
9d25917d
JK
5683 },
5684};
5685
5686static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
5687 { /* Generated with Crypto++ */
5688 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5689 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5690 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5691 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5692 .klen = 32,
5693 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5694 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5695 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
5696 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
5697 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
5698 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
5699 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
5700 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
5701 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
5702 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
5703 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
5704 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
5705 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
5706 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
5707 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
5708 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
5709 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
5710 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
5711 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
5712 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
5713 .ilen = 144,
5714 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5715 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5716 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5717 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5718 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5719 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5720 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5721 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5722 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5723 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5724 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5725 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5726 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5727 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5728 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5729 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5730 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5731 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5732 .rlen = 144,
5733 }, { /* Generated with Crypto++ */
5734 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5735 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5736 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5737 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5738 .klen = 32,
5739 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5740 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5741 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
5742 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
5743 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
5744 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
5745 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
5746 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
5747 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
5748 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
5749 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
5750 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
5751 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
5752 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
5753 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
5754 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
5755 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
5756 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
5757 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
5758 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
5759 "\xE6\xD0\x97",
5760 .ilen = 147,
5761 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5762 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5763 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5764 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5765 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5766 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5767 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5768 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5769 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5770 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5771 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5772 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5773 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5774 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5775 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5776 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5777 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5778 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5779 "\xF1\x65\xFC",
5780 .rlen = 147,
f44d83d1
JK
5781 .also_non_np = 1,
5782 .np = 2,
5783 .tap = { 147 - 16, 16 },
9d25917d
JK
5784 },
5785};
da7f033d 5786
d7bfc0fa
JK
5787static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
5788 /* Generated from AES-LRW test vectors */
5789 {
5790 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5791 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5792 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5793 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5794 .klen = 32,
5795 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5796 "\x00\x00\x00\x00\x00\x00\x00\x01",
5797 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5798 "\x38\x39\x41\x42\x43\x44\x45\x46",
5799 .ilen = 16,
5800 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
5801 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
5802 .rlen = 16,
5803 }, {
5804 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5805 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5806 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5807 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5808 .klen = 32,
5809 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5810 "\x00\x00\x00\x00\x00\x00\x00\x02",
5811 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5812 "\x38\x39\x41\x42\x43\x44\x45\x46",
5813 .ilen = 16,
5814 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
5815 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
5816 .rlen = 16,
5817 }, {
5818 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5819 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5820 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5821 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5822 .klen = 32,
5823 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5824 "\x00\x00\x00\x02\x00\x00\x00\x00",
5825 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5826 "\x38\x39\x41\x42\x43\x44\x45\x46",
5827 .ilen = 16,
5828 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
5829 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
5830 .rlen = 16,
5831 }, {
5832 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5833 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5834 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5835 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5836 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5837 .klen = 40,
5838 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5839 "\x00\x00\x00\x00\x00\x00\x00\x01",
5840 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5841 "\x38\x39\x41\x42\x43\x44\x45\x46",
5842 .ilen = 16,
5843 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
5844 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
5845 .rlen = 16,
5846 }, {
5847 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
5848 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
5849 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
5850 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
5851 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
5852 .klen = 40,
5853 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5854 "\x00\x00\x00\x02\x00\x00\x00\x00",
5855 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5856 "\x38\x39\x41\x42\x43\x44\x45\x46",
5857 .ilen = 16,
5858 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
5859 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
5860 .rlen = 16,
5861 }, {
5862 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5863 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5864 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5865 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5866 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5867 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5868 .klen = 48,
5869 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5870 "\x00\x00\x00\x00\x00\x00\x00\x01",
5871 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5872 "\x38\x39\x41\x42\x43\x44\x45\x46",
5873 .ilen = 16,
5874 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
5875 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
5876 .rlen = 16,
5877 }, {
5878 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
5879 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
5880 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
5881 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
5882 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
5883 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
5884 .klen = 48,
5885 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5886 "\x00\x00\x00\x02\x00\x00\x00\x00",
5887 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5888 "\x38\x39\x41\x42\x43\x44\x45\x46",
5889 .ilen = 16,
5890 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
5891 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
5892 .rlen = 16,
5893 }, {
5894 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5895 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5896 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5897 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5898 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5899 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5900 .klen = 48,
5901 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5902 "\x00\x00\x00\x00\x00\x00\x00\x01",
5903 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5904 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5905 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5906 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5907 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5908 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5909 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5910 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5911 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5912 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5913 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5914 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5915 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5916 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5917 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5918 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5919 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5920 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5921 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5922 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5923 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5924 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5925 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5926 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5927 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5928 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5929 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5930 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5931 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5932 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5933 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5934 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5935 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5936 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5937 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5938 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5939 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5940 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5941 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5942 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5943 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5944 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5945 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5946 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5947 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5948 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5949 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5950 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5951 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5952 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5953 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5954 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5955 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5956 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5957 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5958 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5959 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5960 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5961 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5962 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5963 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5964 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5965 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5966 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5967 .ilen = 512,
5968 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
5969 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
5970 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
5971 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
5972 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
5973 "\xce\xab\xda\x33\x30\x20\x12\xfa"
5974 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
5975 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
5976 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
5977 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
5978 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
5979 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
5980 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
5981 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
5982 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
5983 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
5984 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
5985 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
5986 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
5987 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
5988 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
5989 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
5990 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
5991 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
5992 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
5993 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
5994 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
5995 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
5996 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
5997 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
5998 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
5999 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
6000 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
6001 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
6002 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
6003 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
6004 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
6005 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
6006 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
6007 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
6008 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
6009 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
6010 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
6011 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
6012 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
6013 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
6014 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
6015 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
6016 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
6017 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
6018 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
6019 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
6020 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
6021 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
6022 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
6023 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
6024 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
6025 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
6026 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
6027 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
6028 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
6029 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
6030 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
6031 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
6032 .rlen = 512,
f44d83d1
JK
6033 .also_non_np = 1,
6034 .np = 2,
6035 .tap = { 512 - 16, 16 },
d7bfc0fa
JK
6036 },
6037};
6038
6039static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
6040 /* Generated from AES-LRW test vectors */
6041 /* same as enc vectors with input and result reversed */
6042 {
6043 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6044 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6045 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6046 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6047 .klen = 32,
6048 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6049 "\x00\x00\x00\x00\x00\x00\x00\x01",
6050 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
6051 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
6052 .ilen = 16,
6053 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6054 "\x38\x39\x41\x42\x43\x44\x45\x46",
6055 .rlen = 16,
6056 }, {
6057 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6058 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6059 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6060 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6061 .klen = 32,
6062 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6063 "\x00\x00\x00\x00\x00\x00\x00\x02",
6064 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
6065 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
6066 .ilen = 16,
6067 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6068 "\x38\x39\x41\x42\x43\x44\x45\x46",
6069 .rlen = 16,
6070 }, {
6071 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6072 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6073 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6074 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6075 .klen = 32,
6076 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6077 "\x00\x00\x00\x02\x00\x00\x00\x00",
6078 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
6079 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
6080 .ilen = 16,
6081 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6082 "\x38\x39\x41\x42\x43\x44\x45\x46",
6083 .rlen = 16,
6084 }, {
6085 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6086 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6087 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6088 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6089 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6090 .klen = 40,
6091 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6092 "\x00\x00\x00\x00\x00\x00\x00\x01",
6093 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
6094 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
6095 .ilen = 16,
6096 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6097 "\x38\x39\x41\x42\x43\x44\x45\x46",
6098 .rlen = 16,
6099 }, {
6100 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6101 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6102 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6103 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6104 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6105 .klen = 40,
6106 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6107 "\x00\x00\x00\x02\x00\x00\x00\x00",
6108 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
6109 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
6110 .ilen = 16,
6111 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6112 "\x38\x39\x41\x42\x43\x44\x45\x46",
6113 .rlen = 16,
6114 }, {
6115 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6116 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6117 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6118 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6119 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6120 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6121 .klen = 48,
6122 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6123 "\x00\x00\x00\x00\x00\x00\x00\x01",
6124 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
6125 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
6126 .ilen = 16,
6127 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6128 "\x38\x39\x41\x42\x43\x44\x45\x46",
6129 .rlen = 16,
6130 }, {
6131 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6132 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6133 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6134 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6135 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6136 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6137 .klen = 48,
6138 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6139 "\x00\x00\x00\x02\x00\x00\x00\x00",
6140 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
6141 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
6142 .ilen = 16,
6143 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6144 "\x38\x39\x41\x42\x43\x44\x45\x46",
6145 .rlen = 16,
6146 }, {
6147 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6148 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6149 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6150 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6151 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6152 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6153 .klen = 48,
6154 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6155 "\x00\x00\x00\x00\x00\x00\x00\x01",
6156 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
6157 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
6158 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
6159 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
6160 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
6161 "\xce\xab\xda\x33\x30\x20\x12\xfa"
6162 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
6163 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
6164 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
6165 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
6166 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
6167 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
6168 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
6169 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
6170 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
6171 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
6172 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
6173 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
6174 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
6175 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
6176 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
6177 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
6178 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
6179 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
6180 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
6181 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
6182 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
6183 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
6184 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
6185 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
6186 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
6187 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
6188 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
6189 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
6190 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
6191 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
6192 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
6193 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
6194 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
6195 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
6196 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
6197 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
6198 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
6199 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
6200 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
6201 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
6202 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
6203 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
6204 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
6205 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
6206 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
6207 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
6208 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
6209 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
6210 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
6211 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
6212 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
6213 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
6214 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
6215 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
6216 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
6217 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
6218 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
6219 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
6220 .ilen = 512,
6221 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6222 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6223 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6224 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6225 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6226 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6227 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6228 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6229 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6230 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6231 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6232 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6233 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6234 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6235 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6236 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6237 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6238 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6239 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6240 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6241 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6242 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6243 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6244 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6245 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6246 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6247 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6248 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6249 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6250 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6251 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6252 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6253 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6254 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6255 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6256 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6257 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6258 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6259 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6260 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6261 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6262 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6263 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6264 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6265 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6266 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6267 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6268 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6269 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6270 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6271 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6272 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6273 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6274 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6275 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6276 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6277 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6278 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6279 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6280 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6281 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6282 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6283 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6284 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6285 .rlen = 512,
f44d83d1
JK
6286 .also_non_np = 1,
6287 .np = 2,
6288 .tap = { 512 - 16, 16 },
d7bfc0fa
JK
6289 },
6290};
6291
18be20b9
JK
6292static struct cipher_testvec serpent_xts_enc_tv_template[] = {
6293 /* Generated from AES-XTS test vectors */
6294 {
6295 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6296 "\x00\x00\x00\x00\x00\x00\x00\x00"
6297 "\x00\x00\x00\x00\x00\x00\x00\x00"
6298 "\x00\x00\x00\x00\x00\x00\x00\x00",
6299 .klen = 32,
6300 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6301 "\x00\x00\x00\x00\x00\x00\x00\x00",
6302 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6303 "\x00\x00\x00\x00\x00\x00\x00\x00"
6304 "\x00\x00\x00\x00\x00\x00\x00\x00"
6305 "\x00\x00\x00\x00\x00\x00\x00\x00",
6306 .ilen = 32,
6307 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
6308 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
6309 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
6310 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
6311 .rlen = 32,
6312 }, {
6313 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6314 "\x11\x11\x11\x11\x11\x11\x11\x11"
6315 "\x22\x22\x22\x22\x22\x22\x22\x22"
6316 "\x22\x22\x22\x22\x22\x22\x22\x22",
6317 .klen = 32,
6318 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6319 "\x00\x00\x00\x00\x00\x00\x00\x00",
6320 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6321 "\x44\x44\x44\x44\x44\x44\x44\x44"
6322 "\x44\x44\x44\x44\x44\x44\x44\x44"
6323 "\x44\x44\x44\x44\x44\x44\x44\x44",
6324 .ilen = 32,
6325 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
6326 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
6327 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
6328 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
6329 .rlen = 32,
6330 }, {
6331 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6332 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6333 "\x22\x22\x22\x22\x22\x22\x22\x22"
6334 "\x22\x22\x22\x22\x22\x22\x22\x22",
6335 .klen = 32,
6336 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6337 "\x00\x00\x00\x00\x00\x00\x00\x00",
6338 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6339 "\x44\x44\x44\x44\x44\x44\x44\x44"
6340 "\x44\x44\x44\x44\x44\x44\x44\x44"
6341 "\x44\x44\x44\x44\x44\x44\x44\x44",
6342 .ilen = 32,
6343 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
6344 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
6345 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
6346 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
6347 .rlen = 32,
6348 }, {
6349 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6350 "\x23\x53\x60\x28\x74\x71\x35\x26"
6351 "\x31\x41\x59\x26\x53\x58\x97\x93"
6352 "\x23\x84\x62\x64\x33\x83\x27\x95",
6353 .klen = 32,
6354 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6355 "\x00\x00\x00\x00\x00\x00\x00\x00",
6356 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6357 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6358 "\x10\x11\x12\x13\x14\x15\x16\x17"
6359 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6360 "\x20\x21\x22\x23\x24\x25\x26\x27"
6361 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6362 "\x30\x31\x32\x33\x34\x35\x36\x37"
6363 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6364 "\x40\x41\x42\x43\x44\x45\x46\x47"
6365 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6366 "\x50\x51\x52\x53\x54\x55\x56\x57"
6367 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6368 "\x60\x61\x62\x63\x64\x65\x66\x67"
6369 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6370 "\x70\x71\x72\x73\x74\x75\x76\x77"
6371 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6372 "\x80\x81\x82\x83\x84\x85\x86\x87"
6373 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6374 "\x90\x91\x92\x93\x94\x95\x96\x97"
6375 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6376 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6377 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6378 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6379 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6380 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6381 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6382 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6383 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6384 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6385 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6386 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6387 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6388 "\x00\x01\x02\x03\x04\x05\x06\x07"
6389 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6390 "\x10\x11\x12\x13\x14\x15\x16\x17"
6391 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6392 "\x20\x21\x22\x23\x24\x25\x26\x27"
6393 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6394 "\x30\x31\x32\x33\x34\x35\x36\x37"
6395 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6396 "\x40\x41\x42\x43\x44\x45\x46\x47"
6397 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6398 "\x50\x51\x52\x53\x54\x55\x56\x57"
6399 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6400 "\x60\x61\x62\x63\x64\x65\x66\x67"
6401 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6402 "\x70\x71\x72\x73\x74\x75\x76\x77"
6403 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6404 "\x80\x81\x82\x83\x84\x85\x86\x87"
6405 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6406 "\x90\x91\x92\x93\x94\x95\x96\x97"
6407 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6408 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6409 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6410 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6411 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6412 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6413 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6414 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6415 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6416 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6417 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6418 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6419 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6420 .ilen = 512,
6421 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
6422 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
6423 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
6424 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
6425 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
6426 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
6427 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
6428 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
6429 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
6430 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
6431 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
6432 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
6433 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
6434 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
6435 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
6436 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
6437 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
6438 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
6439 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
6440 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
6441 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
6442 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
6443 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
6444 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
6445 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
6446 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
6447 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
6448 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
6449 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
6450 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
6451 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
6452 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
6453 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
6454 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
6455 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
6456 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
6457 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
6458 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
6459 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
6460 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
6461 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
6462 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
6463 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
6464 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
6465 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
6466 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
6467 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
6468 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
6469 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
6470 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
6471 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
6472 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
6473 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
6474 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
6475 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
6476 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
6477 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
6478 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
6479 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
6480 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
6481 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
6482 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
6483 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
6484 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
6485 .rlen = 512,
6486 }, {
6487 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6488 "\x23\x53\x60\x28\x74\x71\x35\x26"
6489 "\x62\x49\x77\x57\x24\x70\x93\x69"
6490 "\x99\x59\x57\x49\x66\x96\x76\x27"
6491 "\x31\x41\x59\x26\x53\x58\x97\x93"
6492 "\x23\x84\x62\x64\x33\x83\x27\x95"
6493 "\x02\x88\x41\x97\x16\x93\x99\x37"
6494 "\x51\x05\x82\x09\x74\x94\x45\x92",
6495 .klen = 64,
6496 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6497 "\x00\x00\x00\x00\x00\x00\x00\x00",
6498 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6499 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6500 "\x10\x11\x12\x13\x14\x15\x16\x17"
6501 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6502 "\x20\x21\x22\x23\x24\x25\x26\x27"
6503 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6504 "\x30\x31\x32\x33\x34\x35\x36\x37"
6505 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6506 "\x40\x41\x42\x43\x44\x45\x46\x47"
6507 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6508 "\x50\x51\x52\x53\x54\x55\x56\x57"
6509 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6510 "\x60\x61\x62\x63\x64\x65\x66\x67"
6511 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6512 "\x70\x71\x72\x73\x74\x75\x76\x77"
6513 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6514 "\x80\x81\x82\x83\x84\x85\x86\x87"
6515 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6516 "\x90\x91\x92\x93\x94\x95\x96\x97"
6517 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6518 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6519 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6520 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6521 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6522 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6523 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6524 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6525 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6526 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6527 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6528 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6529 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6530 "\x00\x01\x02\x03\x04\x05\x06\x07"
6531 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6532 "\x10\x11\x12\x13\x14\x15\x16\x17"
6533 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6534 "\x20\x21\x22\x23\x24\x25\x26\x27"
6535 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6536 "\x30\x31\x32\x33\x34\x35\x36\x37"
6537 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6538 "\x40\x41\x42\x43\x44\x45\x46\x47"
6539 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6540 "\x50\x51\x52\x53\x54\x55\x56\x57"
6541 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6542 "\x60\x61\x62\x63\x64\x65\x66\x67"
6543 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6544 "\x70\x71\x72\x73\x74\x75\x76\x77"
6545 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6546 "\x80\x81\x82\x83\x84\x85\x86\x87"
6547 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6548 "\x90\x91\x92\x93\x94\x95\x96\x97"
6549 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6550 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6551 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6552 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6553 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6554 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6555 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6556 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6557 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6558 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6559 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6560 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6561 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6562 .ilen = 512,
6563 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
6564 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
6565 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
6566 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
6567 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
6568 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
6569 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
6570 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
6571 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
6572 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
6573 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
6574 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
6575 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
6576 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
6577 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
6578 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
6579 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
6580 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
6581 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
6582 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
6583 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
6584 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
6585 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
6586 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
6587 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
6588 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
6589 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
6590 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
6591 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
6592 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
6593 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
6594 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
6595 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
6596 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
6597 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
6598 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
6599 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
6600 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
6601 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
6602 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
6603 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
6604 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
6605 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
6606 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
6607 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
6608 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
6609 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
6610 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
6611 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
6612 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
6613 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
6614 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
6615 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
6616 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
6617 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
6618 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
6619 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
6620 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
6621 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
6622 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
6623 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
6624 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
6625 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
6626 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
6627 .rlen = 512,
f44d83d1
JK
6628 .also_non_np = 1,
6629 .np = 2,
6630 .tap = { 512 - 16, 16 },
18be20b9
JK
6631 },
6632};
6633
6634static struct cipher_testvec serpent_xts_dec_tv_template[] = {
6635 /* Generated from AES-XTS test vectors */
6636 /* same as enc vectors with input and result reversed */
6637 {
6638 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6639 "\x00\x00\x00\x00\x00\x00\x00\x00"
6640 "\x00\x00\x00\x00\x00\x00\x00\x00"
6641 "\x00\x00\x00\x00\x00\x00\x00\x00",
6642 .klen = 32,
6643 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6644 "\x00\x00\x00\x00\x00\x00\x00\x00",
6645 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
6646 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
6647 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
6648 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
6649 .ilen = 32,
6650 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
6651 "\x00\x00\x00\x00\x00\x00\x00\x00"
6652 "\x00\x00\x00\x00\x00\x00\x00\x00"
6653 "\x00\x00\x00\x00\x00\x00\x00\x00",
6654 .rlen = 32,
6655 }, {
6656 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6657 "\x11\x11\x11\x11\x11\x11\x11\x11"
6658 "\x22\x22\x22\x22\x22\x22\x22\x22"
6659 "\x22\x22\x22\x22\x22\x22\x22\x22",
6660 .klen = 32,
6661 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6662 "\x00\x00\x00\x00\x00\x00\x00\x00",
6663 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
6664 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
6665 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
6666 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
6667 .ilen = 32,
6668 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6669 "\x44\x44\x44\x44\x44\x44\x44\x44"
6670 "\x44\x44\x44\x44\x44\x44\x44\x44"
6671 "\x44\x44\x44\x44\x44\x44\x44\x44",
6672 .rlen = 32,
6673 }, {
6674 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6675 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6676 "\x22\x22\x22\x22\x22\x22\x22\x22"
6677 "\x22\x22\x22\x22\x22\x22\x22\x22",
6678 .klen = 32,
6679 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6680 "\x00\x00\x00\x00\x00\x00\x00\x00",
6681 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
6682 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
6683 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
6684 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
6685 .ilen = 32,
6686 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6687 "\x44\x44\x44\x44\x44\x44\x44\x44"
6688 "\x44\x44\x44\x44\x44\x44\x44\x44"
6689 "\x44\x44\x44\x44\x44\x44\x44\x44",
6690 .rlen = 32,
6691 }, {
6692 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6693 "\x23\x53\x60\x28\x74\x71\x35\x26"
6694 "\x31\x41\x59\x26\x53\x58\x97\x93"
6695 "\x23\x84\x62\x64\x33\x83\x27\x95",
6696 .klen = 32,
6697 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6698 "\x00\x00\x00\x00\x00\x00\x00\x00",
6699 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
6700 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
6701 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
6702 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
6703 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
6704 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
6705 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
6706 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
6707 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
6708 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
6709 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
6710 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
6711 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
6712 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
6713 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
6714 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
6715 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
6716 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
6717 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
6718 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
6719 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
6720 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
6721 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
6722 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
6723 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
6724 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
6725 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
6726 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
6727 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
6728 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
6729 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
6730 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
6731 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
6732 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
6733 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
6734 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
6735 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
6736 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
6737 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
6738 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
6739 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
6740 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
6741 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
6742 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
6743 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
6744 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
6745 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
6746 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
6747 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
6748 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
6749 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
6750 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
6751 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
6752 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
6753 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
6754 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
6755 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
6756 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
6757 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
6758 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
6759 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
6760 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
6761 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
6762 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
6763 .ilen = 512,
6764 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6765 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6766 "\x10\x11\x12\x13\x14\x15\x16\x17"
6767 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6768 "\x20\x21\x22\x23\x24\x25\x26\x27"
6769 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6770 "\x30\x31\x32\x33\x34\x35\x36\x37"
6771 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6772 "\x40\x41\x42\x43\x44\x45\x46\x47"
6773 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6774 "\x50\x51\x52\x53\x54\x55\x56\x57"
6775 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6776 "\x60\x61\x62\x63\x64\x65\x66\x67"
6777 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6778 "\x70\x71\x72\x73\x74\x75\x76\x77"
6779 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6780 "\x80\x81\x82\x83\x84\x85\x86\x87"
6781 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6782 "\x90\x91\x92\x93\x94\x95\x96\x97"
6783 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6784 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6785 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6786 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6787 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6788 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6789 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6790 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6791 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6792 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6793 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6794 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6795 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6796 "\x00\x01\x02\x03\x04\x05\x06\x07"
6797 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6798 "\x10\x11\x12\x13\x14\x15\x16\x17"
6799 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6800 "\x20\x21\x22\x23\x24\x25\x26\x27"
6801 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6802 "\x30\x31\x32\x33\x34\x35\x36\x37"
6803 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6804 "\x40\x41\x42\x43\x44\x45\x46\x47"
6805 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6806 "\x50\x51\x52\x53\x54\x55\x56\x57"
6807 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6808 "\x60\x61\x62\x63\x64\x65\x66\x67"
6809 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6810 "\x70\x71\x72\x73\x74\x75\x76\x77"
6811 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6812 "\x80\x81\x82\x83\x84\x85\x86\x87"
6813 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6814 "\x90\x91\x92\x93\x94\x95\x96\x97"
6815 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6816 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6817 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6818 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6819 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6820 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6821 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6822 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6823 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6824 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6825 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6826 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6827 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6828 .rlen = 512,
6829 }, {
6830 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6831 "\x23\x53\x60\x28\x74\x71\x35\x26"
6832 "\x62\x49\x77\x57\x24\x70\x93\x69"
6833 "\x99\x59\x57\x49\x66\x96\x76\x27"
6834 "\x31\x41\x59\x26\x53\x58\x97\x93"
6835 "\x23\x84\x62\x64\x33\x83\x27\x95"
6836 "\x02\x88\x41\x97\x16\x93\x99\x37"
6837 "\x51\x05\x82\x09\x74\x94\x45\x92",
6838 .klen = 64,
6839 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6840 "\x00\x00\x00\x00\x00\x00\x00\x00",
6841 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
6842 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
6843 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
6844 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
6845 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
6846 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
6847 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
6848 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
6849 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
6850 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
6851 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
6852 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
6853 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
6854 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
6855 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
6856 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
6857 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
6858 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
6859 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
6860 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
6861 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
6862 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
6863 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
6864 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
6865 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
6866 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
6867 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
6868 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
6869 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
6870 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
6871 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
6872 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
6873 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
6874 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
6875 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
6876 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
6877 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
6878 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
6879 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
6880 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
6881 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
6882 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
6883 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
6884 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
6885 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
6886 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
6887 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
6888 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
6889 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
6890 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
6891 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
6892 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
6893 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
6894 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
6895 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
6896 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
6897 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
6898 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
6899 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
6900 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
6901 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
6902 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
6903 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
6904 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
6905 .ilen = 512,
6906 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6907 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6908 "\x10\x11\x12\x13\x14\x15\x16\x17"
6909 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6910 "\x20\x21\x22\x23\x24\x25\x26\x27"
6911 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6912 "\x30\x31\x32\x33\x34\x35\x36\x37"
6913 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6914 "\x40\x41\x42\x43\x44\x45\x46\x47"
6915 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6916 "\x50\x51\x52\x53\x54\x55\x56\x57"
6917 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6918 "\x60\x61\x62\x63\x64\x65\x66\x67"
6919 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6920 "\x70\x71\x72\x73\x74\x75\x76\x77"
6921 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6922 "\x80\x81\x82\x83\x84\x85\x86\x87"
6923 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6924 "\x90\x91\x92\x93\x94\x95\x96\x97"
6925 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6926 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6927 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6928 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6929 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6930 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6931 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6932 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6933 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6934 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6935 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6936 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6937 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6938 "\x00\x01\x02\x03\x04\x05\x06\x07"
6939 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6940 "\x10\x11\x12\x13\x14\x15\x16\x17"
6941 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6942 "\x20\x21\x22\x23\x24\x25\x26\x27"
6943 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6944 "\x30\x31\x32\x33\x34\x35\x36\x37"
6945 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6946 "\x40\x41\x42\x43\x44\x45\x46\x47"
6947 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6948 "\x50\x51\x52\x53\x54\x55\x56\x57"
6949 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6950 "\x60\x61\x62\x63\x64\x65\x66\x67"
6951 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6952 "\x70\x71\x72\x73\x74\x75\x76\x77"
6953 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6954 "\x80\x81\x82\x83\x84\x85\x86\x87"
6955 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6956 "\x90\x91\x92\x93\x94\x95\x96\x97"
6957 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6958 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6959 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6960 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6961 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6962 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6963 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6964 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6965 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6966 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6967 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6968 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6969 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6970 .rlen = 512,
f44d83d1
JK
6971 .also_non_np = 1,
6972 .np = 2,
6973 .tap = { 512 - 16, 16 },
18be20b9
JK
6974 },
6975};
6976
da7f033d 6977/* Cast6 test vectors from RFC 2612 */
9b8b0405
JG
6978#define CAST6_ENC_TEST_VECTORS 4
6979#define CAST6_DEC_TEST_VECTORS 4
6980#define CAST6_CBC_ENC_TEST_VECTORS 1
6981#define CAST6_CBC_DEC_TEST_VECTORS 1
9cac3a29
JK
6982#define CAST6_CTR_ENC_TEST_VECTORS 2
6983#define CAST6_CTR_DEC_TEST_VECTORS 2
9b8b0405
JG
6984#define CAST6_LRW_ENC_TEST_VECTORS 1
6985#define CAST6_LRW_DEC_TEST_VECTORS 1
6986#define CAST6_XTS_ENC_TEST_VECTORS 1
6987#define CAST6_XTS_DEC_TEST_VECTORS 1
da7f033d
HX
6988
6989static struct cipher_testvec cast6_enc_tv_template[] = {
6990 {
6991 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6992 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
6993 .klen = 16,
6994 .input = zeroed_string,
6995 .ilen = 16,
6996 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
6997 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
6998 .rlen = 16,
6999 }, {
7000 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7001 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7002 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
7003 .klen = 24,
7004 .input = zeroed_string,
7005 .ilen = 16,
7006 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
7007 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
7008 .rlen = 16,
7009 }, {
7010 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7011 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7012 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
7013 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
7014 .klen = 32,
7015 .input = zeroed_string,
7016 .ilen = 16,
7017 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
7018 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
7019 .rlen = 16,
9b8b0405
JG
7020 }, { /* Generated from TF test vectors */
7021 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7022 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7023 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7024 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7025 .klen = 32,
7026 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7027 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7028 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7029 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7030 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7031 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7032 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7033 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7034 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7035 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7036 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7037 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7038 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7039 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7040 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7041 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7042 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7043 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7044 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7045 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7046 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7047 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7048 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7049 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7050 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7051 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7052 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7053 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7054 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7055 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7056 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7057 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7058 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7059 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7060 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7061 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7062 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7063 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7064 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7065 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7066 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7067 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7068 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7069 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7070 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7071 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7072 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7073 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7074 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7075 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7076 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7077 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7078 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7079 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7080 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7081 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7082 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7083 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7084 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7085 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7086 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7087 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7088 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7089 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7090 .ilen = 496,
7091 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
7092 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
7093 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
7094 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
7095 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
7096 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
7097 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
7098 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
7099 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
7100 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
7101 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
7102 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
7103 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
7104 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
7105 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
7106 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
7107 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
7108 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
7109 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
7110 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
7111 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
7112 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
7113 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
7114 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
7115 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
7116 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
7117 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
7118 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
7119 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
7120 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
7121 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
7122 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
7123 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
7124 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
7125 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
7126 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
7127 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
7128 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
7129 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
7130 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
7131 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
7132 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
7133 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
7134 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
7135 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
7136 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
7137 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
7138 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
7139 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
7140 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
7141 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
7142 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
7143 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
7144 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
7145 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
7146 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
7147 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
7148 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
7149 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
7150 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
7151 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
7152 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
7153 .rlen = 496,
f44d83d1
JK
7154 .also_non_np = 1,
7155 .np = 2,
7156 .tap = { 496 - 16, 16 },
da7f033d
HX
7157 },
7158};
7159
7160static struct cipher_testvec cast6_dec_tv_template[] = {
7161 {
7162 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7163 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
7164 .klen = 16,
7165 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
7166 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
7167 .ilen = 16,
7168 .result = zeroed_string,
7169 .rlen = 16,
7170 }, {
7171 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7172 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7173 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
7174 .klen = 24,
7175 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
7176 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
7177 .ilen = 16,
7178 .result = zeroed_string,
7179 .rlen = 16,
7180 }, {
7181 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7182 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7183 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
7184 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
7185 .klen = 32,
7186 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
7187 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
7188 .ilen = 16,
7189 .result = zeroed_string,
7190 .rlen = 16,
9b8b0405
JG
7191 }, { /* Generated from TF test vectors */
7192 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7193 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7194 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7195 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7196 .klen = 32,
7197 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7198 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7199 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
7200 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
7201 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
7202 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
7203 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
7204 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
7205 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
7206 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
7207 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
7208 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
7209 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
7210 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
7211 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
7212 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
7213 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
7214 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
7215 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
7216 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
7217 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
7218 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
7219 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
7220 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
7221 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
7222 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
7223 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
7224 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
7225 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
7226 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
7227 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
7228 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
7229 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
7230 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
7231 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
7232 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
7233 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
7234 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
7235 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
7236 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
7237 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
7238 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
7239 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
7240 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
7241 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
7242 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
7243 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
7244 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
7245 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
7246 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
7247 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
7248 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
7249 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
7250 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
7251 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
7252 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
7253 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
7254 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
7255 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
7256 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
7257 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
7258 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
7259 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
7260 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
7261 .ilen = 496,
7262 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7263 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7264 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7265 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7266 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7267 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7268 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7269 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7270 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7271 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7272 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7273 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7274 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7275 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7276 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7277 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7278 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7279 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7280 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7281 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7282 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7283 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7284 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7285 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7286 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7287 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7288 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7289 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7290 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7291 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7292 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7293 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7294 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7295 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7296 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7297 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7298 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7299 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7300 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7301 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7302 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7303 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7304 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7305 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7306 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7307 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7308 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7309 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7310 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7311 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7312 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7313 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7314 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7315 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7316 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7317 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7318 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7319 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7320 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7321 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7322 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7323 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7324 .rlen = 496,
f44d83d1
JK
7325 .also_non_np = 1,
7326 .np = 2,
7327 .tap = { 496 - 16, 16 },
9b8b0405
JG
7328 },
7329};
7330
7331static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
7332 { /* Generated from TF test vectors */
7333 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7334 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7335 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7336 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7337 .klen = 32,
7338 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7339 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7340 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7341 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7342 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7343 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7344 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7345 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7346 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7347 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7348 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7349 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7350 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7351 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7352 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7353 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7354 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7355 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7356 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7357 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7358 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7359 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7360 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7361 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7362 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7363 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7364 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7365 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7366 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7367 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7368 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7369 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7370 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7371 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7372 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7373 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7374 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7375 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7376 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7377 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7378 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7379 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7380 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7381 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7382 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7383 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7384 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7385 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7386 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7387 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7388 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7389 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7390 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7391 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7392 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7393 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7394 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7395 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7396 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7397 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7398 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7399 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7400 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7401 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7402 .ilen = 496,
7403 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
7404 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
7405 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
7406 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
7407 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
7408 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
7409 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
7410 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
7411 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
7412 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
7413 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
7414 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
7415 "\x23\x16\x47\x72\x81\x13\x3A\x72"
7416 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
7417 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
7418 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
7419 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
7420 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
7421 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
7422 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
7423 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
7424 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
7425 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
7426 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
7427 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
7428 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
7429 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
7430 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
7431 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
7432 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
7433 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
7434 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
7435 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
7436 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
7437 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
7438 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
7439 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
7440 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
7441 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
7442 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
7443 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
7444 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
7445 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
7446 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
7447 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
7448 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
7449 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
7450 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
7451 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
7452 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
7453 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
7454 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
7455 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
7456 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
7457 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
7458 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
7459 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
7460 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
7461 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
7462 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
7463 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
7464 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
7465 .rlen = 496,
f44d83d1
JK
7466 .also_non_np = 1,
7467 .np = 2,
7468 .tap = { 496 - 16, 16 },
9b8b0405
JG
7469 },
7470};
7471
7472static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
7473 { /* Generated from TF test vectors */
7474 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7475 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7476 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7477 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7478 .klen = 32,
7479 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7480 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7481 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
7482 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
7483 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
7484 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
7485 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
7486 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
7487 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
7488 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
7489 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
7490 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
7491 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
7492 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
7493 "\x23\x16\x47\x72\x81\x13\x3A\x72"
7494 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
7495 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
7496 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
7497 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
7498 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
7499 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
7500 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
7501 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
7502 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
7503 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
7504 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
7505 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
7506 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
7507 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
7508 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
7509 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
7510 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
7511 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
7512 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
7513 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
7514 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
7515 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
7516 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
7517 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
7518 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
7519 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
7520 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
7521 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
7522 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
7523 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
7524 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
7525 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
7526 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
7527 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
7528 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
7529 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
7530 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
7531 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
7532 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
7533 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
7534 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
7535 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
7536 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
7537 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
7538 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
7539 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
7540 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
7541 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
7542 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
7543 .ilen = 496,
7544 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7545 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7546 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7547 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7548 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7549 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7550 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7551 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7552 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7553 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7554 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7555 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7556 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7557 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7558 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7559 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7560 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7561 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7562 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7563 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7564 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7565 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7566 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7567 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7568 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7569 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7570 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7571 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7572 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7573 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7574 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7575 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7576 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7577 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7578 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7579 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7580 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7581 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7582 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7583 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7584 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7585 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7586 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7587 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7588 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7589 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7590 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7591 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7592 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7593 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7594 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7595 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7596 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7597 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7598 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7599 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7600 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7601 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7602 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7603 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7604 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7605 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7606 .rlen = 496,
f44d83d1
JK
7607 .also_non_np = 1,
7608 .np = 2,
7609 .tap = { 496 - 16, 16 },
9b8b0405
JG
7610 },
7611};
7612
7613static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
7614 { /* Generated from TF test vectors */
9cac3a29
JK
7615 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7616 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7617 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7618 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7619 .klen = 32,
7620 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7621 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7622 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7623 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7624 "\x3A",
7625 .ilen = 17,
7626 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
7627 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
7628 "\x57",
7629 .rlen = 17,
7630 }, { /* Generated from TF test vectors */
9b8b0405
JG
7631 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7632 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7633 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7634 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7635 .klen = 32,
7636 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7637 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7638 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7639 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7640 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7641 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7642 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7643 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7644 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7645 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7646 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7647 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7648 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7649 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7650 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7651 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7652 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7653 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7654 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7655 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7656 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7657 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7658 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7659 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7660 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7661 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7662 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7663 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7664 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7665 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7666 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7667 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7668 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7669 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7670 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7671 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7672 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7673 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7674 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7675 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7676 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7677 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7678 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7679 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7680 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7681 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7682 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7683 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7684 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7685 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7686 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7687 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7688 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7689 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7690 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7691 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7692 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7693 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7694 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7695 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7696 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7697 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7698 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7699 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7700 .ilen = 496,
7701 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
7702 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
7703 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
7704 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
7705 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
7706 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
7707 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
7708 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
7709 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
7710 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
7711 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
7712 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
7713 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
7714 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
7715 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
7716 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
7717 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
7718 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
7719 "\x49\x61\x22\x52\x64\x8C\x46\x41"
7720 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
7721 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
7722 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
7723 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
7724 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
7725 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
7726 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
7727 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
7728 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
7729 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
7730 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
7731 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
7732 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
7733 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
7734 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
7735 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
7736 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
7737 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
7738 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
7739 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
7740 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
7741 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
7742 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
7743 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
7744 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
7745 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
7746 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
7747 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
7748 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
7749 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
7750 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
7751 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
7752 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
7753 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
7754 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
7755 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
7756 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
7757 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
7758 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
7759 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
7760 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
7761 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
7762 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
7763 .rlen = 496,
f44d83d1
JK
7764 .also_non_np = 1,
7765 .np = 2,
7766 .tap = { 496 - 16, 16 },
9b8b0405
JG
7767 },
7768};
7769
7770static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
7771 { /* Generated from TF test vectors */
9cac3a29
JK
7772 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7773 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7774 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7775 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7776 .klen = 32,
7777 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7778 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7779 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
7780 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
7781 "\x57",
7782 .ilen = 17,
7783 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7784 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7785 "\x3A",
7786 .rlen = 17,
7787 }, { /* Generated from TF test vectors */
9b8b0405
JG
7788 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7789 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7790 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7791 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7792 .klen = 32,
7793 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7794 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7795 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
7796 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
7797 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
7798 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
7799 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
7800 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
7801 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
7802 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
7803 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
7804 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
7805 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
7806 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
7807 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
7808 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
7809 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
7810 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
7811 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
7812 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
7813 "\x49\x61\x22\x52\x64\x8C\x46\x41"
7814 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
7815 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
7816 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
7817 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
7818 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
7819 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
7820 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
7821 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
7822 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
7823 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
7824 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
7825 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
7826 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
7827 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
7828 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
7829 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
7830 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
7831 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
7832 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
7833 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
7834 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
7835 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
7836 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
7837 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
7838 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
7839 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
7840 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
7841 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
7842 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
7843 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
7844 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
7845 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
7846 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
7847 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
7848 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
7849 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
7850 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
7851 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
7852 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
7853 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
7854 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
7855 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
7856 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
7857 .ilen = 496,
7858 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7859 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7860 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7861 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7862 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7863 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7864 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7865 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7866 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7867 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7868 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7869 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7870 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7871 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7872 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7873 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7874 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7875 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7876 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7877 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7878 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7879 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7880 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7881 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7882 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7883 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7884 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7885 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7886 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7887 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7888 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7889 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7890 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7891 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7892 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7893 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7894 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7895 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7896 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7897 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7898 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7899 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7900 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7901 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7902 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7903 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7904 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7905 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7906 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7907 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7908 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7909 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7910 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7911 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7912 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7913 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7914 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7915 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7916 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7917 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7918 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7919 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7920 .rlen = 496,
f44d83d1
JK
7921 .also_non_np = 1,
7922 .np = 2,
7923 .tap = { 496 - 16, 16 },
9b8b0405
JG
7924 },
7925};
7926
7927static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
7928 { /* Generated from TF test vectors */
7929 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7930 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7931 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7932 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7933 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7934 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7935 .klen = 48,
7936 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7937 "\x00\x00\x00\x00\x00\x00\x00\x01",
7938 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7939 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7940 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7941 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7942 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7943 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7944 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7945 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7946 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7947 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7948 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7949 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7950 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7951 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7952 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7953 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7954 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7955 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7956 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7957 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7958 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7959 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7960 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7961 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7962 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7963 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7964 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7965 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7966 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7967 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7968 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7969 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7970 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7971 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7972 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7973 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7974 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7975 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7976 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7977 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7978 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7979 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7980 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7981 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7982 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7983 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7984 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7985 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7986 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7987 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7988 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7989 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7990 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7991 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7992 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7993 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7994 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7995 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7996 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7997 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7998 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7999 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8000 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8001 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8002 .ilen = 512,
8003 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8004 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8005 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8006 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8007 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8008 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8009 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8010 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8011 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8012 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8013 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8014 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8015 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8016 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8017 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8018 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8019 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8020 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8021 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8022 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8023 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8024 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8025 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8026 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8027 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8028 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8029 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8030 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8031 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8032 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8033 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8034 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8035 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8036 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8037 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8038 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8039 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8040 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8041 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8042 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8043 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8044 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8045 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8046 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8047 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8048 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8049 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8050 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8051 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8052 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8053 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8054 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8055 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8056 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8057 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8058 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8059 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8060 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8061 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8062 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8063 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8064 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8065 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8066 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8067 .rlen = 512,
f44d83d1
JK
8068 .also_non_np = 1,
8069 .np = 2,
8070 .tap = { 512 - 16, 16 },
9b8b0405
JG
8071 },
8072};
8073
8074static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
8075 { /* Generated from TF test vectors */
8076 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8077 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8078 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8079 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8080 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8081 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8082 .klen = 48,
8083 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8084 "\x00\x00\x00\x00\x00\x00\x00\x01",
8085 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8086 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8087 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8088 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8089 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8090 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8091 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8092 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8093 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8094 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8095 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8096 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8097 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8098 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8099 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8100 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8101 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8102 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8103 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8104 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8105 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8106 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8107 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8108 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8109 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8110 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8111 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8112 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8113 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8114 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8115 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8116 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8117 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8118 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8119 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8120 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8121 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8122 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8123 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8124 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8125 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8126 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8127 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8128 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8129 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8130 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8131 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8132 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8133 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8134 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8135 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8136 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8137 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8138 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8139 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8140 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8141 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8142 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8143 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8144 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8145 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8146 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8147 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8148 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8149 .ilen = 512,
8150 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8151 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8152 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8153 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8154 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8155 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8156 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8157 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8158 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8159 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8160 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8161 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8162 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8163 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8164 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8165 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8166 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8167 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8168 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8169 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8170 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8171 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8172 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8173 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8174 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8175 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8176 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8177 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8178 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8179 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8180 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8181 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8182 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8183 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8184 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8185 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8186 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8187 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8188 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8189 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8190 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8191 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8192 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8193 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8194 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8195 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8196 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8197 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8198 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8199 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8200 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8201 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8202 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8203 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8204 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8205 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8206 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8207 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8208 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8209 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8210 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8211 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8212 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8213 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8214 .rlen = 512,
f44d83d1
JK
8215 .also_non_np = 1,
8216 .np = 2,
8217 .tap = { 512 - 16, 16 },
9b8b0405
JG
8218 },
8219};
8220
8221static struct cipher_testvec cast6_xts_enc_tv_template[] = {
8222 { /* Generated from TF test vectors */
8223 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8224 "\x23\x53\x60\x28\x74\x71\x35\x26"
8225 "\x62\x49\x77\x57\x24\x70\x93\x69"
8226 "\x99\x59\x57\x49\x66\x96\x76\x27"
8227 "\x31\x41\x59\x26\x53\x58\x97\x93"
8228 "\x23\x84\x62\x64\x33\x83\x27\x95"
8229 "\x02\x88\x41\x97\x16\x93\x99\x37"
8230 "\x51\x05\x82\x09\x74\x94\x45\x92",
8231 .klen = 64,
8232 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8233 "\x00\x00\x00\x00\x00\x00\x00\x00",
8234 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8235 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8236 "\x10\x11\x12\x13\x14\x15\x16\x17"
8237 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8238 "\x20\x21\x22\x23\x24\x25\x26\x27"
8239 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8240 "\x30\x31\x32\x33\x34\x35\x36\x37"
8241 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8242 "\x40\x41\x42\x43\x44\x45\x46\x47"
8243 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8244 "\x50\x51\x52\x53\x54\x55\x56\x57"
8245 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8246 "\x60\x61\x62\x63\x64\x65\x66\x67"
8247 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8248 "\x70\x71\x72\x73\x74\x75\x76\x77"
8249 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8250 "\x80\x81\x82\x83\x84\x85\x86\x87"
8251 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8252 "\x90\x91\x92\x93\x94\x95\x96\x97"
8253 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8254 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8255 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8256 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8257 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8258 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8259 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8260 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8261 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8262 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8263 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8264 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8265 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8266 "\x00\x01\x02\x03\x04\x05\x06\x07"
8267 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8268 "\x10\x11\x12\x13\x14\x15\x16\x17"
8269 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8270 "\x20\x21\x22\x23\x24\x25\x26\x27"
8271 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8272 "\x30\x31\x32\x33\x34\x35\x36\x37"
8273 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8274 "\x40\x41\x42\x43\x44\x45\x46\x47"
8275 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8276 "\x50\x51\x52\x53\x54\x55\x56\x57"
8277 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8278 "\x60\x61\x62\x63\x64\x65\x66\x67"
8279 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8280 "\x70\x71\x72\x73\x74\x75\x76\x77"
8281 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8282 "\x80\x81\x82\x83\x84\x85\x86\x87"
8283 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8284 "\x90\x91\x92\x93\x94\x95\x96\x97"
8285 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8286 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8287 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8288 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8289 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8290 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8291 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8292 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8293 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8294 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8295 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8296 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8297 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8298 .ilen = 512,
8299 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
8300 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
8301 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
8302 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
8303 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
8304 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
8305 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
8306 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
8307 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
8308 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
8309 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
8310 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
8311 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
8312 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
8313 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
8314 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
8315 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
8316 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
8317 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
8318 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
8319 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
8320 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
8321 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
8322 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
8323 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
8324 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
8325 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
8326 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
8327 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
8328 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
8329 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
8330 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
8331 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
8332 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
8333 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
8334 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
8335 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
8336 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
8337 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
8338 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
8339 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
8340 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
8341 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
8342 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
8343 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
8344 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
8345 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
8346 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
8347 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
8348 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
8349 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
8350 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
8351 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
8352 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
8353 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
8354 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
8355 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
8356 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
8357 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
8358 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
8359 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
8360 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
8361 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
8362 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
8363 .rlen = 512,
f44d83d1
JK
8364 .also_non_np = 1,
8365 .np = 2,
8366 .tap = { 512 - 16, 16 },
9b8b0405
JG
8367 },
8368};
8369
8370static struct cipher_testvec cast6_xts_dec_tv_template[] = {
8371 { /* Generated from TF test vectors */
8372 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8373 "\x23\x53\x60\x28\x74\x71\x35\x26"
8374 "\x62\x49\x77\x57\x24\x70\x93\x69"
8375 "\x99\x59\x57\x49\x66\x96\x76\x27"
8376 "\x31\x41\x59\x26\x53\x58\x97\x93"
8377 "\x23\x84\x62\x64\x33\x83\x27\x95"
8378 "\x02\x88\x41\x97\x16\x93\x99\x37"
8379 "\x51\x05\x82\x09\x74\x94\x45\x92",
8380 .klen = 64,
8381 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8382 "\x00\x00\x00\x00\x00\x00\x00\x00",
8383 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
8384 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
8385 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
8386 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
8387 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
8388 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
8389 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
8390 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
8391 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
8392 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
8393 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
8394 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
8395 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
8396 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
8397 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
8398 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
8399 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
8400 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
8401 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
8402 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
8403 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
8404 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
8405 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
8406 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
8407 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
8408 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
8409 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
8410 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
8411 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
8412 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
8413 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
8414 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
8415 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
8416 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
8417 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
8418 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
8419 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
8420 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
8421 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
8422 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
8423 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
8424 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
8425 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
8426 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
8427 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
8428 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
8429 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
8430 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
8431 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
8432 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
8433 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
8434 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
8435 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
8436 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
8437 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
8438 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
8439 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
8440 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
8441 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
8442 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
8443 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
8444 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
8445 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
8446 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
8447 .ilen = 512,
8448 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8449 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8450 "\x10\x11\x12\x13\x14\x15\x16\x17"
8451 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8452 "\x20\x21\x22\x23\x24\x25\x26\x27"
8453 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8454 "\x30\x31\x32\x33\x34\x35\x36\x37"
8455 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8456 "\x40\x41\x42\x43\x44\x45\x46\x47"
8457 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8458 "\x50\x51\x52\x53\x54\x55\x56\x57"
8459 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8460 "\x60\x61\x62\x63\x64\x65\x66\x67"
8461 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8462 "\x70\x71\x72\x73\x74\x75\x76\x77"
8463 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8464 "\x80\x81\x82\x83\x84\x85\x86\x87"
8465 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8466 "\x90\x91\x92\x93\x94\x95\x96\x97"
8467 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8468 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8469 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8470 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8471 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8472 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8473 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8474 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8475 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8476 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8477 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8478 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8479 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8480 "\x00\x01\x02\x03\x04\x05\x06\x07"
8481 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8482 "\x10\x11\x12\x13\x14\x15\x16\x17"
8483 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8484 "\x20\x21\x22\x23\x24\x25\x26\x27"
8485 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8486 "\x30\x31\x32\x33\x34\x35\x36\x37"
8487 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8488 "\x40\x41\x42\x43\x44\x45\x46\x47"
8489 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8490 "\x50\x51\x52\x53\x54\x55\x56\x57"
8491 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8492 "\x60\x61\x62\x63\x64\x65\x66\x67"
8493 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8494 "\x70\x71\x72\x73\x74\x75\x76\x77"
8495 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8496 "\x80\x81\x82\x83\x84\x85\x86\x87"
8497 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8498 "\x90\x91\x92\x93\x94\x95\x96\x97"
8499 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8500 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8501 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8502 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8503 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8504 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8505 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8506 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8507 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8508 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8509 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8510 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8511 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8512 .rlen = 512,
f44d83d1
JK
8513 .also_non_np = 1,
8514 .np = 2,
8515 .tap = { 512 - 16, 16 },
da7f033d
HX
8516 },
8517};
8518
8519
8520/*
8521 * AES test vectors.
8522 */
8523#define AES_ENC_TEST_VECTORS 3
8524#define AES_DEC_TEST_VECTORS 3
8525#define AES_CBC_ENC_TEST_VECTORS 4
8526#define AES_CBC_DEC_TEST_VECTORS 4
e46e9a46
HG
8527#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
8528#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
8529#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
da7f033d
HX
8530#define AES_LRW_ENC_TEST_VECTORS 8
8531#define AES_LRW_DEC_TEST_VECTORS 8
5165e5b1
JW
8532#define AES_XTS_ENC_TEST_VECTORS 5
8533#define AES_XTS_DEC_TEST_VECTORS 5
f7cb80f2
JW
8534#define AES_CTR_ENC_TEST_VECTORS 3
8535#define AES_CTR_DEC_TEST_VECTORS 3
ba0e14ac
PS
8536#define AES_OFB_ENC_TEST_VECTORS 1
8537#define AES_OFB_DEC_TEST_VECTORS 1
f7cb80f2
JW
8538#define AES_CTR_3686_ENC_TEST_VECTORS 7
8539#define AES_CTR_3686_DEC_TEST_VECTORS 6
da7f033d
HX
8540#define AES_GCM_ENC_TEST_VECTORS 9
8541#define AES_GCM_DEC_TEST_VECTORS 8
69435b94
AH
8542#define AES_GCM_4106_ENC_TEST_VECTORS 7
8543#define AES_GCM_4106_DEC_TEST_VECTORS 7
da7f033d
HX
8544#define AES_CCM_ENC_TEST_VECTORS 7
8545#define AES_CCM_DEC_TEST_VECTORS 7
5d667322
JW
8546#define AES_CCM_4309_ENC_TEST_VECTORS 7
8547#define AES_CCM_4309_DEC_TEST_VECTORS 10
da7f033d
HX
8548
8549static struct cipher_testvec aes_enc_tv_template[] = {
8550 { /* From FIPS-197 */
8551 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8552 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8553 .klen = 16,
8554 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
8555 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8556 .ilen = 16,
8557 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
8558 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
8559 .rlen = 16,
8560 }, {
8561 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8562 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8563 "\x10\x11\x12\x13\x14\x15\x16\x17",
8564 .klen = 24,
8565 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
8566 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8567 .ilen = 16,
8568 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
8569 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
8570 .rlen = 16,
8571 }, {
8572 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8573 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8574 "\x10\x11\x12\x13\x14\x15\x16\x17"
8575 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8576 .klen = 32,
8577 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
8578 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8579 .ilen = 16,
8580 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
8581 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
8582 .rlen = 16,
8583 },
8584};
8585
8586static struct cipher_testvec aes_dec_tv_template[] = {
8587 { /* From FIPS-197 */
8588 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8589 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8590 .klen = 16,
8591 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
8592 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
8593 .ilen = 16,
8594 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
8595 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8596 .rlen = 16,
8597 }, {
8598 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8599 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8600 "\x10\x11\x12\x13\x14\x15\x16\x17",
8601 .klen = 24,
8602 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
8603 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
8604 .ilen = 16,
8605 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
8606 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8607 .rlen = 16,
8608 }, {
8609 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8610 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8611 "\x10\x11\x12\x13\x14\x15\x16\x17"
8612 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8613 .klen = 32,
8614 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
8615 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
8616 .ilen = 16,
8617 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
8618 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
8619 .rlen = 16,
8620 },
8621};
8622
8623static struct cipher_testvec aes_cbc_enc_tv_template[] = {
8624 { /* From RFC 3602 */
8625 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
8626 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
8627 .klen = 16,
8628 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
8629 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
8630 .input = "Single block msg",
8631 .ilen = 16,
8632 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
8633 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
8634 .rlen = 16,
8635 }, {
8636 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
8637 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
8638 .klen = 16,
8639 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
8640 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
8641 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8642 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8643 "\x10\x11\x12\x13\x14\x15\x16\x17"
8644 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8645 .ilen = 32,
8646 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
8647 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
8648 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
8649 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
8650 .rlen = 32,
8651 }, { /* From NIST SP800-38A */
8652 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
8653 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
8654 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
8655 .klen = 24,
8656 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
8657 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8658 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8659 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8660 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8661 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8662 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8663 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8664 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8665 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8666 .ilen = 64,
8667 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
8668 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
8669 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
8670 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
8671 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
8672 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
8673 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
8674 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
8675 .rlen = 64,
8676 }, {
8677 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
8678 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
8679 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
8680 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
8681 .klen = 32,
8682 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
8683 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8684 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8685 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8686 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8687 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8688 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8689 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8690 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8691 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8692 .ilen = 64,
8693 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
8694 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
8695 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
8696 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
8697 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
8698 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
8699 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
8700 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
8701 .rlen = 64,
8702 },
8703};
8704
8705static struct cipher_testvec aes_cbc_dec_tv_template[] = {
8706 { /* From RFC 3602 */
8707 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
8708 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
8709 .klen = 16,
8710 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
8711 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
8712 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
8713 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
8714 .ilen = 16,
8715 .result = "Single block msg",
8716 .rlen = 16,
8717 }, {
8718 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
8719 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
8720 .klen = 16,
8721 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
8722 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
8723 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
8724 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
8725 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
8726 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
8727 .ilen = 32,
8728 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8729 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8730 "\x10\x11\x12\x13\x14\x15\x16\x17"
8731 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8732 .rlen = 32,
8733 }, { /* From NIST SP800-38A */
8734 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
8735 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
8736 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
8737 .klen = 24,
8738 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
8739 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8740 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
8741 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
8742 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
8743 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
8744 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
8745 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
8746 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
8747 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
8748 .ilen = 64,
8749 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8750 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8751 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8752 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8753 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8754 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8755 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8756 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8757 .rlen = 64,
8758 }, {
8759 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
8760 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
8761 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
8762 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
8763 .klen = 32,
8764 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
8765 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8766 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
8767 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
8768 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
8769 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
8770 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
8771 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
8772 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
8773 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
8774 .ilen = 64,
8775 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8776 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8777 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8778 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8779 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8780 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8781 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8782 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8783 .rlen = 64,
8784 },
8785};
8786
e46e9a46
HG
8787static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
8788 { /* RFC 3602 Case 1 */
8789#ifdef __LITTLE_ENDIAN
8790 .key = "\x08\x00" /* rta length */
8791 "\x01\x00" /* rta type */
8792#else
8793 .key = "\x00\x08" /* rta length */
8794 "\x00\x01" /* rta type */
8795#endif
8796 "\x00\x00\x00\x10" /* enc key length */
8797 "\x00\x00\x00\x00\x00\x00\x00\x00"
8798 "\x00\x00\x00\x00\x00\x00\x00\x00"
8799 "\x00\x00\x00\x00"
8800 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
8801 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
8802 .klen = 8 + 20 + 16,
8803 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
8804 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
8805 .input = "Single block msg",
8806 .ilen = 16,
8807 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
8808 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
8809 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
8810 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
8811 "\x03\x71\xa2\x06",
8812 .rlen = 16 + 20,
8813 }, { /* RFC 3602 Case 2 */
8814#ifdef __LITTLE_ENDIAN
8815 .key = "\x08\x00" /* rta length */
8816 "\x01\x00" /* rta type */
8817#else
8818 .key = "\x00\x08" /* rta length */
8819 "\x00\x01" /* rta type */
8820#endif
8821 "\x00\x00\x00\x10" /* enc key length */
8822 "\x20\x21\x22\x23\x24\x25\x26\x27"
8823 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8824 "\x30\x31\x32\x33"
8825 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
8826 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
8827 .klen = 8 + 20 + 16,
8828 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
8829 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
8830 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8831 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8832 "\x10\x11\x12\x13\x14\x15\x16\x17"
8833 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8834 .ilen = 32,
8835 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
8836 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
8837 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
8838 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
8839 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
8840 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
8841 "\x65\x39\xf8\xde",
8842 .rlen = 32 + 20,
8843 }, { /* RFC 3602 Case 3 */
8844#ifdef __LITTLE_ENDIAN
8845 .key = "\x08\x00" /* rta length */
8846 "\x01\x00" /* rta type */
8847#else
8848 .key = "\x00\x08" /* rta length */
8849 "\x00\x01" /* rta type */
8850#endif
8851 "\x00\x00\x00\x10" /* enc key length */
8852 "\x11\x22\x33\x44\x55\x66\x77\x88"
8853 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
8854 "\x22\x33\x44\x55"
8855 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
8856 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
8857 .klen = 8 + 20 + 16,
8858 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
8859 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
8860 .input = "This is a 48-byte message (exactly 3 AES blocks)",
8861 .ilen = 48,
8862 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
8863 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
8864 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
8865 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
8866 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
8867 "\x85\x79\x69\x5d\x83\xba\x26\x84"
8868 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
8869 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
8870 "\x8d\x62\xf2\x1e",
8871 .rlen = 48 + 20,
8872 }, { /* RFC 3602 Case 4 */
8873#ifdef __LITTLE_ENDIAN
8874 .key = "\x08\x00" /* rta length */
8875 "\x01\x00" /* rta type */
8876#else
8877 .key = "\x00\x08" /* rta length */
8878 "\x00\x01" /* rta type */
8879#endif
8880 "\x00\x00\x00\x10" /* enc key length */
8881 "\x11\x22\x33\x44\x55\x66\x77\x88"
8882 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
8883 "\x22\x33\x44\x55"
8884 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
8885 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
8886 .klen = 8 + 20 + 16,
8887 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
8888 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
8889 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8890 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8891 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8892 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8893 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8894 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8895 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8896 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
8897 .ilen = 64,
8898 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
8899 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
8900 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
8901 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
8902 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
8903 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
8904 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
8905 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
8906 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
8907 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
8908 "\x1d\xbe\xc6\xe9",
8909 .rlen = 64 + 20,
8910 }, { /* RFC 3602 Case 5 */
8911#ifdef __LITTLE_ENDIAN
8912 .key = "\x08\x00" /* rta length */
8913 "\x01\x00" /* rta type */
8914#else
8915 .key = "\x00\x08" /* rta length */
8916 "\x00\x01" /* rta type */
8917#endif
8918 "\x00\x00\x00\x10" /* enc key length */
8919 "\x11\x22\x33\x44\x55\x66\x77\x88"
8920 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
8921 "\x22\x33\x44\x55"
8922 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
8923 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
8924 .klen = 8 + 20 + 16,
8925 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
8926 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
8927 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
8928 .alen = 8,
8929 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
8930 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
8931 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8932 "\x10\x11\x12\x13\x14\x15\x16\x17"
8933 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8934 "\x20\x21\x22\x23\x24\x25\x26\x27"
8935 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8936 "\x30\x31\x32\x33\x34\x35\x36\x37"
8937 "\x01\x02\x03\x04\x05\x06\x07\x08"
8938 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
8939 .ilen = 80,
8940 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
8941 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
8942 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
8943 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
8944 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
8945 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
8946 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
8947 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
8948 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
8949 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
8950 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
8951 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
8952 "\x85\xe1\x59\xf7",
8953 .rlen = 80 + 20,
8954 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
8955#ifdef __LITTLE_ENDIAN
8956 .key = "\x08\x00" /* rta length */
8957 "\x01\x00" /* rta type */
8958#else
8959 .key = "\x00\x08" /* rta length */
8960 "\x00\x01" /* rta type */
8961#endif
8962 "\x00\x00\x00\x18" /* enc key length */
8963 "\x11\x22\x33\x44\x55\x66\x77\x88"
8964 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
8965 "\x22\x33\x44\x55"
8966 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
8967 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
8968 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
8969 .klen = 8 + 20 + 24,
8970 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
8971 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8972 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8973 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8974 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8975 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8976 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8977 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8978 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8979 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8980 .ilen = 64,
8981 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
8982 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
8983 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
8984 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
8985 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
8986 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
8987 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
8988 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
8989 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
8990 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
8991 "\x47\x4c\xfc\x36",
8992 .rlen = 64 + 20,
8993 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
8994#ifdef __LITTLE_ENDIAN
8995 .key = "\x08\x00" /* rta length */
8996 "\x01\x00" /* rta type */
8997#else
8998 .key = "\x00\x08" /* rta length */
8999 "\x00\x01" /* rta type */
9000#endif
9001 "\x00\x00\x00\x20" /* enc key length */
9002 "\x11\x22\x33\x44\x55\x66\x77\x88"
9003 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9004 "\x22\x33\x44\x55"
9005 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9006 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9007 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9008 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9009 .klen = 8 + 20 + 32,
9010 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9011 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9012 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9013 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9014 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9015 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9016 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9017 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9018 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9019 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9020 .ilen = 64,
9021 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9022 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9023 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9024 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9025 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9026 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9027 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9028 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
9029 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
9030 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
9031 "\x51\xee\xd6\x4e",
9032 .rlen = 64 + 20,
9033 },
9034};
9035
9036static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
9037 { /* RFC 3602 Case 1 */
9038#ifdef __LITTLE_ENDIAN
9039 .key = "\x08\x00" /* rta length */
9040 "\x01\x00" /* rta type */
9041#else
9042 .key = "\x00\x08" /* rta length */
9043 "\x00\x01" /* rta type */
9044#endif
9045 "\x00\x00\x00\x10" /* enc key length */
9046 "\x00\x00\x00\x00\x00\x00\x00\x00"
9047 "\x00\x00\x00\x00\x00\x00\x00\x00"
9048 "\x00\x00\x00\x00\x00\x00\x00\x00"
9049 "\x00\x00\x00\x00\x00\x00\x00\x00"
9050 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9051 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9052 .klen = 8 + 32 + 16,
9053 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9054 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9055 .input = "Single block msg",
9056 .ilen = 16,
9057 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9058 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9059 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
9060 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
9061 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
9062 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
9063 .rlen = 16 + 32,
9064 }, { /* RFC 3602 Case 2 */
9065#ifdef __LITTLE_ENDIAN
9066 .key = "\x08\x00" /* rta length */
9067 "\x01\x00" /* rta type */
9068#else
9069 .key = "\x00\x08" /* rta length */
9070 "\x00\x01" /* rta type */
9071#endif
9072 "\x00\x00\x00\x10" /* enc key length */
9073 "\x20\x21\x22\x23\x24\x25\x26\x27"
9074 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9075 "\x30\x31\x32\x33\x34\x35\x36\x37"
9076 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9077 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9078 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9079 .klen = 8 + 32 + 16,
9080 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9081 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9082 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9083 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9084 "\x10\x11\x12\x13\x14\x15\x16\x17"
9085 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9086 .ilen = 32,
9087 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9088 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9089 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9090 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9091 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
9092 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
9093 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
9094 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
9095 .rlen = 32 + 32,
9096 }, { /* RFC 3602 Case 3 */
9097#ifdef __LITTLE_ENDIAN
9098 .key = "\x08\x00" /* rta length */
9099 "\x01\x00" /* rta type */
9100#else
9101 .key = "\x00\x08" /* rta length */
9102 "\x00\x01" /* rta type */
9103#endif
9104 "\x00\x00\x00\x10" /* enc key length */
9105 "\x11\x22\x33\x44\x55\x66\x77\x88"
9106 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9107 "\x22\x33\x44\x55\x66\x77\x88\x99"
9108 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9109 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9110 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9111 .klen = 8 + 32 + 16,
9112 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9113 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9114 .input = "This is a 48-byte message (exactly 3 AES blocks)",
9115 .ilen = 48,
9116 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9117 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9118 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9119 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9120 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9121 "\x85\x79\x69\x5d\x83\xba\x26\x84"
9122 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
9123 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
9124 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
9125 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
9126 .rlen = 48 + 32,
9127 }, { /* RFC 3602 Case 4 */
9128#ifdef __LITTLE_ENDIAN
9129 .key = "\x08\x00" /* rta length */
9130 "\x01\x00" /* rta type */
9131#else
9132 .key = "\x00\x08" /* rta length */
9133 "\x00\x01" /* rta type */
9134#endif
9135 "\x00\x00\x00\x10" /* enc key length */
9136 "\x11\x22\x33\x44\x55\x66\x77\x88"
9137 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9138 "\x22\x33\x44\x55\x66\x77\x88\x99"
9139 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9140 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9141 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9142 .klen = 8 + 32 + 16,
9143 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9144 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9145 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9146 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9147 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9148 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9149 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9150 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9151 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9152 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9153 .ilen = 64,
9154 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9155 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9156 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9157 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9158 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9159 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9160 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9161 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9162 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
9163 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
9164 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
9165 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
9166 .rlen = 64 + 32,
9167 }, { /* RFC 3602 Case 5 */
9168#ifdef __LITTLE_ENDIAN
9169 .key = "\x08\x00" /* rta length */
9170 "\x01\x00" /* rta type */
9171#else
9172 .key = "\x00\x08" /* rta length */
9173 "\x00\x01" /* rta type */
9174#endif
9175 "\x00\x00\x00\x10" /* enc key length */
9176 "\x11\x22\x33\x44\x55\x66\x77\x88"
9177 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9178 "\x22\x33\x44\x55\x66\x77\x88\x99"
9179 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9180 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
9181 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
9182 .klen = 8 + 32 + 16,
9183 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
9184 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
9185 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
9186 .alen = 8,
9187 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
9188 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
9189 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9190 "\x10\x11\x12\x13\x14\x15\x16\x17"
9191 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9192 "\x20\x21\x22\x23\x24\x25\x26\x27"
9193 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9194 "\x30\x31\x32\x33\x34\x35\x36\x37"
9195 "\x01\x02\x03\x04\x05\x06\x07\x08"
9196 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
9197 .ilen = 80,
9198 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
9199 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
9200 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
9201 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
9202 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
9203 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
9204 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
9205 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
9206 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
9207 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
9208 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
9209 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
9210 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
9211 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
9212 .rlen = 80 + 32,
9213 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
9214#ifdef __LITTLE_ENDIAN
9215 .key = "\x08\x00" /* rta length */
9216 "\x01\x00" /* rta type */
9217#else
9218 .key = "\x00\x08" /* rta length */
9219 "\x00\x01" /* rta type */
9220#endif
9221 "\x00\x00\x00\x18" /* enc key length */
9222 "\x11\x22\x33\x44\x55\x66\x77\x88"
9223 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9224 "\x22\x33\x44\x55\x66\x77\x88\x99"
9225 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9226 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9227 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9228 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9229 .klen = 8 + 32 + 24,
9230 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9231 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9232 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9233 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9234 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9235 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9236 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9237 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9238 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9239 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9240 .ilen = 64,
9241 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9242 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9243 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9244 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9245 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9246 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9247 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9248 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
9249 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
9250 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
9251 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
9252 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
9253 .rlen = 64 + 32,
9254 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
9255#ifdef __LITTLE_ENDIAN
9256 .key = "\x08\x00" /* rta length */
9257 "\x01\x00" /* rta type */
9258#else
9259 .key = "\x00\x08" /* rta length */
9260 "\x00\x01" /* rta type */
9261#endif
9262 "\x00\x00\x00\x20" /* enc key length */
9263 "\x11\x22\x33\x44\x55\x66\x77\x88"
9264 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9265 "\x22\x33\x44\x55\x66\x77\x88\x99"
9266 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9267 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9268 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9269 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9270 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9271 .klen = 8 + 32 + 32,
9272 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9273 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9274 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9275 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9276 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9277 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9278 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9279 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9280 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9281 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9282 .ilen = 64,
9283 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9284 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9285 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9286 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9287 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9288 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9289 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9290 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
9291 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
9292 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
9293 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
9294 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
9295 .rlen = 64 + 32,
9296 },
9297};
9298
9299static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
9300 { /* RFC 3602 Case 1 */
9301#ifdef __LITTLE_ENDIAN
9302 .key = "\x08\x00" /* rta length */
9303 "\x01\x00" /* rta type */
9304#else
9305 .key = "\x00\x08" /* rta length */
9306 "\x00\x01" /* rta type */
9307#endif
9308 "\x00\x00\x00\x10" /* enc key length */
9309 "\x00\x00\x00\x00\x00\x00\x00\x00"
9310 "\x00\x00\x00\x00\x00\x00\x00\x00"
9311 "\x00\x00\x00\x00\x00\x00\x00\x00"
9312 "\x00\x00\x00\x00\x00\x00\x00\x00"
9313 "\x00\x00\x00\x00\x00\x00\x00\x00"
9314 "\x00\x00\x00\x00\x00\x00\x00\x00"
9315 "\x00\x00\x00\x00\x00\x00\x00\x00"
9316 "\x00\x00\x00\x00\x00\x00\x00\x00"
9317 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9318 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9319 .klen = 8 + 64 + 16,
9320 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9321 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9322 .input = "Single block msg",
9323 .ilen = 16,
9324 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9325 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9326 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
9327 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
9328 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
9329 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
9330 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
9331 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
9332 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
9333 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
9334 .rlen = 16 + 64,
9335 }, { /* RFC 3602 Case 2 */
9336#ifdef __LITTLE_ENDIAN
9337 .key = "\x08\x00" /* rta length */
9338 "\x01\x00" /* rta type */
9339#else
9340 .key = "\x00\x08" /* rta length */
9341 "\x00\x01" /* rta type */
9342#endif
9343 "\x00\x00\x00\x10" /* enc key length */
9344 "\x20\x21\x22\x23\x24\x25\x26\x27"
9345 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9346 "\x30\x31\x32\x33\x34\x35\x36\x37"
9347 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9348 "\x40\x41\x42\x43\x44\x45\x46\x47"
9349 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9350 "\x50\x51\x52\x53\x54\x55\x56\x57"
9351 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9352 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9353 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9354 .klen = 8 + 64 + 16,
9355 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9356 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9357 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9358 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9359 "\x10\x11\x12\x13\x14\x15\x16\x17"
9360 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9361 .ilen = 32,
9362 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9363 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9364 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9365 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9366 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
9367 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
9368 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
9369 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
9370 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
9371 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
9372 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
9373 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
9374 .rlen = 32 + 64,
9375 }, { /* RFC 3602 Case 3 */
9376#ifdef __LITTLE_ENDIAN
9377 .key = "\x08\x00" /* rta length */
9378 "\x01\x00" /* rta type */
9379#else
9380 .key = "\x00\x08" /* rta length */
9381 "\x00\x01" /* rta type */
9382#endif
9383 "\x00\x00\x00\x10" /* enc key length */
9384 "\x11\x22\x33\x44\x55\x66\x77\x88"
9385 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9386 "\x22\x33\x44\x55\x66\x77\x88\x99"
9387 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9388 "\x33\x44\x55\x66\x77\x88\x99\xaa"
9389 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
9390 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
9391 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
9392 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9393 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9394 .klen = 8 + 64 + 16,
9395 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9396 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9397 .input = "This is a 48-byte message (exactly 3 AES blocks)",
9398 .ilen = 48,
9399 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9400 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9401 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9402 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9403 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9404 "\x85\x79\x69\x5d\x83\xba\x26\x84"
9405 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
9406 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
9407 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
9408 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
9409 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
9410 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
9411 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
9412 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
9413 .rlen = 48 + 64,
9414 }, { /* RFC 3602 Case 4 */
9415#ifdef __LITTLE_ENDIAN
9416 .key = "\x08\x00" /* rta length */
9417 "\x01\x00" /* rta type */
9418#else
9419 .key = "\x00\x08" /* rta length */
9420 "\x00\x01" /* rta type */
9421#endif
9422 "\x00\x00\x00\x10" /* enc key length */
9423 "\x11\x22\x33\x44\x55\x66\x77\x88"
9424 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9425 "\x22\x33\x44\x55\x66\x77\x88\x99"
9426 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9427 "\x33\x44\x55\x66\x77\x88\x99\xaa"
9428 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
9429 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
9430 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
9431 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9432 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9433 .klen = 8 + 64 + 16,
9434 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9435 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9436 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9437 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9438 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9439 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9440 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9441 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9442 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9443 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9444 .ilen = 64,
9445 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9446 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9447 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9448 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9449 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9450 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9451 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9452 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9453 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
9454 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
9455 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
9456 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
9457 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
9458 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
9459 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
9460 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
9461 .rlen = 64 + 64,
9462 }, { /* RFC 3602 Case 5 */
9463#ifdef __LITTLE_ENDIAN
9464 .key = "\x08\x00" /* rta length */
9465 "\x01\x00" /* rta type */
9466#else
9467 .key = "\x00\x08" /* rta length */
9468 "\x00\x01" /* rta type */
9469#endif
9470 "\x00\x00\x00\x10" /* enc key length */
9471 "\x11\x22\x33\x44\x55\x66\x77\x88"
9472 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9473 "\x22\x33\x44\x55\x66\x77\x88\x99"
9474 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9475 "\x33\x44\x55\x66\x77\x88\x99\xaa"
9476 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
9477 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
9478 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
9479 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
9480 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
9481 .klen = 8 + 64 + 16,
9482 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
9483 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
9484 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
9485 .alen = 8,
9486 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
9487 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
9488 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9489 "\x10\x11\x12\x13\x14\x15\x16\x17"
9490 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9491 "\x20\x21\x22\x23\x24\x25\x26\x27"
9492 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9493 "\x30\x31\x32\x33\x34\x35\x36\x37"
9494 "\x01\x02\x03\x04\x05\x06\x07\x08"
9495 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
9496 .ilen = 80,
9497 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
9498 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
9499 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
9500 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
9501 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
9502 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
9503 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
9504 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
9505 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
9506 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
9507 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
9508 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
9509 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
9510 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
9511 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
9512 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
9513 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
9514 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
9515 .rlen = 80 + 64,
9516 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
9517#ifdef __LITTLE_ENDIAN
9518 .key = "\x08\x00" /* rta length */
9519 "\x01\x00" /* rta type */
9520#else
9521 .key = "\x00\x08" /* rta length */
9522 "\x00\x01" /* rta type */
9523#endif
9524 "\x00\x00\x00\x18" /* enc key length */
9525 "\x11\x22\x33\x44\x55\x66\x77\x88"
9526 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9527 "\x22\x33\x44\x55\x66\x77\x88\x99"
9528 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9529 "\x33\x44\x55\x66\x77\x88\x99\xaa"
9530 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
9531 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
9532 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
9533 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9534 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9535 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9536 .klen = 8 + 64 + 24,
9537 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9538 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9539 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9540 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9541 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9542 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9543 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9544 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9545 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9546 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9547 .ilen = 64,
9548 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9549 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9550 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9551 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9552 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9553 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9554 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9555 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
9556 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
9557 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
9558 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
9559 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
9560 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
9561 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
9562 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
9563 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
9564 .rlen = 64 + 64,
9565 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
9566#ifdef __LITTLE_ENDIAN
9567 .key = "\x08\x00" /* rta length */
9568 "\x01\x00" /* rta type */
9569#else
9570 .key = "\x00\x08" /* rta length */
9571 "\x00\x01" /* rta type */
9572#endif
9573 "\x00\x00\x00\x20" /* enc key length */
9574 "\x11\x22\x33\x44\x55\x66\x77\x88"
9575 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9576 "\x22\x33\x44\x55\x66\x77\x88\x99"
9577 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9578 "\x33\x44\x55\x66\x77\x88\x99\xaa"
9579 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
9580 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
9581 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
9582 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9583 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9584 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9585 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9586 .klen = 8 + 64 + 32,
9587 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9588 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9589 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9590 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9591 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9592 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9593 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9594 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9595 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9596 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9597 .ilen = 64,
9598 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9599 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9600 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9601 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9602 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9603 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9604 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9605 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
9606 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
9607 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
9608 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
9609 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
9610 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
9611 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
9612 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
9613 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
9614 .rlen = 64 + 64,
9615 },
9616};
9617
da7f033d
HX
9618static struct cipher_testvec aes_lrw_enc_tv_template[] = {
9619 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
9620 { /* LRW-32-AES 1 */
9621 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9622 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9623 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9624 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9625 .klen = 32,
9626 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9627 "\x00\x00\x00\x00\x00\x00\x00\x01",
9628 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9629 "\x38\x39\x41\x42\x43\x44\x45\x46",
9630 .ilen = 16,
9631 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
9632 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
9633 .rlen = 16,
9634 }, { /* LRW-32-AES 2 */
9635 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9636 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9637 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9638 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9639 .klen = 32,
9640 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9641 "\x00\x00\x00\x00\x00\x00\x00\x02",
9642 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9643 "\x38\x39\x41\x42\x43\x44\x45\x46",
9644 .ilen = 16,
9645 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
9646 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
9647 .rlen = 16,
9648 }, { /* LRW-32-AES 3 */
9649 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9650 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9651 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9652 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9653 .klen = 32,
9654 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9655 "\x00\x00\x00\x02\x00\x00\x00\x00",
9656 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9657 "\x38\x39\x41\x42\x43\x44\x45\x46",
9658 .ilen = 16,
9659 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
9660 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
9661 .rlen = 16,
9662 }, { /* LRW-32-AES 4 */
9663 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9664 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9665 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9666 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9667 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9668 .klen = 40,
9669 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9670 "\x00\x00\x00\x00\x00\x00\x00\x01",
9671 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9672 "\x38\x39\x41\x42\x43\x44\x45\x46",
9673 .ilen = 16,
9674 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
9675 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
9676 .rlen = 16,
9677 }, { /* LRW-32-AES 5 */
9678 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9679 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9680 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9681 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9682 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9683 .klen = 40,
9684 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9685 "\x00\x00\x00\x02\x00\x00\x00\x00",
9686 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9687 "\x38\x39\x41\x42\x43\x44\x45\x46",
9688 .ilen = 16,
9689 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
9690 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
9691 .rlen = 16,
9692 }, { /* LRW-32-AES 6 */
9693 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9694 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9695 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9696 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9697 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9698 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9699 .klen = 48,
9700 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9701 "\x00\x00\x00\x00\x00\x00\x00\x01",
9702 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9703 "\x38\x39\x41\x42\x43\x44\x45\x46",
9704 .ilen = 16,
9705 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
9706 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
9707 .rlen = 16,
9708 }, { /* LRW-32-AES 7 */
9709 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
9710 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
9711 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
9712 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
9713 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
9714 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
9715 .klen = 48,
9716 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9717 "\x00\x00\x00\x02\x00\x00\x00\x00",
9718 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9719 "\x38\x39\x41\x42\x43\x44\x45\x46",
9720 .ilen = 16,
9721 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
9722 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
9723 .rlen = 16,
9724 }, {
9725/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
9726 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9727 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9728 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9729 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9730 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9731 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9732 .klen = 48,
9733 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9734 "\x00\x00\x00\x00\x00\x00\x00\x01",
9735 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9736 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9737 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9738 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9739 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9740 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9741 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9742 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9743 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9744 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9745 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9746 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9747 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9748 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9749 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9750 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9751 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9752 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9753 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9754 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9755 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9756 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9757 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9758 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9759 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9760 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9761 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9762 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9763 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9764 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9765 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9766 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9767 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9768 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9769 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9770 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9771 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9772 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9773 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9774 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9775 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9776 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9777 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9778 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9779 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9780 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9781 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9782 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9783 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9784 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9785 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9786 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9787 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9788 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9789 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9790 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9791 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9792 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9793 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9794 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9795 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9796 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9797 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9798 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9799 .ilen = 512,
9800 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
9801 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
9802 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
9803 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
9804 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
9805 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
9806 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
9807 "\xe8\x58\x46\x97\x39\x51\x07\xde"
9808 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
9809 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
9810 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
9811 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
9812 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
9813 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
9814 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
9815 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
9816 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
9817 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
9818 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
9819 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
9820 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
9821 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
9822 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
9823 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
9824 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
9825 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
9826 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
9827 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
9828 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
9829 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
9830 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
9831 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
9832 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
9833 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
9834 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
9835 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
9836 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
9837 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
9838 "\xb8\x79\x78\x97\x94\xff\x72\x13"
9839 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
9840 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
9841 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
9842 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
9843 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
9844 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
9845 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
9846 "\x1e\x86\x53\x11\x53\x94\x00\xee"
9847 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
9848 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
9849 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
9850 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
9851 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
9852 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
9853 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
9854 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
9855 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
9856 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
9857 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
9858 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
9859 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
9860 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
9861 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
9862 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
9863 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
9864 .rlen = 512,
f44d83d1
JK
9865 .also_non_np = 1,
9866 .np = 2,
9867 .tap = { 512 - 16, 16 },
da7f033d
HX
9868 }
9869};
9870
9871static struct cipher_testvec aes_lrw_dec_tv_template[] = {
9872 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
9873 /* same as enc vectors with input and result reversed */
9874 { /* LRW-32-AES 1 */
9875 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9876 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9877 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9878 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9879 .klen = 32,
9880 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9881 "\x00\x00\x00\x00\x00\x00\x00\x01",
9882 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
9883 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
9884 .ilen = 16,
9885 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9886 "\x38\x39\x41\x42\x43\x44\x45\x46",
9887 .rlen = 16,
9888 }, { /* LRW-32-AES 2 */
9889 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9890 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9891 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9892 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9893 .klen = 32,
9894 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9895 "\x00\x00\x00\x00\x00\x00\x00\x02",
9896 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
9897 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
9898 .ilen = 16,
9899 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9900 "\x38\x39\x41\x42\x43\x44\x45\x46",
9901 .rlen = 16,
9902 }, { /* LRW-32-AES 3 */
9903 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9904 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9905 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9906 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9907 .klen = 32,
9908 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9909 "\x00\x00\x00\x02\x00\x00\x00\x00",
9910 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
9911 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
9912 .ilen = 16,
9913 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9914 "\x38\x39\x41\x42\x43\x44\x45\x46",
9915 .rlen = 16,
9916 }, { /* LRW-32-AES 4 */
9917 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9918 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9919 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9920 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9921 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9922 .klen = 40,
9923 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9924 "\x00\x00\x00\x00\x00\x00\x00\x01",
9925 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
9926 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
9927 .ilen = 16,
9928 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9929 "\x38\x39\x41\x42\x43\x44\x45\x46",
9930 .rlen = 16,
9931 }, { /* LRW-32-AES 5 */
9932 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9933 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9934 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9935 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9936 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9937 .klen = 40,
9938 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9939 "\x00\x00\x00\x02\x00\x00\x00\x00",
9940 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
9941 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
9942 .ilen = 16,
9943 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9944 "\x38\x39\x41\x42\x43\x44\x45\x46",
9945 .rlen = 16,
9946 }, { /* LRW-32-AES 6 */
9947 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9948 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9949 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9950 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9951 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9952 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9953 .klen = 48,
9954 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9955 "\x00\x00\x00\x00\x00\x00\x00\x01",
9956 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
9957 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
9958 .ilen = 16,
9959 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9960 "\x38\x39\x41\x42\x43\x44\x45\x46",
9961 .rlen = 16,
9962 }, { /* LRW-32-AES 7 */
9963 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
9964 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
9965 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
9966 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
9967 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
9968 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
9969 .klen = 48,
9970 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9971 "\x00\x00\x00\x02\x00\x00\x00\x00",
9972 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
9973 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
9974 .ilen = 16,
9975 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
9976 "\x38\x39\x41\x42\x43\x44\x45\x46",
9977 .rlen = 16,
9978 }, {
9979/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
9980 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9981 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9982 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9983 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9984 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9985 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9986 .klen = 48,
9987 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9988 "\x00\x00\x00\x00\x00\x00\x00\x01",
9989 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
9990 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
9991 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
9992 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
9993 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
9994 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
9995 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
9996 "\xe8\x58\x46\x97\x39\x51\x07\xde"
9997 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
9998 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
9999 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
10000 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
10001 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
10002 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
10003 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
10004 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
10005 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
10006 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
10007 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
10008 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
10009 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
10010 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
10011 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
10012 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
10013 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
10014 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
10015 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
10016 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
10017 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
10018 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
10019 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
10020 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
10021 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
10022 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
10023 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
10024 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
10025 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
10026 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
10027 "\xb8\x79\x78\x97\x94\xff\x72\x13"
10028 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
10029 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
10030 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
10031 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
10032 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
10033 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
10034 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
10035 "\x1e\x86\x53\x11\x53\x94\x00\xee"
10036 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
10037 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
10038 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
10039 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
10040 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
10041 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
10042 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
10043 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
10044 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
10045 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
10046 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
10047 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
10048 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
10049 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
10050 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
10051 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
10052 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
10053 .ilen = 512,
10054 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10055 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10056 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10057 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10058 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10059 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10060 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10061 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10062 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10063 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10064 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10065 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10066 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10067 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10068 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10069 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10070 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10071 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10072 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10073 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10074 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10075 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10076 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10077 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10078 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10079 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10080 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10081 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10082 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10083 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10084 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10085 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10086 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10087 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10088 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10089 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10090 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10091 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10092 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10093 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10094 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10095 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10096 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10097 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10098 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10099 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10100 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10101 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10102 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10103 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10104 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10105 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10106 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10107 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10108 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10109 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10110 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10111 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10112 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10113 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10114 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10115 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10116 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10117 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10118 .rlen = 512,
f44d83d1
JK
10119 .also_non_np = 1,
10120 .np = 2,
10121 .tap = { 512 - 16, 16 },
da7f033d
HX
10122 }
10123};
10124
10125static struct cipher_testvec aes_xts_enc_tv_template[] = {
10126 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
10127 { /* XTS-AES 1 */
10128 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10129 "\x00\x00\x00\x00\x00\x00\x00\x00"
10130 "\x00\x00\x00\x00\x00\x00\x00\x00"
10131 "\x00\x00\x00\x00\x00\x00\x00\x00",
10132 .klen = 32,
10133 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10134 "\x00\x00\x00\x00\x00\x00\x00\x00",
10135 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10136 "\x00\x00\x00\x00\x00\x00\x00\x00"
10137 "\x00\x00\x00\x00\x00\x00\x00\x00"
10138 "\x00\x00\x00\x00\x00\x00\x00\x00",
10139 .ilen = 32,
10140 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
10141 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
10142 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
10143 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
10144 .rlen = 32,
10145 }, { /* XTS-AES 2 */
10146 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10147 "\x11\x11\x11\x11\x11\x11\x11\x11"
10148 "\x22\x22\x22\x22\x22\x22\x22\x22"
10149 "\x22\x22\x22\x22\x22\x22\x22\x22",
10150 .klen = 32,
10151 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10152 "\x00\x00\x00\x00\x00\x00\x00\x00",
10153 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10154 "\x44\x44\x44\x44\x44\x44\x44\x44"
10155 "\x44\x44\x44\x44\x44\x44\x44\x44"
10156 "\x44\x44\x44\x44\x44\x44\x44\x44",
10157 .ilen = 32,
10158 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
10159 "\x39\x33\x40\x38\xac\xef\x83\x8b"
10160 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
10161 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
10162 .rlen = 32,
10163 }, { /* XTS-AES 3 */
10164 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10165 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10166 "\x22\x22\x22\x22\x22\x22\x22\x22"
10167 "\x22\x22\x22\x22\x22\x22\x22\x22",
10168 .klen = 32,
10169 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10170 "\x00\x00\x00\x00\x00\x00\x00\x00",
10171 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10172 "\x44\x44\x44\x44\x44\x44\x44\x44"
10173 "\x44\x44\x44\x44\x44\x44\x44\x44"
10174 "\x44\x44\x44\x44\x44\x44\x44\x44",
10175 .ilen = 32,
10176 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
10177 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
10178 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
10179 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
10180 .rlen = 32,
10181 }, { /* XTS-AES 4 */
10182 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10183 "\x23\x53\x60\x28\x74\x71\x35\x26"
10184 "\x31\x41\x59\x26\x53\x58\x97\x93"
10185 "\x23\x84\x62\x64\x33\x83\x27\x95",
10186 .klen = 32,
10187 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10188 "\x00\x00\x00\x00\x00\x00\x00\x00",
10189 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10190 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10191 "\x10\x11\x12\x13\x14\x15\x16\x17"
10192 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10193 "\x20\x21\x22\x23\x24\x25\x26\x27"
10194 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10195 "\x30\x31\x32\x33\x34\x35\x36\x37"
10196 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10197 "\x40\x41\x42\x43\x44\x45\x46\x47"
10198 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10199 "\x50\x51\x52\x53\x54\x55\x56\x57"
10200 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10201 "\x60\x61\x62\x63\x64\x65\x66\x67"
10202 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10203 "\x70\x71\x72\x73\x74\x75\x76\x77"
10204 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10205 "\x80\x81\x82\x83\x84\x85\x86\x87"
10206 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10207 "\x90\x91\x92\x93\x94\x95\x96\x97"
10208 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10209 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10210 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10211 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10212 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10213 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10214 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10215 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10216 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10217 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10218 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10219 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10220 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10221 "\x00\x01\x02\x03\x04\x05\x06\x07"
10222 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10223 "\x10\x11\x12\x13\x14\x15\x16\x17"
10224 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10225 "\x20\x21\x22\x23\x24\x25\x26\x27"
10226 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10227 "\x30\x31\x32\x33\x34\x35\x36\x37"
10228 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10229 "\x40\x41\x42\x43\x44\x45\x46\x47"
10230 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10231 "\x50\x51\x52\x53\x54\x55\x56\x57"
10232 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10233 "\x60\x61\x62\x63\x64\x65\x66\x67"
10234 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10235 "\x70\x71\x72\x73\x74\x75\x76\x77"
10236 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10237 "\x80\x81\x82\x83\x84\x85\x86\x87"
10238 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10239 "\x90\x91\x92\x93\x94\x95\x96\x97"
10240 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10241 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10242 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10243 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10244 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10245 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10246 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10247 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10248 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10249 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10250 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10251 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10252 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10253 .ilen = 512,
10254 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
10255 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
10256 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
10257 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
10258 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
10259 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
10260 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
10261 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
10262 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
10263 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
10264 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
10265 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
10266 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
10267 "\x22\x97\x61\x46\xae\x20\xce\x84"
10268 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
10269 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
10270 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
10271 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
10272 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
10273 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
10274 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
10275 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
10276 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
10277 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
10278 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
10279 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
10280 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
10281 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
10282 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
10283 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
10284 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
10285 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
10286 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
10287 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
10288 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
10289 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
10290 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
10291 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
10292 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
10293 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
10294 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
10295 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
10296 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
10297 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
10298 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
10299 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
10300 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
10301 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
10302 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
10303 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
10304 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
10305 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
10306 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
10307 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
10308 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
10309 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
10310 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
10311 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
10312 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
10313 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
10314 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
10315 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
10316 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
10317 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
10318 .rlen = 512,
5165e5b1
JW
10319 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
10320 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10321 "\x23\x53\x60\x28\x74\x71\x35\x26"
10322 "\x62\x49\x77\x57\x24\x70\x93\x69"
10323 "\x99\x59\x57\x49\x66\x96\x76\x27"
10324 "\x31\x41\x59\x26\x53\x58\x97\x93"
10325 "\x23\x84\x62\x64\x33\x83\x27\x95"
10326 "\x02\x88\x41\x97\x16\x93\x99\x37"
10327 "\x51\x05\x82\x09\x74\x94\x45\x92",
10328 .klen = 64,
10329 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10330 "\x00\x00\x00\x00\x00\x00\x00\x00",
10331 "\x00\x00\x00\x00\x00\x00\x00\x00",
10332 "\x00\x00\x00\x00\x00\x00\x00\x00",
10333 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10334 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10335 "\x10\x11\x12\x13\x14\x15\x16\x17"
10336 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10337 "\x20\x21\x22\x23\x24\x25\x26\x27"
10338 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10339 "\x30\x31\x32\x33\x34\x35\x36\x37"
10340 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10341 "\x40\x41\x42\x43\x44\x45\x46\x47"
10342 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10343 "\x50\x51\x52\x53\x54\x55\x56\x57"
10344 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10345 "\x60\x61\x62\x63\x64\x65\x66\x67"
10346 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10347 "\x70\x71\x72\x73\x74\x75\x76\x77"
10348 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10349 "\x80\x81\x82\x83\x84\x85\x86\x87"
10350 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10351 "\x90\x91\x92\x93\x94\x95\x96\x97"
10352 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10353 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10354 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10355 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10356 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10357 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10358 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10359 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10360 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10361 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10362 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10363 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10364 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10365 "\x00\x01\x02\x03\x04\x05\x06\x07"
10366 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10367 "\x10\x11\x12\x13\x14\x15\x16\x17"
10368 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10369 "\x20\x21\x22\x23\x24\x25\x26\x27"
10370 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10371 "\x30\x31\x32\x33\x34\x35\x36\x37"
10372 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10373 "\x40\x41\x42\x43\x44\x45\x46\x47"
10374 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10375 "\x50\x51\x52\x53\x54\x55\x56\x57"
10376 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10377 "\x60\x61\x62\x63\x64\x65\x66\x67"
10378 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10379 "\x70\x71\x72\x73\x74\x75\x76\x77"
10380 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10381 "\x80\x81\x82\x83\x84\x85\x86\x87"
10382 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10383 "\x90\x91\x92\x93\x94\x95\x96\x97"
10384 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10385 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10386 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10387 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10388 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10389 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10390 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10391 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10392 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10393 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10394 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10395 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10396 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10397 .ilen = 512,
10398 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
10399 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
10400 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
10401 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
10402 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
10403 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
10404 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
10405 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
10406 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
10407 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
10408 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
10409 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
10410 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
10411 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
10412 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
10413 "\x00\x02\x08\x87\x89\x14\x29\xca"
10414 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
10415 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
10416 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
10417 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
10418 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
10419 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
10420 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
10421 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
10422 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
10423 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
10424 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
10425 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
10426 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
10427 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
10428 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
10429 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
10430 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
10431 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
10432 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
10433 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
10434 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
10435 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
10436 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
10437 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
10438 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
10439 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
10440 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
10441 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
10442 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
10443 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
10444 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
10445 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
10446 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
10447 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
10448 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
10449 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
10450 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
10451 "\x94\x30\x54\xff\x84\x01\x14\x93"
10452 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
10453 "\x53\x76\x44\x1a\x77\xed\x43\x85"
10454 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
10455 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
10456 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
10457 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
10458 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
10459 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
10460 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
10461 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
10462 .rlen = 512,
f44d83d1
JK
10463 .also_non_np = 1,
10464 .np = 2,
10465 .tap = { 512 - 16, 16 },
da7f033d
HX
10466 }
10467};
10468
10469static struct cipher_testvec aes_xts_dec_tv_template[] = {
10470 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
10471 { /* XTS-AES 1 */
10472 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10473 "\x00\x00\x00\x00\x00\x00\x00\x00"
10474 "\x00\x00\x00\x00\x00\x00\x00\x00"
10475 "\x00\x00\x00\x00\x00\x00\x00\x00",
10476 .klen = 32,
10477 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10478 "\x00\x00\x00\x00\x00\x00\x00\x00",
10479 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
10480 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
10481 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
10482 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
10483 .ilen = 32,
10484 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
10485 "\x00\x00\x00\x00\x00\x00\x00\x00"
10486 "\x00\x00\x00\x00\x00\x00\x00\x00"
10487 "\x00\x00\x00\x00\x00\x00\x00\x00",
10488 .rlen = 32,
10489 }, { /* XTS-AES 2 */
10490 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10491 "\x11\x11\x11\x11\x11\x11\x11\x11"
10492 "\x22\x22\x22\x22\x22\x22\x22\x22"
10493 "\x22\x22\x22\x22\x22\x22\x22\x22",
10494 .klen = 32,
10495 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10496 "\x00\x00\x00\x00\x00\x00\x00\x00",
10497 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
10498 "\x39\x33\x40\x38\xac\xef\x83\x8b"
10499 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
10500 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
10501 .ilen = 32,
10502 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10503 "\x44\x44\x44\x44\x44\x44\x44\x44"
10504 "\x44\x44\x44\x44\x44\x44\x44\x44"
10505 "\x44\x44\x44\x44\x44\x44\x44\x44",
10506 .rlen = 32,
10507 }, { /* XTS-AES 3 */
10508 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10509 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10510 "\x22\x22\x22\x22\x22\x22\x22\x22"
10511 "\x22\x22\x22\x22\x22\x22\x22\x22",
10512 .klen = 32,
10513 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10514 "\x00\x00\x00\x00\x00\x00\x00\x00",
10515 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
10516 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
10517 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
10518 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
10519 .ilen = 32,
10520 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10521 "\x44\x44\x44\x44\x44\x44\x44\x44"
10522 "\x44\x44\x44\x44\x44\x44\x44\x44"
10523 "\x44\x44\x44\x44\x44\x44\x44\x44",
10524 .rlen = 32,
10525 }, { /* XTS-AES 4 */
10526 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10527 "\x23\x53\x60\x28\x74\x71\x35\x26"
10528 "\x31\x41\x59\x26\x53\x58\x97\x93"
10529 "\x23\x84\x62\x64\x33\x83\x27\x95",
10530 .klen = 32,
10531 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10532 "\x00\x00\x00\x00\x00\x00\x00\x00",
10533 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
10534 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
10535 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
10536 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
10537 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
10538 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
10539 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
10540 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
10541 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
10542 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
10543 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
10544 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
10545 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
10546 "\x22\x97\x61\x46\xae\x20\xce\x84"
10547 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
10548 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
10549 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
10550 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
10551 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
10552 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
10553 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
10554 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
10555 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
10556 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
10557 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
10558 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
10559 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
10560 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
10561 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
10562 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
10563 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
10564 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
10565 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
10566 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
10567 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
10568 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
10569 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
10570 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
10571 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
10572 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
10573 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
10574 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
10575 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
10576 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
10577 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
10578 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
10579 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
10580 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
10581 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
10582 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
10583 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
10584 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
10585 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
10586 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
10587 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
10588 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
10589 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
10590 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
10591 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
10592 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
10593 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
10594 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
10595 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
10596 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
10597 .ilen = 512,
10598 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10599 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10600 "\x10\x11\x12\x13\x14\x15\x16\x17"
10601 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10602 "\x20\x21\x22\x23\x24\x25\x26\x27"
10603 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10604 "\x30\x31\x32\x33\x34\x35\x36\x37"
10605 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10606 "\x40\x41\x42\x43\x44\x45\x46\x47"
10607 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10608 "\x50\x51\x52\x53\x54\x55\x56\x57"
10609 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10610 "\x60\x61\x62\x63\x64\x65\x66\x67"
10611 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10612 "\x70\x71\x72\x73\x74\x75\x76\x77"
10613 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10614 "\x80\x81\x82\x83\x84\x85\x86\x87"
10615 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10616 "\x90\x91\x92\x93\x94\x95\x96\x97"
10617 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10618 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10619 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10620 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10621 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10622 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10623 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10624 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10625 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10626 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10627 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10628 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10629 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10630 "\x00\x01\x02\x03\x04\x05\x06\x07"
10631 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10632 "\x10\x11\x12\x13\x14\x15\x16\x17"
10633 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10634 "\x20\x21\x22\x23\x24\x25\x26\x27"
10635 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10636 "\x30\x31\x32\x33\x34\x35\x36\x37"
10637 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10638 "\x40\x41\x42\x43\x44\x45\x46\x47"
10639 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10640 "\x50\x51\x52\x53\x54\x55\x56\x57"
10641 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10642 "\x60\x61\x62\x63\x64\x65\x66\x67"
10643 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10644 "\x70\x71\x72\x73\x74\x75\x76\x77"
10645 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10646 "\x80\x81\x82\x83\x84\x85\x86\x87"
10647 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10648 "\x90\x91\x92\x93\x94\x95\x96\x97"
10649 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10650 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10651 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10652 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10653 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10654 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10655 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10656 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10657 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10658 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10659 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10660 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10661 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10662 .rlen = 512,
5165e5b1
JW
10663 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
10664 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10665 "\x23\x53\x60\x28\x74\x71\x35\x26"
10666 "\x62\x49\x77\x57\x24\x70\x93\x69"
10667 "\x99\x59\x57\x49\x66\x96\x76\x27"
10668 "\x31\x41\x59\x26\x53\x58\x97\x93"
10669 "\x23\x84\x62\x64\x33\x83\x27\x95"
10670 "\x02\x88\x41\x97\x16\x93\x99\x37"
10671 "\x51\x05\x82\x09\x74\x94\x45\x92",
10672 .klen = 64,
10673 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10674 "\x00\x00\x00\x00\x00\x00\x00\x00",
10675 "\x00\x00\x00\x00\x00\x00\x00\x00",
10676 "\x00\x00\x00\x00\x00\x00\x00\x00",
10677 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
10678 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
10679 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
10680 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
10681 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
10682 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
10683 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
10684 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
10685 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
10686 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
10687 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
10688 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
10689 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
10690 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
10691 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
10692 "\x00\x02\x08\x87\x89\x14\x29\xca"
10693 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
10694 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
10695 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
10696 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
10697 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
10698 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
10699 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
10700 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
10701 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
10702 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
10703 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
10704 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
10705 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
10706 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
10707 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
10708 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
10709 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
10710 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
10711 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
10712 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
10713 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
10714 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
10715 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
10716 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
10717 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
10718 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
10719 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
10720 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
10721 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
10722 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
10723 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
10724 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
10725 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
10726 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
10727 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
10728 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
10729 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
10730 "\x94\x30\x54\xff\x84\x01\x14\x93"
10731 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
10732 "\x53\x76\x44\x1a\x77\xed\x43\x85"
10733 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
10734 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
10735 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
10736 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
10737 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
10738 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
10739 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
10740 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
10741 .ilen = 512,
10742 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10743 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10744 "\x10\x11\x12\x13\x14\x15\x16\x17"
10745 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10746 "\x20\x21\x22\x23\x24\x25\x26\x27"
10747 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10748 "\x30\x31\x32\x33\x34\x35\x36\x37"
10749 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10750 "\x40\x41\x42\x43\x44\x45\x46\x47"
10751 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10752 "\x50\x51\x52\x53\x54\x55\x56\x57"
10753 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10754 "\x60\x61\x62\x63\x64\x65\x66\x67"
10755 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10756 "\x70\x71\x72\x73\x74\x75\x76\x77"
10757 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10758 "\x80\x81\x82\x83\x84\x85\x86\x87"
10759 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10760 "\x90\x91\x92\x93\x94\x95\x96\x97"
10761 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10762 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10763 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10764 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10765 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10766 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10767 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10768 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10769 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10770 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10771 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10772 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10773 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10774 "\x00\x01\x02\x03\x04\x05\x06\x07"
10775 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10776 "\x10\x11\x12\x13\x14\x15\x16\x17"
10777 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10778 "\x20\x21\x22\x23\x24\x25\x26\x27"
10779 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10780 "\x30\x31\x32\x33\x34\x35\x36\x37"
10781 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10782 "\x40\x41\x42\x43\x44\x45\x46\x47"
10783 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10784 "\x50\x51\x52\x53\x54\x55\x56\x57"
10785 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10786 "\x60\x61\x62\x63\x64\x65\x66\x67"
10787 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10788 "\x70\x71\x72\x73\x74\x75\x76\x77"
10789 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10790 "\x80\x81\x82\x83\x84\x85\x86\x87"
10791 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10792 "\x90\x91\x92\x93\x94\x95\x96\x97"
10793 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10794 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10795 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10796 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10797 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10798 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10799 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10800 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10801 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10802 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10803 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10804 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10805 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10806 .rlen = 512,
f44d83d1
JK
10807 .also_non_np = 1,
10808 .np = 2,
10809 .tap = { 512 - 16, 16 },
da7f033d
HX
10810 }
10811};
10812
10813
10814static struct cipher_testvec aes_ctr_enc_tv_template[] = {
f7cb80f2
JW
10815 { /* From NIST Special Publication 800-38A, Appendix F.5 */
10816 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
10817 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
10818 .klen = 16,
10819 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10820 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10821 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10822 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10823 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10824 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10825 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10826 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10827 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10828 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10829 .ilen = 64,
10830 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
10831 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
10832 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
10833 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
10834 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
10835 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
10836 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
10837 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
10838 .rlen = 64,
10839 }, {
10840 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10841 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10842 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10843 .klen = 24,
10844 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10845 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10846 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10847 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10848 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10849 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10850 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10851 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10852 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10853 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10854 .ilen = 64,
10855 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
10856 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
10857 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
10858 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
10859 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
10860 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
10861 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
10862 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
10863 .rlen = 64,
10864 }, {
10865 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10866 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10867 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10868 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10869 .klen = 32,
10870 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10871 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10872 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10873 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10874 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10875 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10876 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10877 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10878 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10879 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10880 .ilen = 64,
10881 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
10882 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
10883 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
10884 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
10885 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
10886 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
10887 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
10888 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
10889 .rlen = 64,
10890 }
10891};
10892
10893static struct cipher_testvec aes_ctr_dec_tv_template[] = {
10894 { /* From NIST Special Publication 800-38A, Appendix F.5 */
10895 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
10896 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
10897 .klen = 16,
10898 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10899 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10900 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
10901 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
10902 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
10903 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
10904 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
10905 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
10906 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
10907 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
10908 .ilen = 64,
10909 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10910 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10911 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10912 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10913 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10914 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10915 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10916 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10917 .rlen = 64,
10918 }, {
10919 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10920 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10921 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10922 .klen = 24,
10923 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10924 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10925 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
10926 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
10927 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
10928 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
10929 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
10930 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
10931 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
10932 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
10933 .ilen = 64,
10934 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10935 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10936 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10937 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10938 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10939 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10940 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10941 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10942 .rlen = 64,
10943 }, {
10944 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10945 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10946 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10947 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10948 .klen = 32,
10949 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10950 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10951 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
10952 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
10953 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
10954 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
10955 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
10956 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
10957 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
10958 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
10959 .ilen = 64,
10960 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10961 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10962 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10963 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10964 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10965 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10966 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10967 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10968 .rlen = 64,
10969 }
10970};
10971
10972static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
da7f033d
HX
10973 { /* From RFC 3686 */
10974 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
10975 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
10976 "\x00\x00\x00\x30",
10977 .klen = 20,
10978 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10979 .input = "Single block msg",
10980 .ilen = 16,
10981 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
10982 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
10983 .rlen = 16,
10984 }, {
10985 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
10986 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
10987 "\x00\x6c\xb6\xdb",
10988 .klen = 20,
10989 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
10990 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10991 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10992 "\x10\x11\x12\x13\x14\x15\x16\x17"
10993 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10994 .ilen = 32,
10995 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
10996 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
10997 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
10998 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
10999 .rlen = 32,
11000 }, {
11001 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
11002 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
11003 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
11004 "\x00\x00\x00\x48",
11005 .klen = 28,
11006 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
11007 .input = "Single block msg",
11008 .ilen = 16,
11009 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
11010 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
11011 .rlen = 16,
11012 }, {
11013 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
11014 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
11015 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
11016 "\x00\x96\xb0\x3b",
11017 .klen = 28,
11018 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
11019 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11020 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11021 "\x10\x11\x12\x13\x14\x15\x16\x17"
11022 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11023 .ilen = 32,
11024 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
11025 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
11026 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
11027 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
11028 .rlen = 32,
11029 }, {
11030 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
11031 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
11032 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
11033 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
11034 "\x00\x00\x00\x60",
11035 .klen = 36,
11036 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
11037 .input = "Single block msg",
11038 .ilen = 16,
11039 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
11040 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
11041 .rlen = 16,
11042 }, {
11043 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
11044 "\x07\x96\x36\x58\x79\xef\xf8\x86"
11045 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
11046 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
11047 "\x00\xfa\xac\x24",
11048 .klen = 36,
11049 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
11050 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11051 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11052 "\x10\x11\x12\x13\x14\x15\x16\x17"
11053 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11054 .ilen = 32,
11055 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
11056 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
11057 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
11058 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
11059 .rlen = 32,
11060 }, {
11061 // generated using Crypto++
11062 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
11063 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11064 "\x10\x11\x12\x13\x14\x15\x16\x17"
11065 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11066 "\x00\x00\x00\x00",
11067 .klen = 32 + 4,
11068 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
11069 .input =
11070 "\x00\x01\x02\x03\x04\x05\x06\x07"
11071 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11072 "\x10\x11\x12\x13\x14\x15\x16\x17"
11073 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11074 "\x20\x21\x22\x23\x24\x25\x26\x27"
11075 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11076 "\x30\x31\x32\x33\x34\x35\x36\x37"
11077 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11078 "\x40\x41\x42\x43\x44\x45\x46\x47"
11079 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11080 "\x50\x51\x52\x53\x54\x55\x56\x57"
11081 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11082 "\x60\x61\x62\x63\x64\x65\x66\x67"
11083 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11084 "\x70\x71\x72\x73\x74\x75\x76\x77"
11085 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11086 "\x80\x81\x82\x83\x84\x85\x86\x87"
11087 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11088 "\x90\x91\x92\x93\x94\x95\x96\x97"
11089 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11090 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11091 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11092 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11093 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11094 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11095 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11096 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11097 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11098 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11099 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11100 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11101 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11102 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
11103 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
11104 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
11105 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
11106 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
11107 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
11108 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
11109 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
11110 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
11111 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
11112 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
11113 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
11114 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
11115 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
11116 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
11117 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
11118 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
11119 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
11120 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
11121 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
11122 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
11123 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
11124 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
11125 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
11126 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
11127 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
11128 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
11129 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
11130 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
11131 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
11132 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
11133 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
11134 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
11135 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
11136 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
11137 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
11138 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
11139 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
11140 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
11141 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
11142 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
11143 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
11144 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
11145 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
11146 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
11147 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
11148 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
11149 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
11150 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
11151 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
11152 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
11153 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
11154 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
11155 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
11156 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
11157 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
11158 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
11159 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
11160 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
11161 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
11162 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
11163 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
11164 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
11165 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
11166 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
11167 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
11168 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
11169 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
11170 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
11171 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
11172 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
11173 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
11174 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
11175 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
11176 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
11177 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
11178 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
11179 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
11180 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
11181 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
11182 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
11183 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
11184 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
11185 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
11186 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
11187 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
11188 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
11189 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
11190 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
11191 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
11192 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
11193 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
11194 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
11195 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
11196 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
11197 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
11198 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
11199 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
11200 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
11201 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
11202 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
11203 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
11204 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
11205 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
11206 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
11207 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
11208 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
11209 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
11210 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
11211 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
11212 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
11213 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
11214 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
11215 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
11216 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
11217 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
11218 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
11219 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
11220 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
11221 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
11222 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
11223 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
11224 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
11225 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
11226 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
11227 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
11228 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
11229 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
11230 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
11231 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
11232 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
11233 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
11234 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
11235 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
11236 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
11237 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
11238 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
11239 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
11240 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
11241 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
11242 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
11243 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
11244 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
11245 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
11246 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
11247 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
11248 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
11249 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
11250 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
11251 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
11252 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
11253 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
11254 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
11255 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
11256 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
11257 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
11258 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
11259 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
11260 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
11261 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
11262 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
11263 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
11264 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
11265 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
11266 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
11267 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
11268 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
11269 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
11270 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
11271 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
11272 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
11273 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
11274 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
11275 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
11276 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
11277 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
11278 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
11279 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
11280 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
11281 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
11282 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
11283 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
11284 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
11285 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
11286 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
11287 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
11288 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
11289 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
11290 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
11291 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
11292 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
11293 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
11294 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
11295 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
11296 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
11297 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
11298 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
11299 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
11300 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
11301 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
11302 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
11303 "\x38\x47\x56\x65\x74\x83\x92\xa1"
11304 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
11305 "\x28\x37\x46\x55\x64\x73\x82\x91"
11306 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
11307 "\x18\x27\x36\x45\x54\x63\x72\x81"
11308 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
11309 "\x08\x17\x26\x35\x44\x53\x62\x71"
11310 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
11311 "\xf8\x07\x16\x25\x34\x43\x52\x61"
11312 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
11313 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
11314 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
11315 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
11316 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
11317 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
11318 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
11319 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
11320 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
11321 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
11322 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
11323 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
11324 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
11325 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
11326 "\x00\x11\x22\x33\x44\x55\x66\x77"
11327 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
11328 "\x10\x21\x32\x43\x54\x65\x76\x87"
11329 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
11330 "\x20\x31\x42\x53\x64\x75\x86\x97"
11331 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
11332 "\x30\x41\x52\x63\x74\x85\x96\xa7"
11333 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
11334 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
11335 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
11336 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
11337 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
11338 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
11339 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
11340 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
11341 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
11342 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
11343 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
11344 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
11345 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
11346 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
11347 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
11348 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
11349 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
11350 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
11351 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
11352 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
11353 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
11354 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
11355 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
11356 "\xf0\x01\x12\x23\x34\x45\x56\x67"
11357 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
11358 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
11359 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
11360 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
11361 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
11362 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
11363 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
11364 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
11365 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
11366 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
11367 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
11368 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
11369 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
11370 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
11371 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
11372 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
11373 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
11374 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
11375 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
11376 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
11377 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
11378 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
11379 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
11380 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
11381 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
11382 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
11383 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
11384 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
11385 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
11386 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
11387 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
11388 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
11389 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
11390 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
11391 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
11392 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
11393 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
11394 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
11395 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
11396 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
11397 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
11398 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
11399 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
11400 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
11401 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
11402 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
11403 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
11404 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
11405 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
11406 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
11407 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
11408 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
11409 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
11410 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
11411 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
11412 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
11413 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
11414 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
11415 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
11416 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
11417 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
11418 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
11419 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
11420 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
11421 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
11422 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
11423 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
11424 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
11425 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
11426 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
11427 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
11428 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
11429 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
11430 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
11431 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
11432 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
11433 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
11434 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
11435 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
11436 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
11437 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
11438 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
11439 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
11440 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
11441 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
11442 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
11443 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
11444 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
11445 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
11446 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
11447 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
11448 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
11449 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
11450 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
11451 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
11452 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
11453 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
11454 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
11455 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
11456 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
11457 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
11458 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
11459 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
11460 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
11461 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
11462 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
11463 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
11464 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
11465 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
11466 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
11467 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
11468 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
11469 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
11470 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
11471 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
11472 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
11473 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
11474 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
11475 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
11476 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
11477 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
11478 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
11479 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
11480 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
11481 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
11482 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
11483 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
11484 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
11485 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
11486 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
11487 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
11488 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
11489 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
11490 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
11491 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
11492 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
11493 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
11494 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
11495 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
11496 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
11497 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
11498 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
11499 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
11500 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
11501 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
11502 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
11503 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
11504 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
11505 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
11506 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
11507 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
11508 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
11509 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
11510 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
11511 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
11512 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
11513 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
11514 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
11515 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
11516 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
11517 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
11518 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
11519 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
11520 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
11521 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
11522 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
11523 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
11524 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
11525 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
11526 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
11527 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
11528 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
11529 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
11530 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
11531 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
11532 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
11533 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
11534 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
11535 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
11536 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
11537 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
11538 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
11539 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
11540 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
11541 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
11542 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
11543 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
11544 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
11545 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
11546 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
11547 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
11548 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
11549 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
11550 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
11551 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
11552 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
11553 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
11554 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
11555 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
11556 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
11557 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
11558 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
11559 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
11560 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
11561 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
11562 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
11563 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
11564 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
11565 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
11566 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
11567 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
11568 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
11569 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
11570 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
11571 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
11572 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
11573 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
11574 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
11575 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
11576 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
11577 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
11578 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
11579 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
11580 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
11581 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
11582 "\x00\x21\x42\x63",
11583 .ilen = 4100,
11584 .result =
11585 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
11586 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
11587 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
11588 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
11589 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
11590 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
11591 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
11592 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
11593 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
11594 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
11595 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
11596 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
11597 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
11598 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
11599 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
11600 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
11601 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
11602 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
11603 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
11604 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
11605 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
11606 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
11607 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
11608 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
11609 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
11610 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
11611 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
11612 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
11613 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
11614 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
11615 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
11616 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
11617 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
11618 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
11619 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
11620 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
11621 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
11622 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
11623 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
11624 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
11625 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
11626 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
11627 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
11628 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
11629 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
11630 "\x04\x02\xef\xd3\x44\xde\x76\x31"
11631 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
11632 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
11633 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
11634 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
11635 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
11636 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
11637 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
11638 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
11639 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
11640 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
11641 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
11642 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
11643 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
11644 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
11645 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
11646 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
11647 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
11648 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
11649 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
11650 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
11651 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
11652 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
11653 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
11654 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
11655 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
11656 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
11657 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
11658 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
11659 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
11660 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
11661 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
11662 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
11663 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
11664 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
11665 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
11666 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
11667 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
11668 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
11669 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
11670 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
11671 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
11672 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
11673 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
11674 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
11675 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
11676 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
11677 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
11678 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
11679 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
11680 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
11681 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
11682 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
11683 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
11684 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
11685 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
11686 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
11687 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
11688 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
11689 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
11690 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
11691 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
11692 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
11693 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
11694 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
11695 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
11696 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
11697 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
11698 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
11699 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
11700 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
11701 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
11702 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
11703 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
11704 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
11705 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
11706 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
11707 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
11708 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
11709 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
11710 "\x26\x39\x83\x94\xef\x27\xd8\x53"
11711 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
11712 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
11713 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
11714 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
11715 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
11716 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
11717 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
11718 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
11719 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
11720 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
11721 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
11722 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
11723 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
11724 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
11725 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
11726 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
11727 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
11728 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
11729 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
11730 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
11731 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
11732 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
11733 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
11734 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
11735 "\x35\x12\xe3\x36\x28\x27\x36\x58"
11736 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
11737 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
11738 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
11739 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
11740 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
11741 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
11742 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
11743 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
11744 "\x89\xf3\x78\x35\x44\x62\x78\x72"
11745 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
11746 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
11747 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
11748 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
11749 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
11750 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
11751 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
11752 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
11753 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
11754 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
11755 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
11756 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
11757 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
11758 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
11759 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
11760 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
11761 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
11762 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
11763 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
11764 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
11765 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
11766 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
11767 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
11768 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
11769 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
11770 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
11771 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
11772 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
11773 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
11774 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
11775 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
11776 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
11777 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
11778 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
11779 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
11780 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
11781 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
11782 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
11783 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
11784 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
11785 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
11786 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
11787 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
11788 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
11789 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
11790 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
11791 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
11792 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
11793 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
11794 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
11795 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
11796 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
11797 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
11798 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
11799 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
11800 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
11801 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
11802 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
11803 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
11804 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
11805 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
11806 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
11807 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
11808 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
11809 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
11810 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
11811 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
11812 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
11813 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
11814 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
11815 "\x29\x90\x46\x30\x92\x69\x7d\x13"
11816 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
11817 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
11818 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
11819 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
11820 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
11821 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
11822 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
11823 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
11824 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
11825 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
11826 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
11827 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
11828 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
11829 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
11830 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
11831 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
11832 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
11833 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
11834 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
11835 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
11836 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
11837 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
11838 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
11839 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
11840 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
11841 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
11842 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
11843 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
11844 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
11845 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
11846 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
11847 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
11848 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
11849 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
11850 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
11851 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
11852 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
11853 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
11854 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
11855 "\x73\x02\x3b\x78\x21\x72\x43\x00"
11856 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
11857 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
11858 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
11859 "\x11\x94\x13\x69\x51\x09\x28\xde"
11860 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
11861 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
11862 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
11863 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
11864 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
11865 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
11866 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
11867 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
11868 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
11869 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
11870 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
11871 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
11872 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
11873 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
11874 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
11875 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
11876 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
11877 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
11878 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
11879 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
11880 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
11881 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
11882 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
11883 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
11884 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
11885 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
11886 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
11887 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
11888 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
11889 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
11890 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
11891 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
11892 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
11893 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
11894 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
11895 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
11896 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
11897 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
11898 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
11899 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
11900 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
11901 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
11902 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
11903 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
11904 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
11905 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
11906 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
11907 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
11908 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
11909 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
11910 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
11911 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
11912 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
11913 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
11914 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
11915 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
11916 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
11917 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
11918 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
11919 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
11920 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
11921 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
11922 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
11923 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
11924 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
11925 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
11926 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
11927 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
11928 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
11929 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
11930 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
11931 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
11932 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
11933 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
11934 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
11935 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
11936 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
11937 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
11938 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
11939 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
11940 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
11941 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
11942 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
11943 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
11944 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
11945 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
11946 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
11947 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
11948 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
11949 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
11950 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
11951 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
11952 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
11953 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
11954 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
11955 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
11956 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
11957 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
11958 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
11959 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
11960 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
11961 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
11962 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
11963 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
11964 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
11965 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
11966 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
11967 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
11968 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
11969 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
11970 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
11971 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
11972 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
11973 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
11974 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
11975 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
11976 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
11977 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
11978 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
11979 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
11980 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
11981 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
11982 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
11983 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
11984 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
11985 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
11986 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
11987 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
11988 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
11989 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
11990 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
11991 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
11992 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
11993 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
11994 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
11995 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
11996 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
11997 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
11998 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
11999 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
12000 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
12001 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
12002 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
12003 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
12004 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
12005 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
12006 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
12007 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
12008 "\xae\xed\x39\x88\x42\x11\x3c\xed"
12009 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
12010 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
12011 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
12012 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
12013 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
12014 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
12015 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
12016 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
12017 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
12018 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
12019 "\x34\x17\xde\xba\x47\xf1\x06\x18"
12020 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
12021 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
12022 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
12023 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
12024 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
12025 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
12026 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
12027 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
12028 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
12029 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
12030 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
12031 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
12032 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
12033 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
12034 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
12035 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
12036 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
12037 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
12038 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
12039 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
12040 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
12041 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
12042 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
12043 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
12044 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
12045 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
12046 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
12047 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
12048 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
12049 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
12050 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
12051 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
12052 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
12053 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
12054 "\x74\x56\x58\x40\x02\x37\x52\x2c"
12055 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
12056 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
12057 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
12058 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
12059 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
12060 "\xed\x38\x80\x36\x72\x43\x27\x49"
12061 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
12062 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
12063 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
12064 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
12065 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
12066 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
12067 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
12068 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
12069 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
12070 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
12071 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
12072 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
12073 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
12074 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
12075 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
12076 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
12077 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
12078 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
12079 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
12080 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
12081 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
12082 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
12083 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
12084 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
12085 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
12086 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
12087 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
12088 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
12089 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
12090 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
12091 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
12092 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
12093 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
12094 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
12095 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
12096 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
12097 "\x21\xed\xda\x86",
12098 .rlen = 4100,
12099 .np = 2,
12100 .tap = { 4064, 36 },
12101 },
12102};
12103
f7cb80f2 12104static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
da7f033d
HX
12105 { /* From RFC 3686 */
12106 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
12107 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
12108 "\x00\x00\x00\x30",
12109 .klen = 20,
12110 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
12111 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
12112 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
12113 .ilen = 16,
12114 .result = "Single block msg",
12115 .rlen = 16,
12116 }, {
12117 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
12118 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
12119 "\x00\x6c\xb6\xdb",
12120 .klen = 20,
12121 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
12122 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
12123 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
12124 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
12125 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
12126 .ilen = 32,
12127 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12128 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12129 "\x10\x11\x12\x13\x14\x15\x16\x17"
12130 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12131 .rlen = 32,
12132 }, {
12133 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
12134 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
12135 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
12136 "\x00\x00\x00\x48",
12137 .klen = 28,
12138 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
12139 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
12140 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
12141 .ilen = 16,
12142 .result = "Single block msg",
12143 .rlen = 16,
12144 }, {
12145 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
12146 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
12147 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
12148 "\x00\x96\xb0\x3b",
12149 .klen = 28,
12150 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
12151 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
12152 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
12153 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
12154 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
12155 .ilen = 32,
12156 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12157 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12158 "\x10\x11\x12\x13\x14\x15\x16\x17"
12159 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12160 .rlen = 32,
12161 }, {
12162 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
12163 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
12164 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
12165 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
12166 "\x00\x00\x00\x60",
12167 .klen = 36,
12168 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
12169 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
12170 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
12171 .ilen = 16,
12172 .result = "Single block msg",
12173 .rlen = 16,
12174 }, {
12175 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
12176 "\x07\x96\x36\x58\x79\xef\xf8\x86"
12177 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
12178 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
12179 "\x00\xfa\xac\x24",
12180 .klen = 36,
12181 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
12182 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
12183 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
12184 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
12185 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
12186 .ilen = 32,
12187 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12188 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12189 "\x10\x11\x12\x13\x14\x15\x16\x17"
12190 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12191 .rlen = 32,
12192 },
12193};
12194
ba0e14ac
PS
12195static struct cipher_testvec aes_ofb_enc_tv_template[] = {
12196 /* From NIST Special Publication 800-38A, Appendix F.5 */
12197 {
12198 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
12199 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
12200 .klen = 16,
12201 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
12202 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12203 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12204 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12205 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12206 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12207 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12208 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12209 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12210 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12211 .ilen = 64,
12212 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
12213 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
12214 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
12215 "\x3c\x52\xda\xc5\x4e\xd8\x25"
12216 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
12217 "\x44\xf7\xa8\x22\x60\xed\xcc"
12218 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
12219 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
12220 .rlen = 64,
12221 }
12222};
12223
12224static struct cipher_testvec aes_ofb_dec_tv_template[] = {
12225 /* From NIST Special Publication 800-38A, Appendix F.5 */
12226 {
12227 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
12228 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
12229 .klen = 16,
12230 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
12231 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12232 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
12233 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
12234 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
12235 "\x3c\x52\xda\xc5\x4e\xd8\x25"
12236 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
12237 "\x44\xf7\xa8\x22\x60\xed\xcc"
12238 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
12239 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
12240 .ilen = 64,
12241 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12242 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12243 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12244 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12245 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12246 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12247 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12248 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12249 .rlen = 64,
12250 }
12251};
12252
da7f033d
HX
12253static struct aead_testvec aes_gcm_enc_tv_template[] = {
12254 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
12255 .key = zeroed_string,
12256 .klen = 16,
12257 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
12258 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
12259 .rlen = 16,
12260 }, {
12261 .key = zeroed_string,
12262 .klen = 16,
12263 .input = zeroed_string,
12264 .ilen = 16,
12265 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
12266 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
12267 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
12268 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
12269 .rlen = 32,
12270 }, {
12271 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12272 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12273 .klen = 16,
12274 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12275 "\xde\xca\xf8\x88",
12276 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12277 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12278 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12279 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12280 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12281 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12282 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12283 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
12284 .ilen = 64,
12285 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
12286 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
12287 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
12288 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
12289 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
12290 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
12291 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
12292 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
12293 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
12294 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
12295 .rlen = 80,
12296 }, {
12297 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12298 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12299 .klen = 16,
12300 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12301 "\xde\xca\xf8\x88",
12302 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12303 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12304 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12305 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12306 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12307 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12308 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12309 "\xba\x63\x7b\x39",
12310 .ilen = 60,
12311 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12312 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12313 "\xab\xad\xda\xd2",
12314 .alen = 20,
12315 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
12316 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
12317 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
12318 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
12319 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
12320 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
12321 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
12322 "\x3d\x58\xe0\x91"
12323 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
12324 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
12325 .rlen = 76,
12326 }, {
12327 .key = zeroed_string,
12328 .klen = 24,
12329 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
12330 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
12331 .rlen = 16,
12332 }, {
12333 .key = zeroed_string,
12334 .klen = 24,
12335 .input = zeroed_string,
12336 .ilen = 16,
12337 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
12338 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
12339 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
12340 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
12341 .rlen = 32,
12342 }, {
12343 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12344 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12345 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
12346 .klen = 24,
12347 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12348 "\xde\xca\xf8\x88",
12349 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12350 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12351 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12352 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12353 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12354 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12355 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12356 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
12357 .ilen = 64,
12358 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
12359 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
12360 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
12361 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
12362 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
12363 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
12364 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
12365 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
12366 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
12367 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
12368 .rlen = 80,
12369 }, {
12370 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12371 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12372 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
12373 .klen = 24,
12374 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12375 "\xde\xca\xf8\x88",
12376 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12377 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12378 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12379 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12380 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12381 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12382 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12383 "\xba\x63\x7b\x39",
12384 .ilen = 60,
12385 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12386 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12387 "\xab\xad\xda\xd2",
12388 .alen = 20,
12389 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
12390 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
12391 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
12392 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
12393 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
12394 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
12395 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
12396 "\xcc\xda\x27\x10"
12397 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
12398 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
12399 .rlen = 76,
12400 .np = 2,
12401 .tap = { 32, 28 },
12402 .anp = 2,
12403 .atap = { 8, 12 }
12404 }, {
12405 .key = zeroed_string,
12406 .klen = 32,
12407 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
12408 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
12409 .rlen = 16,
12410 }
12411};
12412
12413static struct aead_testvec aes_gcm_dec_tv_template[] = {
12414 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
12415 .key = zeroed_string,
12416 .klen = 32,
12417 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
12418 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
12419 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
12420 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
12421 .ilen = 32,
12422 .result = zeroed_string,
12423 .rlen = 16,
12424 }, {
12425 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12426 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12427 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12428 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12429 .klen = 32,
12430 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12431 "\xde\xca\xf8\x88",
12432 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
12433 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
12434 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
12435 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
12436 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
12437 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
12438 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
12439 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
12440 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
12441 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
12442 .ilen = 80,
12443 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12444 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12445 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12446 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12447 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12448 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12449 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12450 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
12451 .rlen = 64,
12452 }, {
12453 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12454 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12455 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12456 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12457 .klen = 32,
12458 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12459 "\xde\xca\xf8\x88",
12460 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
12461 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
12462 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
12463 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
12464 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
12465 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
12466 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
12467 "\xbc\xc9\xf6\x62"
12468 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
12469 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
12470 .ilen = 76,
12471 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12472 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12473 "\xab\xad\xda\xd2",
12474 .alen = 20,
12475 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12476 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12477 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12478 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12479 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12480 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12481 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12482 "\xba\x63\x7b\x39",
12483 .rlen = 60,
12484 .np = 2,
12485 .tap = { 48, 28 },
12486 .anp = 3,
12487 .atap = { 8, 8, 4 }
12488 }, {
12489 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12490 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12491 .klen = 16,
12492 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12493 "\xde\xca\xf8\x88",
12494 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
12495 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
12496 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
12497 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
12498 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
12499 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
12500 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
12501 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
12502 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
12503 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
12504 .ilen = 80,
12505 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12506 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12507 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12508 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12509 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12510 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12511 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12512 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
12513 .rlen = 64,
12514 }, {
12515 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12516 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
12517 .klen = 16,
12518 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12519 "\xde\xca\xf8\x88",
12520 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
12521 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
12522 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
12523 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
12524 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
12525 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
12526 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
12527 "\x3d\x58\xe0\x91"
12528 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
12529 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
12530 .ilen = 76,
12531 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12532 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12533 "\xab\xad\xda\xd2",
12534 .alen = 20,
12535 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12536 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12537 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12538 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12539 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12540 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12541 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12542 "\xba\x63\x7b\x39",
12543 .rlen = 60,
12544 }, {
12545 .key = zeroed_string,
12546 .klen = 24,
12547 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
12548 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
12549 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
12550 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
12551 .ilen = 32,
12552 .result = zeroed_string,
12553 .rlen = 16,
12554 }, {
12555 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12556 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12557 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
12558 .klen = 24,
12559 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12560 "\xde\xca\xf8\x88",
12561 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
12562 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
12563 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
12564 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
12565 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
12566 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
12567 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
12568 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
12569 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
12570 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
12571 .ilen = 80,
12572 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12573 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12574 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12575 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12576 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12577 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12578 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12579 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
12580 .rlen = 64,
12581 }, {
12582 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12583 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12584 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
12585 .klen = 24,
12586 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
12587 "\xde\xca\xf8\x88",
12588 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
12589 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
12590 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
12591 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
12592 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
12593 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
12594 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
12595 "\xcc\xda\x27\x10"
12596 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
12597 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
12598 .ilen = 76,
12599 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12600 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
12601 "\xab\xad\xda\xd2",
12602 .alen = 20,
12603 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
12604 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
12605 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
12606 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
12607 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
12608 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
12609 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
12610 "\xba\x63\x7b\x39",
12611 .rlen = 60,
12612 }
12613};
12614
69435b94
AH
12615static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
12616 { /* Generated using Crypto++ */
12617 .key = zeroed_string,
12618 .klen = 20,
12619 .iv = zeroed_string,
12620 .input = zeroed_string,
12621 .ilen = 16,
12622 .assoc = zeroed_string,
12623 .alen = 8,
12624 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
12625 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
12626 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
12627 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
12628 .rlen = 32,
12629 },{
12630 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12631 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12632 "\x00\x00\x00\x00",
12633 .klen = 20,
12634 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12635 "\x00\x00\x00\x00",
12636 .input = zeroed_string,
12637 .ilen = 16,
12638 .assoc = zeroed_string,
12639 .alen = 8,
12640 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
12641 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
12642 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
12643 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
12644 .rlen = 32,
12645
12646 }, {
12647 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12648 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12649 "\x00\x00\x00\x00",
12650 .klen = 20,
12651 .iv = zeroed_string,
12652 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
12653 "\x01\x01\x01\x01\x01\x01\x01\x01",
12654 .ilen = 16,
12655 .assoc = zeroed_string,
12656 .alen = 8,
12657 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
12658 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
12659 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
12660 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
12661 .rlen = 32,
12662 }, {
12663 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12664 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12665 "\x00\x00\x00\x00",
12666 .klen = 20,
12667 .iv = zeroed_string,
12668 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
12669 "\x01\x01\x01\x01\x01\x01\x01\x01",
12670 .ilen = 16,
12671 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12672 .alen = 8,
12673 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
12674 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
12675 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
12676 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
12677 .rlen = 32,
12678 }, {
12679 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12680 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12681 "\x00\x00\x00\x00",
12682 .klen = 20,
12683 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12684 "\x00\x00\x00\x00",
12685 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
12686 "\x01\x01\x01\x01\x01\x01\x01\x01",
12687 .ilen = 16,
12688 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12689 .alen = 8,
12690 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
12691 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
12692 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
12693 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
12694 .rlen = 32,
12695 }, {
12696 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12697 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12698 "\x00\x00\x00\x00",
12699 .klen = 20,
12700 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12701 "\x00\x00\x00\x00",
12702 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
12703 "\x01\x01\x01\x01\x01\x01\x01\x01"
12704 "\x01\x01\x01\x01\x01\x01\x01\x01"
12705 "\x01\x01\x01\x01\x01\x01\x01\x01"
12706 "\x01\x01\x01\x01\x01\x01\x01\x01"
12707 "\x01\x01\x01\x01\x01\x01\x01\x01"
12708 "\x01\x01\x01\x01\x01\x01\x01\x01"
12709 "\x01\x01\x01\x01\x01\x01\x01\x01",
12710 .ilen = 64,
12711 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12712 .alen = 8,
12713 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
12714 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
12715 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
12716 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
12717 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
12718 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
12719 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
12720 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
12721 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
12722 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
12723 .rlen = 80,
12724 }, {
12725 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12726 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12727 "\x00\x00\x00\x00",
12728 .klen = 20,
12729 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
12730 "\x00\x00\x00\x00",
12731 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
12732 "\xff\xff\xff\xff\xff\xff\xff\xff"
12733 "\xff\xff\xff\xff\xff\xff\xff\xff"
12734 "\xff\xff\xff\xff\xff\xff\xff\xff"
12735 "\xff\xff\xff\xff\xff\xff\xff\xff"
12736 "\xff\xff\xff\xff\xff\xff\xff\xff"
12737 "\xff\xff\xff\xff\xff\xff\xff\xff"
12738 "\xff\xff\xff\xff\xff\xff\xff\xff"
12739 "\xff\xff\xff\xff\xff\xff\xff\xff"
12740 "\xff\xff\xff\xff\xff\xff\xff\xff"
12741 "\xff\xff\xff\xff\xff\xff\xff\xff"
12742 "\xff\xff\xff\xff\xff\xff\xff\xff"
12743 "\xff\xff\xff\xff\xff\xff\xff\xff"
12744 "\xff\xff\xff\xff\xff\xff\xff\xff"
12745 "\xff\xff\xff\xff\xff\xff\xff\xff"
12746 "\xff\xff\xff\xff\xff\xff\xff\xff"
12747 "\xff\xff\xff\xff\xff\xff\xff\xff"
12748 "\xff\xff\xff\xff\xff\xff\xff\xff"
12749 "\xff\xff\xff\xff\xff\xff\xff\xff"
12750 "\xff\xff\xff\xff\xff\xff\xff\xff"
12751 "\xff\xff\xff\xff\xff\xff\xff\xff"
12752 "\xff\xff\xff\xff\xff\xff\xff\xff"
12753 "\xff\xff\xff\xff\xff\xff\xff\xff"
12754 "\xff\xff\xff\xff\xff\xff\xff\xff",
12755 .ilen = 192,
12756 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
12757 "\xaa\xaa\xaa\xaa",
12758 .alen = 12,
12759 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
12760 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
12761 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
12762 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
12763 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
12764 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
12765 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
12766 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
12767 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
12768 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
12769 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
12770 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
12771 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
12772 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
12773 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
12774 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
12775 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
12776 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
12777 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
12778 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
12779 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
12780 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
12781 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
12782 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
12783 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
12784 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
12785 .rlen = 208,
12786 }
12787};
12788
12789static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
12790 { /* Generated using Crypto++ */
12791 .key = zeroed_string,
12792 .klen = 20,
12793 .iv = zeroed_string,
12794 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
12795 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
12796 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
12797 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
12798 .ilen = 32,
12799 .assoc = zeroed_string,
12800 .alen = 8,
12801 .result = zeroed_string,
12802 .rlen = 16,
12803
12804 },{
12805 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12806 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12807 "\x00\x00\x00\x00",
12808 .klen = 20,
12809 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12810 "\x00\x00\x00\x00",
12811 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
12812 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
12813 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
12814 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
12815 .ilen = 32,
12816 .assoc = zeroed_string,
12817 .alen = 8,
12818 .result = zeroed_string,
12819 .rlen = 16,
12820 }, {
12821 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12822 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12823 "\x00\x00\x00\x00",
12824 .klen = 20,
12825 .iv = zeroed_string,
12826 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
12827 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
12828 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
12829 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
12830 .ilen = 32,
12831 .assoc = zeroed_string,
12832 .alen = 8,
12833 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
12834 "\x01\x01\x01\x01\x01\x01\x01\x01",
12835 .rlen = 16,
12836 }, {
12837 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12838 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12839 "\x00\x00\x00\x00",
12840 .klen = 20,
12841 .iv = zeroed_string,
12842 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
12843 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
12844 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
12845 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
12846 .ilen = 32,
12847 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12848 .alen = 8,
12849 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
12850 "\x01\x01\x01\x01\x01\x01\x01\x01",
12851 .rlen = 16,
12852
12853 }, {
12854 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12855 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12856 "\x00\x00\x00\x00",
12857 .klen = 20,
12858 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12859 "\x00\x00\x00\x00",
12860 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
12861 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
12862 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
12863 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
12864 .ilen = 32,
12865 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12866 .alen = 8,
12867 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
12868 "\x01\x01\x01\x01\x01\x01\x01\x01",
12869 .rlen = 16,
12870 }, {
12871 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
12872 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
12873 "\x00\x00\x00\x00",
12874 .klen = 20,
12875 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
12876 "\x00\x00\x00\x00",
12877 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
12878 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
12879 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
12880 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
12881 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
12882 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
12883 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
12884 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
12885 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
12886 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
12887 .ilen = 80,
12888 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
12889 .alen = 8,
12890 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
12891 "\x01\x01\x01\x01\x01\x01\x01\x01"
12892 "\x01\x01\x01\x01\x01\x01\x01\x01"
12893 "\x01\x01\x01\x01\x01\x01\x01\x01"
12894 "\x01\x01\x01\x01\x01\x01\x01\x01"
12895 "\x01\x01\x01\x01\x01\x01\x01\x01"
12896 "\x01\x01\x01\x01\x01\x01\x01\x01"
12897 "\x01\x01\x01\x01\x01\x01\x01\x01",
12898 .rlen = 64,
12899 }, {
12900 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12901 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12902 "\x00\x00\x00\x00",
12903 .klen = 20,
12904 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
12905 "\x00\x00\x00\x00",
12906 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
12907 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
12908 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
12909 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
12910 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
12911 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
12912 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
12913 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
12914 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
12915 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
12916 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
12917 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
12918 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
12919 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
12920 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
12921 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
12922 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
12923 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
12924 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
12925 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
12926 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
12927 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
12928 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
12929 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
12930 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
12931 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
12932 .ilen = 208,
12933 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
12934 "\xaa\xaa\xaa\xaa",
12935 .alen = 12,
12936 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
12937 "\xff\xff\xff\xff\xff\xff\xff\xff"
12938 "\xff\xff\xff\xff\xff\xff\xff\xff"
12939 "\xff\xff\xff\xff\xff\xff\xff\xff"
12940 "\xff\xff\xff\xff\xff\xff\xff\xff"
12941 "\xff\xff\xff\xff\xff\xff\xff\xff"
12942 "\xff\xff\xff\xff\xff\xff\xff\xff"
12943 "\xff\xff\xff\xff\xff\xff\xff\xff"
12944 "\xff\xff\xff\xff\xff\xff\xff\xff"
12945 "\xff\xff\xff\xff\xff\xff\xff\xff"
12946 "\xff\xff\xff\xff\xff\xff\xff\xff"
12947 "\xff\xff\xff\xff\xff\xff\xff\xff"
12948 "\xff\xff\xff\xff\xff\xff\xff\xff"
12949 "\xff\xff\xff\xff\xff\xff\xff\xff"
12950 "\xff\xff\xff\xff\xff\xff\xff\xff"
12951 "\xff\xff\xff\xff\xff\xff\xff\xff"
12952 "\xff\xff\xff\xff\xff\xff\xff\xff"
12953 "\xff\xff\xff\xff\xff\xff\xff\xff"
12954 "\xff\xff\xff\xff\xff\xff\xff\xff"
12955 "\xff\xff\xff\xff\xff\xff\xff\xff"
12956 "\xff\xff\xff\xff\xff\xff\xff\xff"
12957 "\xff\xff\xff\xff\xff\xff\xff\xff"
12958 "\xff\xff\xff\xff\xff\xff\xff\xff"
12959 "\xff\xff\xff\xff\xff\xff\xff\xff",
12960 .rlen = 192,
12961
12962 }
12963};
12964
da7f033d
HX
12965static struct aead_testvec aes_ccm_enc_tv_template[] = {
12966 { /* From RFC 3610 */
12967 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12968 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
12969 .klen = 16,
12970 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
12971 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
12972 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
12973 .alen = 8,
12974 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12975 "\x10\x11\x12\x13\x14\x15\x16\x17"
12976 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
12977 .ilen = 23,
12978 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
12979 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
12980 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
12981 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
12982 .rlen = 31,
12983 }, {
12984 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12985 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
12986 .klen = 16,
12987 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
12988 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
12989 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
12990 "\x08\x09\x0a\x0b",
12991 .alen = 12,
12992 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
12993 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
12994 "\x1c\x1d\x1e\x1f",
12995 .ilen = 20,
12996 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
12997 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
12998 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
12999 "\x7d\x9c\x2d\x93",
13000 .rlen = 28,
13001 }, {
13002 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13003 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13004 .klen = 16,
13005 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13006 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13007 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13008 .alen = 8,
13009 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13010 "\x10\x11\x12\x13\x14\x15\x16\x17"
13011 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13012 "\x20",
13013 .ilen = 25,
13014 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13015 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13016 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13017 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13018 "\x7e\x5f\x4e",
13019 .rlen = 35,
13020 }, {
13021 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13022 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13023 .klen = 16,
13024 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13025 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13026 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13027 "\x08\x09\x0a\x0b",
13028 .alen = 12,
13029 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13030 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13031 "\x1c\x1d\x1e",
13032 .ilen = 19,
13033 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
13034 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13035 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13036 "\x4d\x99\x99\x88\xdd",
13037 .rlen = 29,
13038 }, {
13039 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13040 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13041 .klen = 16,
13042 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
13043 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13044 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
13045 .alen = 8,
13046 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
13047 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
13048 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
13049 .ilen = 24,
13050 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
13051 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
13052 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
13053 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
13054 .rlen = 32,
13055 }, {
13056 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13057 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13058 .klen = 16,
13059 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
13060 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13061 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
13062 "\x20\xea\x60\xc0",
13063 .alen = 12,
13064 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
13065 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
13066 "\x3a\x80\x3b\xa8\x7f",
13067 .ilen = 21,
13068 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
13069 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
13070 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
13071 "\x5a\xe0\x70\x45\x51",
13072 .rlen = 29,
13073 }, {
13074 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13075 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13076 .klen = 16,
13077 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
13078 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13079 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
13080 .alen = 8,
13081 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
13082 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
13083 "\x98\x09\xd6\x7d\xbe\xdd\x18",
13084 .ilen = 23,
13085 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
13086 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
13087 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
13088 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
13089 "\xba",
13090 .rlen = 33,
13091 },
13092};
13093
13094static struct aead_testvec aes_ccm_dec_tv_template[] = {
13095 { /* From RFC 3610 */
13096 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13097 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13098 .klen = 16,
13099 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
13100 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13101 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13102 .alen = 8,
13103 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
13104 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
13105 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
13106 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
13107 .ilen = 31,
13108 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13109 "\x10\x11\x12\x13\x14\x15\x16\x17"
13110 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
13111 .rlen = 23,
13112 }, {
13113 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13114 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13115 .klen = 16,
13116 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
13117 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13118 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13119 "\x08\x09\x0a\x0b",
13120 .alen = 12,
13121 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
13122 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
13123 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
13124 "\x7d\x9c\x2d\x93",
13125 .ilen = 28,
13126 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13127 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13128 "\x1c\x1d\x1e\x1f",
13129 .rlen = 20,
13130 }, {
13131 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13132 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13133 .klen = 16,
13134 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13135 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13136 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13137 .alen = 8,
13138 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13139 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13140 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13141 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13142 "\x7e\x5f\x4e",
13143 .ilen = 35,
13144 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13145 "\x10\x11\x12\x13\x14\x15\x16\x17"
13146 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13147 "\x20",
13148 .rlen = 25,
13149 }, {
13150 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13151 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13152 .klen = 16,
13153 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13154 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13155 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13156 "\x08\x09\x0a\x0b",
13157 .alen = 12,
13158 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
13159 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13160 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13161 "\x4d\x99\x99\x88\xdd",
13162 .ilen = 29,
13163 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13164 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13165 "\x1c\x1d\x1e",
13166 .rlen = 19,
13167 }, {
13168 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13169 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13170 .klen = 16,
13171 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
13172 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13173 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
13174 .alen = 8,
13175 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
13176 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
13177 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
13178 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
13179 .ilen = 32,
13180 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
13181 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
13182 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
13183 .rlen = 24,
13184 }, {
13185 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13186 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13187 .klen = 16,
13188 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
13189 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13190 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
13191 "\x20\xea\x60\xc0",
13192 .alen = 12,
13193 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
13194 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
13195 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
13196 "\x5a\xe0\x70\x45\x51",
13197 .ilen = 29,
13198 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
13199 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
13200 "\x3a\x80\x3b\xa8\x7f",
13201 .rlen = 21,
13202 }, {
13203 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13204 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13205 .klen = 16,
13206 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
13207 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13208 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
13209 .alen = 8,
13210 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
13211 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
13212 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
13213 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
13214 "\xba",
13215 .ilen = 33,
13216 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
13217 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
13218 "\x98\x09\xd6\x7d\xbe\xdd\x18",
13219 .rlen = 23,
13220 },
13221};
13222
5d667322
JW
13223/*
13224 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
13225 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
13226 * Special Publication 800-38C's test vectors also use nonce lengths our
13227 * implementation doesn't support. The following are taken from fips cavs
13228 * fax files on hand at Red Hat.
13229 *
13230 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
13231 * part of the nonce which combine w/the iv, but need to be input this way.
13232 */
13233static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
13234 {
13235 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
13236 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
13237 "\x96\xac\x59",
13238 .klen = 19,
13239 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
13240 .alen = 0,
13241 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
13242 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
13243 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
13244 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
13245 .ilen = 32,
13246 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
13247 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
13248 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
13249 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
13250 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
13251 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
13252 .rlen = 48,
13253 }, {
13254 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
13255 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
13256 "\x4f\xa3\x19",
13257 .klen = 19,
13258 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
13259 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
13260 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
13261 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
13262 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
13263 .alen = 32,
13264 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
13265 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
13266 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
13267 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
13268 .ilen = 32,
13269 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
13270 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
13271 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
13272 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
13273 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
13274 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
13275 .rlen = 48,
13276 }, {
13277 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
13278 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
13279 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
13280 "\xa0\x20\x35",
13281 .klen = 27,
13282 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
13283 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
13284 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
13285 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
13286 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
13287 .alen = 32,
13288 .ilen = 0,
13289 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
13290 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
13291 .rlen = 16,
13292 }, {
13293 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
13294 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
13295 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
13296 "\xd6\x3c\x8c",
13297 .klen = 27,
13298 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
13299 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
13300 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
13301 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
13302 "\xe3\x00\x73\x69\x84\x69\x87\x79",
13303 .alen = 32,
13304 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
13305 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
13306 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
13307 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
13308 .ilen = 32,
13309 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
13310 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
13311 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
13312 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
13313 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
13314 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
13315 .rlen = 48,
13316 }, {
13317 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
13318 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
13319 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
13320 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
13321 "\x1e\x29\x91",
13322 .klen = 35,
13323 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
13324 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
13325 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
13326 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
13327 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
13328 .alen = 32,
13329 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
13330 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
13331 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
13332 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
13333 .ilen = 32,
13334 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
13335 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
13336 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
13337 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
13338 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
13339 .rlen = 40,
13340 }, {
13341 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
13342 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
13343 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
13344 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
13345 "\xf9\xd9\x4e",
13346 .klen = 35,
13347 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
13348 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
13349 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
13350 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
13351 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
13352 .alen = 32,
13353 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
13354 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
13355 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
13356 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
13357 .ilen = 32,
13358 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
13359 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
13360 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
13361 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
13362 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
13363 "\x7b\x72\x8a\xf7",
13364 .rlen = 44,
13365 }, {
13366 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
13367 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
13368 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
13369 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
13370 "\x24\xa7\x8b",
13371 .klen = 35,
13372 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
13373 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
13374 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
13375 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
13376 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
13377 .alen = 32,
13378 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
13379 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
13380 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
13381 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
13382 .ilen = 32,
13383 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
13384 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
13385 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
13386 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
13387 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
13388 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
13389 .rlen = 48,
13390 },
13391};
13392
13393static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
13394 {
13395 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
13396 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
13397 "\xc6\xfb\x7d",
13398 .klen = 19,
13399 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
13400 .alen = 0,
13401 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
13402 .ilen = 8,
13403 .result = "\x00",
13404 .rlen = 0,
13405 .novrfy = 1,
13406 }, {
13407 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
13408 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
13409 "\xaf\x94\x87",
13410 .klen = 19,
13411 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
13412 .alen = 0,
13413 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
13414 .ilen = 8,
13415 .result = "\x00",
13416 .rlen = 0,
13417 }, {
13418 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
13419 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
13420 "\xc6\xfb\x7d",
13421 .klen = 19,
13422 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
13423 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
13424 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
13425 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
13426 "\xd8\x94\x99\x91\x81\x54\x62\x57",
13427 .alen = 32,
13428 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
13429 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
13430 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
13431 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
13432 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
13433 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
13434 .ilen = 48,
13435 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
13436 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
13437 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
13438 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
13439 .rlen = 32,
13440 .novrfy = 1,
13441 }, {
13442 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
13443 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
13444 "\x05\xe0\xc9",
13445 .klen = 19,
13446 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
13447 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
13448 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
13449 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
13450 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
13451 .alen = 32,
13452 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
13453 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
13454 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
13455 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
13456 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
13457 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
13458 .ilen = 48,
13459 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
13460 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
13461 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
13462 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
13463 .rlen = 32,
13464 }, {
13465 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
13466 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
13467 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
13468 "\xee\x49\x83",
13469 .klen = 27,
13470 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
13471 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
13472 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
13473 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
13474 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
13475 .alen = 32,
13476 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
13477 .ilen = 8,
13478 .result = "\x00",
13479 .rlen = 0,
13480 }, {
13481 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
13482 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
13483 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
13484 "\xee\x49\x83",
13485 .klen = 27,
13486 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
13487 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
13488 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
13489 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
13490 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
13491 .alen = 32,
13492 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
13493 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
13494 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
13495 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
13496 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
13497 .ilen = 40,
13498 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
13499 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
13500 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
13501 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
13502 .rlen = 32,
13503 }, {
13504 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
13505 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
13506 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
13507 "\xd1\xfc\x57",
13508 .klen = 27,
13509 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
13510 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
13511 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
13512 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
13513 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
13514 .alen = 32,
13515 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
13516 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
13517 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
13518 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
13519 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
13520 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
13521 .ilen = 48,
13522 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
13523 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
13524 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
13525 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
13526 .rlen = 32,
13527 .novrfy = 1,
13528 }, {
13529 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
13530 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
13531 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
13532 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
13533 "\xee\x49\x83",
13534 .klen = 35,
13535 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
13536 .alen = 0,
13537 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
13538 .ilen = 8,
13539 .result = "\x00",
13540 .rlen = 0,
13541 }, {
13542 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
13543 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
13544 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
13545 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
13546 "\x85\x34\x66",
13547 .klen = 35,
13548 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
13549 .alen = 0,
13550 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
13551 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
13552 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
13553 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
13554 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
13555 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
13556 .ilen = 48,
13557 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
13558 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
13559 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
13560 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
13561 .rlen = 32,
13562 .novrfy = 1,
13563 }, {
13564 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
13565 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
13566 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
13567 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
13568 "\xcf\x76\x3f",
13569 .klen = 35,
13570 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
13571 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
13572 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
13573 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
13574 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
13575 .alen = 32,
13576 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
13577 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
13578 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
13579 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
13580 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
13581 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
13582 .ilen = 48,
13583 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
13584 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
13585 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
13586 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
13587 .rlen = 32,
13588 },
13589};
13590
e08ca2da
JW
13591/*
13592 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
13593 * test vectors, taken from Appendix B.2.9 and B.2.10:
13594 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
13595 * Only AES-128 is supported at this time.
13596 */
13597#define ANSI_CPRNG_AES_TEST_VECTORS 6
13598
13599static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
13600 {
13601 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
13602 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
13603 .klen = 16,
13604 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
13605 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
13606 .dtlen = 16,
13607 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
13608 "\x00\x00\x00\x00\x00\x00\x00\x00",
13609 .vlen = 16,
13610 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
13611 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
13612 .rlen = 16,
13613 .loops = 1,
13614 }, {
13615 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
13616 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
13617 .klen = 16,
13618 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
13619 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
13620 .dtlen = 16,
13621 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
13622 "\x00\x00\x00\x00\x00\x00\x00\x00",
13623 .vlen = 16,
13624 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
13625 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
13626 .rlen = 16,
13627 .loops = 1,
13628 }, {
13629 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
13630 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
13631 .klen = 16,
13632 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
13633 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
13634 .dtlen = 16,
13635 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
13636 "\x00\x00\x00\x00\x00\x00\x00\x00",
13637 .vlen = 16,
13638 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
13639 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
13640 .rlen = 16,
13641 .loops = 1,
13642 }, {
13643 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
13644 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
13645 .klen = 16,
13646 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
13647 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
13648 .dtlen = 16,
13649 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
13650 "\x00\x00\x00\x00\x00\x00\x00\x00",
13651 .vlen = 16,
13652 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
13653 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
13654 .rlen = 16,
13655 .loops = 1,
13656 }, {
13657 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
13658 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
13659 .klen = 16,
13660 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
13661 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
13662 .dtlen = 16,
13663 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
13664 "\x00\x00\x00\x00\x00\x00\x00\x00",
13665 .vlen = 16,
13666 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
13667 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
13668 .rlen = 16,
13669 .loops = 1,
13670 }, { /* Monte Carlo Test */
13671 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
13672 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
13673 .klen = 16,
13674 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
13675 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
13676 .dtlen = 16,
13677 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
13678 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
13679 .vlen = 16,
13680 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
13681 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
13682 .rlen = 16,
13683 .loops = 10000,
13684 },
13685};
13686
da7f033d 13687/* Cast5 test vectors from RFC 2144 */
a2c58260
JG
13688#define CAST5_ENC_TEST_VECTORS 4
13689#define CAST5_DEC_TEST_VECTORS 4
13690#define CAST5_CBC_ENC_TEST_VECTORS 1
13691#define CAST5_CBC_DEC_TEST_VECTORS 1
9cac3a29
JK
13692#define CAST5_CTR_ENC_TEST_VECTORS 2
13693#define CAST5_CTR_DEC_TEST_VECTORS 2
da7f033d
HX
13694
13695static struct cipher_testvec cast5_enc_tv_template[] = {
13696 {
13697 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
13698 "\x23\x45\x67\x89\x34\x56\x78\x9a",
13699 .klen = 16,
13700 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13701 .ilen = 8,
13702 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
13703 .rlen = 8,
13704 }, {
13705 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
13706 "\x23\x45",
13707 .klen = 10,
13708 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13709 .ilen = 8,
13710 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
13711 .rlen = 8,
13712 }, {
13713 .key = "\x01\x23\x45\x67\x12",
13714 .klen = 5,
13715 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13716 .ilen = 8,
13717 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
13718 .rlen = 8,
a2c58260
JG
13719 }, { /* Generated from TF test vectors */
13720 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13721 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
13722 .klen = 16,
13723 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
13724 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13725 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13726 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13727 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13728 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13729 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13730 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13731 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13732 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13733 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13734 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13735 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13736 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13737 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13738 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13739 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13740 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13741 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13742 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13743 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13744 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13745 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13746 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13747 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13748 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13749 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13750 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13751 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13752 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13753 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13754 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13755 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13756 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13757 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13758 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13759 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13760 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13761 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13762 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13763 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13764 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13765 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13766 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13767 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13768 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13769 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13770 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13771 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13772 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13773 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13774 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13775 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13776 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13777 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13778 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13779 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13780 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13781 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13782 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13783 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13784 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13785 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13786 .ilen = 496,
13787 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
13788 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
13789 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
13790 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
13791 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
13792 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
13793 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
13794 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
13795 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
13796 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
13797 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
13798 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
13799 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
13800 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
13801 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
13802 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
13803 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
13804 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
13805 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
13806 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
13807 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
13808 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
13809 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
13810 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
13811 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
13812 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
13813 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
13814 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
13815 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
13816 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
13817 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
13818 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
13819 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
13820 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
13821 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
13822 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
13823 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
13824 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
13825 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
13826 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
13827 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
13828 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
13829 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
13830 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
13831 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
13832 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
13833 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
13834 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
13835 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
13836 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
13837 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
13838 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
13839 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
13840 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
13841 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
13842 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
13843 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
13844 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
13845 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
13846 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
13847 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
13848 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
13849 .rlen = 496,
f44d83d1
JK
13850 .also_non_np = 1,
13851 .np = 2,
13852 .tap = { 496 - 16, 16 },
da7f033d
HX
13853 },
13854};
13855
13856static struct cipher_testvec cast5_dec_tv_template[] = {
13857 {
13858 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
13859 "\x23\x45\x67\x89\x34\x56\x78\x9a",
13860 .klen = 16,
13861 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
13862 .ilen = 8,
13863 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13864 .rlen = 8,
13865 }, {
13866 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
13867 "\x23\x45",
13868 .klen = 10,
13869 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
13870 .ilen = 8,
13871 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13872 .rlen = 8,
13873 }, {
13874 .key = "\x01\x23\x45\x67\x12",
13875 .klen = 5,
13876 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
13877 .ilen = 8,
13878 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13879 .rlen = 8,
a2c58260
JG
13880 }, { /* Generated from TF test vectors */
13881 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13882 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
13883 .klen = 16,
13884 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
13885 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
13886 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
13887 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
13888 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
13889 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
13890 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
13891 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
13892 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
13893 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
13894 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
13895 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
13896 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
13897 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
13898 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
13899 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
13900 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
13901 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
13902 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
13903 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
13904 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
13905 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
13906 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
13907 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
13908 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
13909 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
13910 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
13911 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
13912 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
13913 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
13914 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
13915 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
13916 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
13917 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
13918 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
13919 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
13920 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
13921 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
13922 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
13923 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
13924 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
13925 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
13926 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
13927 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
13928 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
13929 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
13930 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
13931 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
13932 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
13933 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
13934 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
13935 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
13936 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
13937 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
13938 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
13939 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
13940 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
13941 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
13942 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
13943 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
13944 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
13945 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
13946 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
13947 .ilen = 496,
13948 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13949 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13950 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13951 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13952 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13953 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13954 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13955 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13956 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13957 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13958 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13959 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13960 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13961 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13962 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13963 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13964 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13965 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13966 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13967 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13968 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13969 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13970 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13971 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13972 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13973 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13974 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13975 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13976 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13977 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13978 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13979 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13980 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13981 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13982 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13983 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13984 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13985 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13986 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13987 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13988 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13989 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13990 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13991 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13992 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13993 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13994 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13995 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13996 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13997 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13998 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13999 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14000 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14001 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14002 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14003 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14004 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14005 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14006 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14007 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14008 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14009 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14010 .rlen = 496,
f44d83d1
JK
14011 .also_non_np = 1,
14012 .np = 2,
14013 .tap = { 496 - 16, 16 },
a2c58260
JG
14014 },
14015};
14016
14017static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
14018 { /* Generated from TF test vectors */
14019 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14020 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14021 .klen = 16,
14022 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14023 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14024 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14025 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14026 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14027 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14028 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14029 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14030 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14031 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14032 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14033 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14034 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14035 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14036 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14037 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14038 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14039 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14040 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14041 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14042 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14043 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14044 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14045 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14046 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14047 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14048 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14049 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14050 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14051 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14052 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14053 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14054 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14055 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14056 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14057 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14058 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14059 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14060 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14061 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14062 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14063 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14064 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14065 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14066 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14067 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14068 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14069 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14070 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14071 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14072 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14073 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14074 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14075 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14076 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14077 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14078 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14079 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14080 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14081 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14082 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14083 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14084 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14085 .ilen = 496,
14086 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14087 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
14088 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
14089 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
14090 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
14091 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
14092 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
14093 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
14094 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
14095 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
14096 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
14097 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
14098 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
14099 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
14100 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
14101 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
14102 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
14103 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
14104 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
14105 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
14106 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
14107 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
14108 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
14109 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
14110 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
14111 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
14112 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
14113 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
14114 "\x90\x12\x37\x49\x27\x98\x69\x18"
14115 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
14116 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
14117 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
14118 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
14119 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
14120 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
14121 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
14122 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
14123 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
14124 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
14125 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
14126 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
14127 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
14128 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
14129 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
14130 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
14131 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
14132 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
14133 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
14134 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
14135 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
14136 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
14137 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
14138 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
14139 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
14140 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
14141 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
14142 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
14143 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
14144 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
14145 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
14146 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
14147 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
14148 .rlen = 496,
f44d83d1
JK
14149 .also_non_np = 1,
14150 .np = 2,
14151 .tap = { 496 - 16, 16 },
a2c58260
JG
14152 },
14153};
14154
14155static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
14156 { /* Generated from TF test vectors */
14157 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14158 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14159 .klen = 16,
14160 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14161 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14162 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
14163 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
14164 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
14165 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
14166 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
14167 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
14168 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
14169 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
14170 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
14171 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
14172 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
14173 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
14174 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
14175 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
14176 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
14177 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
14178 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
14179 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
14180 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
14181 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
14182 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
14183 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
14184 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
14185 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
14186 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
14187 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
14188 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
14189 "\x90\x12\x37\x49\x27\x98\x69\x18"
14190 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
14191 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
14192 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
14193 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
14194 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
14195 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
14196 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
14197 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
14198 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
14199 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
14200 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
14201 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
14202 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
14203 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
14204 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
14205 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
14206 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
14207 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
14208 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
14209 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
14210 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
14211 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
14212 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
14213 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
14214 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
14215 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
14216 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
14217 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
14218 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
14219 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
14220 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
14221 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
14222 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
14223 .ilen = 496,
14224 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14225 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14226 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14227 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14228 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14229 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14230 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14231 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14232 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14233 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14234 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14235 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14236 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14237 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14238 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14239 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14240 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14241 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14242 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14243 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14244 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14245 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14246 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14247 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14248 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14249 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14250 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14251 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14252 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14253 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14254 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14255 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14256 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14257 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14258 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14259 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14260 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14261 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14262 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14263 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14264 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14265 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14266 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14267 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14268 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14269 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14270 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14271 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14272 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14273 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14274 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14275 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14276 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14277 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14278 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14279 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14280 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14281 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14282 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14283 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14284 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14285 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14286 .rlen = 496,
f44d83d1
JK
14287 .also_non_np = 1,
14288 .np = 2,
14289 .tap = { 496 - 16, 16 },
a2c58260
JG
14290 },
14291};
14292
14293static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
14294 { /* Generated from TF test vectors */
9cac3a29
JK
14295 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14296 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14297 .klen = 16,
14298 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14299 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14300 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14301 "\x3A",
14302 .ilen = 17,
14303 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
14304 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
14305 "\x0C",
14306 .rlen = 17,
14307 }, { /* Generated from TF test vectors */
a2c58260
JG
14308 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14309 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14310 .klen = 16,
14311 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14312 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14313 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14314 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14315 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14316 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14317 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14318 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14319 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14320 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14321 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14322 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14323 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14324 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14325 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14326 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14327 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14328 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14329 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14330 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14331 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14332 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14333 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14334 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14335 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14336 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14337 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14338 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14339 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14340 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14341 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14342 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14343 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14344 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14345 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14346 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14347 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14348 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14349 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14350 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14351 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14352 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14353 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14354 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14355 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14356 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14357 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14358 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14359 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14360 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14361 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14362 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14363 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14364 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14365 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14366 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14367 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14368 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14369 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14370 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14371 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14372 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14373 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14374 .ilen = 496,
14375 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
14376 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
14377 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
14378 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
14379 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
14380 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
14381 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
14382 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
14383 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
14384 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
14385 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
14386 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
14387 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
14388 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
14389 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
14390 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
14391 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
14392 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
14393 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
14394 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
14395 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
14396 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
14397 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
14398 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
14399 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
14400 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
14401 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
14402 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
14403 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
14404 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
14405 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
14406 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
14407 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
14408 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
14409 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
14410 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
14411 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
14412 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
14413 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
14414 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
14415 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
14416 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
14417 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
14418 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
14419 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
14420 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
14421 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
14422 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
14423 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
14424 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
14425 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
14426 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
14427 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
14428 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
14429 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
14430 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
14431 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
14432 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
14433 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
14434 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
14435 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
14436 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
14437 .rlen = 496,
f44d83d1
JK
14438 .also_non_np = 1,
14439 .np = 2,
14440 .tap = { 496 - 16, 16 },
a2c58260
JG
14441 },
14442};
14443
14444static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
14445 { /* Generated from TF test vectors */
14446 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9cac3a29
JK
14447 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14448 .klen = 16,
14449 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14450 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
14451 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
14452 "\x0C",
14453 .ilen = 17,
14454 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14455 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14456 "\x3A",
14457 .rlen = 17,
14458 }, { /* Generated from TF test vectors */
14459 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
a2c58260
JG
14460 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14461 .klen = 16,
14462 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14463 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
14464 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
14465 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
14466 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
14467 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
14468 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
14469 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
14470 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
14471 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
14472 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
14473 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
14474 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
14475 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
14476 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
14477 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
14478 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
14479 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
14480 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
14481 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
14482 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
14483 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
14484 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
14485 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
14486 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
14487 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
14488 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
14489 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
14490 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
14491 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
14492 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
14493 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
14494 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
14495 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
14496 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
14497 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
14498 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
14499 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
14500 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
14501 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
14502 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
14503 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
14504 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
14505 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
14506 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
14507 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
14508 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
14509 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
14510 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
14511 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
14512 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
14513 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
14514 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
14515 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
14516 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
14517 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
14518 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
14519 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
14520 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
14521 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
14522 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
14523 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
14524 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
14525 .ilen = 496,
14526 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14527 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14528 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14529 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14530 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14531 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14532 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14533 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14534 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14535 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14536 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14537 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14538 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14539 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14540 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14541 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14542 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14543 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14544 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14545 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14546 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14547 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14548 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14549 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14550 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14551 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14552 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14553 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14554 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14555 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14556 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14557 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14558 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14559 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14560 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14561 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14562 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14563 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14564 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14565 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14566 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14567 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14568 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14569 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14570 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14571 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14572 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14573 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14574 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14575 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14576 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14577 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14578 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14579 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14580 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14581 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14582 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14583 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14584 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14585 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14586 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14587 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14588 .rlen = 496,
f44d83d1
JK
14589 .also_non_np = 1,
14590 .np = 2,
14591 .tap = { 496 - 16, 16 },
da7f033d
HX
14592 },
14593};
14594
14595/*
14596 * ARC4 test vectors from OpenSSL
14597 */
14598#define ARC4_ENC_TEST_VECTORS 7
14599#define ARC4_DEC_TEST_VECTORS 7
14600
14601static struct cipher_testvec arc4_enc_tv_template[] = {
14602 {
14603 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14604 .klen = 8,
14605 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14606 .ilen = 8,
14607 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
14608 .rlen = 8,
14609 }, {
14610 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14611 .klen = 8,
14612 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
14613 .ilen = 8,
14614 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
14615 .rlen = 8,
14616 }, {
14617 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
14618 .klen = 8,
14619 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
14620 .ilen = 8,
14621 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
14622 .rlen = 8,
14623 }, {
14624 .key = "\xef\x01\x23\x45",
14625 .klen = 4,
14626 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
14627 "\x00\x00\x00\x00\x00\x00\x00\x00"
14628 "\x00\x00\x00\x00",
14629 .ilen = 20,
14630 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
14631 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
14632 "\x36\xb6\x78\x58",
14633 .rlen = 20,
14634 }, {
14635 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14636 .klen = 8,
14637 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14638 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14639 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14640 "\x12\x34\x56\x78",
14641 .ilen = 28,
14642 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
14643 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
14644 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
14645 "\x40\x01\x1e\xcf",
14646 .rlen = 28,
14647 }, {
14648 .key = "\xef\x01\x23\x45",
14649 .klen = 4,
14650 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
14651 "\x00\x00",
14652 .ilen = 10,
14653 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
14654 "\xbd\x61",
14655 .rlen = 10,
14656 }, {
14657 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
14658 "\x00\x00\x00\x00\x00\x00\x00\x00",
14659 .klen = 16,
14660 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
14661 .ilen = 8,
14662 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
14663 .rlen = 8,
14664 },
14665};
14666
14667static struct cipher_testvec arc4_dec_tv_template[] = {
14668 {
14669 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14670 .klen = 8,
14671 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
14672 .ilen = 8,
14673 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14674 .rlen = 8,
14675 }, {
14676 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14677 .klen = 8,
14678 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
14679 .ilen = 8,
14680 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
14681 .rlen = 8,
14682 }, {
14683 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
14684 .klen = 8,
14685 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
14686 .ilen = 8,
14687 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
14688 .rlen = 8,
14689 }, {
14690 .key = "\xef\x01\x23\x45",
14691 .klen = 4,
14692 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
14693 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
14694 "\x36\xb6\x78\x58",
14695 .ilen = 20,
14696 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
14697 "\x00\x00\x00\x00\x00\x00\x00\x00"
14698 "\x00\x00\x00\x00",
14699 .rlen = 20,
14700 }, {
14701 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14702 .klen = 8,
14703 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
14704 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
14705 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
14706 "\x40\x01\x1e\xcf",
14707 .ilen = 28,
14708 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14709 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14710 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
14711 "\x12\x34\x56\x78",
14712 .rlen = 28,
14713 }, {
14714 .key = "\xef\x01\x23\x45",
14715 .klen = 4,
14716 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
14717 "\xbd\x61",
14718 .ilen = 10,
14719 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
14720 "\x00\x00",
14721 .rlen = 10,
14722 }, {
14723 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
14724 "\x00\x00\x00\x00\x00\x00\x00\x00",
14725 .klen = 16,
14726 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
14727 .ilen = 8,
14728 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
14729 .rlen = 8,
14730 },
14731};
14732
14733/*
14734 * TEA test vectors
14735 */
14736#define TEA_ENC_TEST_VECTORS 4
14737#define TEA_DEC_TEST_VECTORS 4
14738
14739static struct cipher_testvec tea_enc_tv_template[] = {
14740 {
14741 .key = zeroed_string,
14742 .klen = 16,
14743 .input = zeroed_string,
14744 .ilen = 8,
14745 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
14746 .rlen = 8,
14747 }, {
14748 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
14749 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
14750 .klen = 16,
14751 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
14752 .ilen = 8,
14753 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
14754 .rlen = 8,
14755 }, {
14756 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
14757 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
14758 .klen = 16,
14759 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
14760 "\x65\x73\x74\x5f\x76\x65\x63\x74",
14761 .ilen = 16,
14762 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
14763 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
14764 .rlen = 16,
14765 }, {
14766 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
14767 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
14768 .klen = 16,
14769 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
14770 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
14771 "\x79\x6f\x75\x21\x21\x21\x20\x72"
14772 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
14773 .ilen = 32,
14774 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
14775 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
14776 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
14777 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
14778 .rlen = 32,
14779 }
14780};
14781
14782static struct cipher_testvec tea_dec_tv_template[] = {
14783 {
14784 .key = zeroed_string,
14785 .klen = 16,
14786 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
14787 .ilen = 8,
14788 .result = zeroed_string,
14789 .rlen = 8,
14790 }, {
14791 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
14792 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
14793 .klen = 16,
14794 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
14795 .ilen = 8,
14796 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
14797 .rlen = 8,
14798 }, {
14799 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
14800 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
14801 .klen = 16,
14802 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
14803 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
14804 .ilen = 16,
14805 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
14806 "\x65\x73\x74\x5f\x76\x65\x63\x74",
14807 .rlen = 16,
14808 }, {
14809 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
14810 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
14811 .klen = 16,
14812 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
14813 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
14814 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
14815 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
14816 .ilen = 32,
14817 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
14818 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
14819 "\x79\x6f\x75\x21\x21\x21\x20\x72"
14820 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
14821 .rlen = 32,
14822 }
14823};
14824
14825/*
14826 * XTEA test vectors
14827 */
14828#define XTEA_ENC_TEST_VECTORS 4
14829#define XTEA_DEC_TEST_VECTORS 4
14830
14831static struct cipher_testvec xtea_enc_tv_template[] = {
14832 {
14833 .key = zeroed_string,
14834 .klen = 16,
14835 .input = zeroed_string,
14836 .ilen = 8,
14837 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
14838 .rlen = 8,
14839 }, {
14840 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
14841 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
14842 .klen = 16,
14843 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
14844 .ilen = 8,
14845 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
14846 .rlen = 8,
14847 }, {
14848 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
14849 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
14850 .klen = 16,
14851 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
14852 "\x65\x73\x74\x5f\x76\x65\x63\x74",
14853 .ilen = 16,
14854 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
14855 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
14856 .rlen = 16,
14857 }, {
14858 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
14859 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
14860 .klen = 16,
14861 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
14862 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
14863 "\x79\x6f\x75\x21\x21\x21\x20\x72"
14864 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
14865 .ilen = 32,
14866 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
14867 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
14868 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
14869 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
14870 .rlen = 32,
14871 }
14872};
14873
14874static struct cipher_testvec xtea_dec_tv_template[] = {
14875 {
14876 .key = zeroed_string,
14877 .klen = 16,
14878 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
14879 .ilen = 8,
14880 .result = zeroed_string,
14881 .rlen = 8,
14882 }, {
14883 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
14884 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
14885 .klen = 16,
14886 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
14887 .ilen = 8,
14888 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
14889 .rlen = 8,
14890 }, {
14891 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
14892 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
14893 .klen = 16,
14894 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
14895 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
14896 .ilen = 16,
14897 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
14898 "\x65\x73\x74\x5f\x76\x65\x63\x74",
14899 .rlen = 16,
14900 }, {
14901 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
14902 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
14903 .klen = 16,
14904 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
14905 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
14906 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
14907 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
14908 .ilen = 32,
14909 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
14910 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
14911 "\x79\x6f\x75\x21\x21\x21\x20\x72"
14912 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
14913 .rlen = 32,
14914 }
14915};
14916
14917/*
14918 * KHAZAD test vectors.
14919 */
14920#define KHAZAD_ENC_TEST_VECTORS 5
14921#define KHAZAD_DEC_TEST_VECTORS 5
14922
14923static struct cipher_testvec khazad_enc_tv_template[] = {
14924 {
14925 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
14926 "\x00\x00\x00\x00\x00\x00\x00\x00",
14927 .klen = 16,
14928 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
14929 .ilen = 8,
14930 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
14931 .rlen = 8,
14932 }, {
14933 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
14934 "\x38\x38\x38\x38\x38\x38\x38\x38",
14935 .klen = 16,
14936 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
14937 .ilen = 8,
14938 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
14939 .rlen = 8,
14940 }, {
14941 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
14942 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
14943 .klen = 16,
14944 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
14945 .ilen = 8,
14946 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
14947 .rlen = 8,
14948 }, {
14949 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
14950 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
14951 .klen = 16,
14952 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
14953 .ilen = 8,
14954 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
14955 .rlen = 8,
14956 }, {
14957 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
14958 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
14959 .klen = 16,
14960 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
14961 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
14962 .ilen = 16,
14963 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
14964 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
14965 .rlen = 16,
14966 },
14967};
14968
14969static struct cipher_testvec khazad_dec_tv_template[] = {
14970 {
14971 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
14972 "\x00\x00\x00\x00\x00\x00\x00\x00",
14973 .klen = 16,
14974 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
14975 .ilen = 8,
14976 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
14977 .rlen = 8,
14978 }, {
14979 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
14980 "\x38\x38\x38\x38\x38\x38\x38\x38",
14981 .klen = 16,
14982 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
14983 .ilen = 8,
14984 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
14985 .rlen = 8,
14986 }, {
14987 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
14988 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
14989 .klen = 16,
14990 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
14991 .ilen = 8,
14992 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
14993 .rlen = 8,
14994 }, {
14995 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
14996 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
14997 .klen = 16,
14998 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
14999 .ilen = 8,
15000 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15001 .rlen = 8,
15002 }, {
15003 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15004 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15005 .klen = 16,
15006 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
15007 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15008 .ilen = 16,
15009 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15010 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15011 .rlen = 16,
15012 },
15013};
15014
15015/*
15016 * Anubis test vectors.
15017 */
15018
15019#define ANUBIS_ENC_TEST_VECTORS 5
15020#define ANUBIS_DEC_TEST_VECTORS 5
15021#define ANUBIS_CBC_ENC_TEST_VECTORS 2
15022#define ANUBIS_CBC_DEC_TEST_VECTORS 2
15023
15024static struct cipher_testvec anubis_enc_tv_template[] = {
15025 {
15026 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15027 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15028 .klen = 16,
15029 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15030 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15031 .ilen = 16,
15032 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15033 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15034 .rlen = 16,
15035 }, {
15036
15037 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
15038 "\x03\x03\x03\x03\x03\x03\x03\x03"
15039 "\x03\x03\x03\x03",
15040 .klen = 20,
15041 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
15042 "\x03\x03\x03\x03\x03\x03\x03\x03",
15043 .ilen = 16,
15044 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15045 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15046 .rlen = 16,
15047 }, {
15048 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
15049 "\x24\x24\x24\x24\x24\x24\x24\x24"
15050 "\x24\x24\x24\x24\x24\x24\x24\x24"
15051 "\x24\x24\x24\x24",
15052 .klen = 28,
15053 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
15054 "\x24\x24\x24\x24\x24\x24\x24\x24",
15055 .ilen = 16,
15056 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15057 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15058 .rlen = 16,
15059 }, {
15060 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
15061 "\x25\x25\x25\x25\x25\x25\x25\x25"
15062 "\x25\x25\x25\x25\x25\x25\x25\x25"
15063 "\x25\x25\x25\x25\x25\x25\x25\x25",
15064 .klen = 32,
15065 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
15066 "\x25\x25\x25\x25\x25\x25\x25\x25",
15067 .ilen = 16,
15068 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15069 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15070 .rlen = 16,
15071 }, {
15072 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15073 "\x35\x35\x35\x35\x35\x35\x35\x35"
15074 "\x35\x35\x35\x35\x35\x35\x35\x35"
15075 "\x35\x35\x35\x35\x35\x35\x35\x35"
15076 "\x35\x35\x35\x35\x35\x35\x35\x35",
15077 .klen = 40,
15078 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
15079 "\x35\x35\x35\x35\x35\x35\x35\x35",
15080 .ilen = 16,
15081 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15082 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15083 .rlen = 16,
15084 },
15085};
15086
15087static struct cipher_testvec anubis_dec_tv_template[] = {
15088 {
15089 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15090 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15091 .klen = 16,
15092 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15093 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15094 .ilen = 16,
15095 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15096 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15097 .rlen = 16,
15098 }, {
15099
15100 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
15101 "\x03\x03\x03\x03\x03\x03\x03\x03"
15102 "\x03\x03\x03\x03",
15103 .klen = 20,
15104 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15105 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15106 .ilen = 16,
15107 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
15108 "\x03\x03\x03\x03\x03\x03\x03\x03",
15109 .rlen = 16,
15110 }, {
15111 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
15112 "\x24\x24\x24\x24\x24\x24\x24\x24"
15113 "\x24\x24\x24\x24\x24\x24\x24\x24"
15114 "\x24\x24\x24\x24",
15115 .klen = 28,
15116 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15117 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15118 .ilen = 16,
15119 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
15120 "\x24\x24\x24\x24\x24\x24\x24\x24",
15121 .rlen = 16,
15122 }, {
15123 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
15124 "\x25\x25\x25\x25\x25\x25\x25\x25"
15125 "\x25\x25\x25\x25\x25\x25\x25\x25"
15126 "\x25\x25\x25\x25\x25\x25\x25\x25",
15127 .klen = 32,
15128 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15129 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15130 .ilen = 16,
15131 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
15132 "\x25\x25\x25\x25\x25\x25\x25\x25",
15133 .rlen = 16,
15134 }, {
15135 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15136 "\x35\x35\x35\x35\x35\x35\x35\x35"
15137 "\x35\x35\x35\x35\x35\x35\x35\x35"
15138 "\x35\x35\x35\x35\x35\x35\x35\x35"
15139 "\x35\x35\x35\x35\x35\x35\x35\x35",
15140 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15141 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15142 .klen = 40,
15143 .ilen = 16,
15144 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
15145 "\x35\x35\x35\x35\x35\x35\x35\x35",
15146 .rlen = 16,
15147 },
15148};
15149
15150static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
15151 {
15152 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15153 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15154 .klen = 16,
15155 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15156 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15157 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15158 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15159 .ilen = 32,
15160 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15161 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
15162 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
15163 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
15164 .rlen = 32,
15165 }, {
15166 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15167 "\x35\x35\x35\x35\x35\x35\x35\x35"
15168 "\x35\x35\x35\x35\x35\x35\x35\x35"
15169 "\x35\x35\x35\x35\x35\x35\x35\x35"
15170 "\x35\x35\x35\x35\x35\x35\x35\x35",
15171 .klen = 40,
15172 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
15173 "\x35\x35\x35\x35\x35\x35\x35\x35"
15174 "\x35\x35\x35\x35\x35\x35\x35\x35"
15175 "\x35\x35\x35\x35\x35\x35\x35\x35",
15176 .ilen = 32,
15177 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15178 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
15179 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
15180 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
15181 .rlen = 32,
15182 },
15183};
15184
15185static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
15186 {
15187 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15188 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15189 .klen = 16,
15190 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15191 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
15192 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
15193 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
15194 .ilen = 32,
15195 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15196 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15197 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15198 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15199 .rlen = 32,
15200 }, {
15201 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15202 "\x35\x35\x35\x35\x35\x35\x35\x35"
15203 "\x35\x35\x35\x35\x35\x35\x35\x35"
15204 "\x35\x35\x35\x35\x35\x35\x35\x35"
15205 "\x35\x35\x35\x35\x35\x35\x35\x35",
15206 .klen = 40,
15207 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15208 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
15209 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
15210 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
15211 .ilen = 32,
15212 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
15213 "\x35\x35\x35\x35\x35\x35\x35\x35"
15214 "\x35\x35\x35\x35\x35\x35\x35\x35"
15215 "\x35\x35\x35\x35\x35\x35\x35\x35",
15216 .rlen = 32,
15217 },
15218};
15219
15220/*
15221 * XETA test vectors
15222 */
15223#define XETA_ENC_TEST_VECTORS 4
15224#define XETA_DEC_TEST_VECTORS 4
15225
15226static struct cipher_testvec xeta_enc_tv_template[] = {
15227 {
15228 .key = zeroed_string,
15229 .klen = 16,
15230 .input = zeroed_string,
15231 .ilen = 8,
15232 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
15233 .rlen = 8,
15234 }, {
15235 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15236 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15237 .klen = 16,
15238 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15239 .ilen = 8,
15240 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
15241 .rlen = 8,
15242 }, {
15243 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15244 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15245 .klen = 16,
15246 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15247 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15248 .ilen = 16,
15249 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
15250 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
15251 .rlen = 16,
15252 }, {
15253 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15254 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15255 .klen = 16,
15256 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
15257 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15258 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15259 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15260 .ilen = 32,
15261 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
15262 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
15263 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
15264 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
15265 .rlen = 32,
15266 }
15267};
15268
15269static struct cipher_testvec xeta_dec_tv_template[] = {
15270 {
15271 .key = zeroed_string,
15272 .klen = 16,
15273 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
15274 .ilen = 8,
15275 .result = zeroed_string,
15276 .rlen = 8,
15277 }, {
15278 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15279 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15280 .klen = 16,
15281 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
15282 .ilen = 8,
15283 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15284 .rlen = 8,
15285 }, {
15286 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15287 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15288 .klen = 16,
15289 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
15290 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
15291 .ilen = 16,
15292 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15293 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15294 .rlen = 16,
15295 }, {
15296 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15297 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15298 .klen = 16,
15299 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
15300 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
15301 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
15302 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
15303 .ilen = 32,
15304 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
15305 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15306 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15307 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15308 .rlen = 32,
15309 }
15310};
15311
15312/*
15313 * FCrypt test vectors
15314 */
15315#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
15316#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
15317
15318static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
15319 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
15320 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
15321 .klen = 8,
15322 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
15323 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
15324 .ilen = 8,
15325 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
15326 .rlen = 8,
15327 }, {
15328 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
15329 .klen = 8,
15330 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
15331 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
15332 .ilen = 8,
15333 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
15334 .rlen = 8,
15335 }, { /* From Arla */
15336 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15337 .klen = 8,
15338 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15339 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
15340 .ilen = 48,
15341 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
15342 "\xee\xac\x98\x62\x44\x51\xe4\x84"
15343 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
15344 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
15345 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
15346 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
15347 .rlen = 48,
15348 }, {
15349 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15350 .klen = 8,
15351 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15352 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
15353 .ilen = 48,
15354 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
15355 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
15356 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
15357 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
15358 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
15359 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
15360 .rlen = 48,
15361 }, { /* split-page version */
15362 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15363 .klen = 8,
15364 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15365 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
15366 .ilen = 48,
15367 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
15368 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
15369 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
15370 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
15371 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
15372 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
15373 .rlen = 48,
15374 .np = 2,
15375 .tap = { 20, 28 },
15376 }
15377};
15378
15379static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
15380 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
15381 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
15382 .klen = 8,
15383 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
15384 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
15385 .ilen = 8,
15386 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15387 .rlen = 8,
15388 }, {
15389 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
15390 .klen = 8,
15391 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
15392 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
15393 .ilen = 8,
15394 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
15395 .rlen = 8,
15396 }, { /* From Arla */
15397 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15398 .klen = 8,
15399 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15400 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
15401 "\xee\xac\x98\x62\x44\x51\xe4\x84"
15402 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
15403 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
15404 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
15405 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
15406 .ilen = 48,
15407 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
15408 .rlen = 48,
15409 }, {
15410 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15411 .klen = 8,
15412 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15413 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
15414 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
15415 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
15416 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
15417 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
15418 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
15419 .ilen = 48,
15420 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
15421 .rlen = 48,
15422 }, { /* split-page version */
15423 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15424 .klen = 8,
15425 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
15426 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
15427 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
15428 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
15429 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
15430 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
15431 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
15432 .ilen = 48,
15433 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
15434 .rlen = 48,
15435 .np = 2,
15436 .tap = { 20, 28 },
15437 }
15438};
15439
15440/*
15441 * CAMELLIA test vectors.
15442 */
0840605e
JK
15443#define CAMELLIA_ENC_TEST_VECTORS 4
15444#define CAMELLIA_DEC_TEST_VECTORS 4
15445#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
15446#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
15447#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
15448#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
15449#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
15450#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
15451#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
15452#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
da7f033d
HX
15453
15454static struct cipher_testvec camellia_enc_tv_template[] = {
15455 {
15456 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15457 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15458 .klen = 16,
15459 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15460 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15461 .ilen = 16,
15462 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
15463 "\x08\x57\x06\x56\x48\xea\xbe\x43",
15464 .rlen = 16,
15465 }, {
15466 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15467 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
15468 "\x00\x11\x22\x33\x44\x55\x66\x77",
15469 .klen = 24,
15470 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15471 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15472 .ilen = 16,
15473 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
15474 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
15475 .rlen = 16,
15476 }, {
15477 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15478 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
15479 "\x00\x11\x22\x33\x44\x55\x66\x77"
15480 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
15481 .klen = 32,
15482 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15483 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15484 .ilen = 16,
15485 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
15486 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
15487 .rlen = 16,
15488 },
0840605e
JK
15489 { /* Generated with Crypto++ */
15490 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
15491 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
15492 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
15493 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
15494 .klen = 32,
15495 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15496 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15497 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15498 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15499 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15500 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15501 .ilen = 48,
15502 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
15503 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
15504 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
15505 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
15506 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
15507 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
15508 .rlen = 48,
f44d83d1
JK
15509 .also_non_np = 1,
15510 .np = 2,
15511 .tap = { 48 - 16, 16 },
0840605e 15512 },
da7f033d
HX
15513};
15514
15515static struct cipher_testvec camellia_dec_tv_template[] = {
15516 {
15517 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15518 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15519 .klen = 16,
15520 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
15521 "\x08\x57\x06\x56\x48\xea\xbe\x43",
15522 .ilen = 16,
15523 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15524 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15525 .rlen = 16,
15526 }, {
15527 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15528 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
15529 "\x00\x11\x22\x33\x44\x55\x66\x77",
15530 .klen = 24,
15531 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
15532 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
15533 .ilen = 16,
15534 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15535 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15536 .rlen = 16,
15537 }, {
15538 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15539 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
15540 "\x00\x11\x22\x33\x44\x55\x66\x77"
15541 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
15542 .klen = 32,
15543 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
15544 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
15545 .ilen = 16,
15546 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15547 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
15548 .rlen = 16,
15549 },
0840605e
JK
15550 { /* Generated with Crypto++ */
15551 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
15552 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
15553 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
15554 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
15555 .klen = 32,
15556 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
15557 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
15558 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
15559 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
15560 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
15561 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
15562 .ilen = 48,
15563 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15564 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15565 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15566 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15567 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15568 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15569 .rlen = 48,
f44d83d1
JK
15570 .also_non_np = 1,
15571 .np = 2,
15572 .tap = { 48 - 16, 16 },
0840605e 15573 },
da7f033d
HX
15574};
15575
15576static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
15577 {
15578 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15579 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15580 .klen = 16,
15581 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15582 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15583 .input = "Single block msg",
15584 .ilen = 16,
15585 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
15586 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
15587 .rlen = 16,
15588 }, {
15589 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15590 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15591 .klen = 16,
15592 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15593 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15594 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15595 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15596 "\x10\x11\x12\x13\x14\x15\x16\x17"
15597 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15598 .ilen = 32,
15599 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
15600 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
15601 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
15602 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
15603 .rlen = 32,
15604 },
0840605e
JK
15605 { /* Generated with Crypto++ */
15606 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15607 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15608 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15609 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15610 .klen = 32,
15611 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15612 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15613 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15614 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15615 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15616 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15617 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15618 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15619 .ilen = 48,
15620 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
15621 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
15622 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
15623 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
15624 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
15625 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
15626 .rlen = 48,
f44d83d1
JK
15627 .also_non_np = 1,
15628 .np = 2,
15629 .tap = { 48 - 16, 16 },
0840605e 15630 },
da7f033d
HX
15631};
15632
15633static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
15634 {
15635 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15636 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15637 .klen = 16,
15638 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15639 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15640 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
15641 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
15642 .ilen = 16,
15643 .result = "Single block msg",
15644 .rlen = 16,
15645 }, {
15646 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15647 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15648 .klen = 16,
15649 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15650 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15651 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
15652 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
15653 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
15654 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
15655 .ilen = 32,
15656 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15657 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15658 "\x10\x11\x12\x13\x14\x15\x16\x17"
15659 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15660 .rlen = 32,
15661 },
0840605e
JK
15662 { /* Generated with Crypto++ */
15663 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15664 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15665 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15666 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15667 .klen = 32,
15668 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15669 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15670 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
15671 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
15672 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
15673 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
15674 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
15675 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
15676 .ilen = 48,
15677 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15678 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15679 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15680 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15681 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15682 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15683 .rlen = 48,
f44d83d1
JK
15684 .also_non_np = 1,
15685 .np = 2,
15686 .tap = { 48 - 16, 16 },
0840605e
JK
15687 },
15688};
15689
15690static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
15691 { /* Generated with Crypto++ */
15692 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15693 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15694 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15695 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15696 .klen = 32,
15697 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15698 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15699 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15700 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15701 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15702 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15703 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15704 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15705 .ilen = 48,
15706 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
15707 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
15708 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
15709 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
15710 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
15711 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
15712 .rlen = 48,
15713 },
15714 { /* Generated with Crypto++ */
15715 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15716 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15717 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15718 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15719 .klen = 32,
15720 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15721 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15722 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15723 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15724 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15725 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15726 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15727 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15728 "\xDF\x76\x0D",
15729 .ilen = 51,
15730 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
15731 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
15732 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
15733 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
15734 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
15735 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
15736 "\x1E\x43\xEF",
15737 .rlen = 51,
f44d83d1
JK
15738 .also_non_np = 1,
15739 .np = 2,
15740 .tap = { 51 - 16, 16 },
0840605e
JK
15741 },
15742};
15743
15744static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
15745 { /* Generated with Crypto++ */
15746 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15747 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15748 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15749 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15750 .klen = 32,
15751 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15752 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15753 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
15754 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
15755 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
15756 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
15757 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
15758 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
15759 .ilen = 48,
15760 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15761 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15762 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15763 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15764 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15765 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
15766 .rlen = 48,
15767 },
15768 { /* Generated with Crypto++ */
15769 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15770 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
15771 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
15772 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
15773 .klen = 32,
15774 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
15775 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
15776 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
15777 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
15778 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
15779 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
15780 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
15781 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
15782 "\x1E\x43\xEF",
15783 .ilen = 51,
15784 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15785 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15786 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15787 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15788 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15789 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15790 "\xDF\x76\x0D",
15791 .rlen = 51,
f44d83d1
JK
15792 .also_non_np = 1,
15793 .np = 2,
15794 .tap = { 51 - 16, 16 },
0840605e
JK
15795 },
15796
15797};
15798
15799static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
15800 /* Generated from AES-LRW test vectors */
15801 {
15802 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
15803 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
15804 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
15805 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
15806 .klen = 32,
15807 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15808 "\x00\x00\x00\x00\x00\x00\x00\x01",
15809 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15810 "\x38\x39\x41\x42\x43\x44\x45\x46",
15811 .ilen = 16,
15812 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
15813 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
15814 .rlen = 16,
15815 }, {
15816 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
15817 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
15818 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
15819 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
15820 .klen = 32,
15821 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15822 "\x00\x00\x00\x00\x00\x00\x00\x02",
15823 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15824 "\x38\x39\x41\x42\x43\x44\x45\x46",
15825 .ilen = 16,
15826 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
15827 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
15828 .rlen = 16,
15829 }, {
15830 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
15831 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
15832 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
15833 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
15834 .klen = 32,
15835 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15836 "\x00\x00\x00\x02\x00\x00\x00\x00",
15837 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15838 "\x38\x39\x41\x42\x43\x44\x45\x46",
15839 .ilen = 16,
15840 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
15841 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
15842 .rlen = 16,
15843 }, {
15844 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
15845 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
15846 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
15847 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
15848 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
15849 .klen = 40,
15850 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15851 "\x00\x00\x00\x00\x00\x00\x00\x01",
15852 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15853 "\x38\x39\x41\x42\x43\x44\x45\x46",
15854 .ilen = 16,
15855 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
15856 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
15857 .rlen = 16,
15858 }, {
15859 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
15860 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
15861 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
15862 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
15863 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
15864 .klen = 40,
15865 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15866 "\x00\x00\x00\x02\x00\x00\x00\x00",
15867 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15868 "\x38\x39\x41\x42\x43\x44\x45\x46",
15869 .ilen = 16,
15870 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
15871 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
15872 .rlen = 16,
15873 }, {
15874 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
15875 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
15876 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
15877 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
15878 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
15879 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
15880 .klen = 48,
15881 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15882 "\x00\x00\x00\x00\x00\x00\x00\x01",
15883 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15884 "\x38\x39\x41\x42\x43\x44\x45\x46",
15885 .ilen = 16,
15886 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
15887 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
15888 .rlen = 16,
15889 }, {
15890 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
15891 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
15892 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
15893 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
15894 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
15895 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
15896 .klen = 48,
15897 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15898 "\x00\x00\x00\x02\x00\x00\x00\x00",
15899 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
15900 "\x38\x39\x41\x42\x43\x44\x45\x46",
15901 .ilen = 16,
15902 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
15903 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
15904 .rlen = 16,
15905 }, {
15906 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
15907 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
15908 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
15909 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
15910 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
15911 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
15912 .klen = 48,
15913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15914 "\x00\x00\x00\x00\x00\x00\x00\x01",
15915 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
15916 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
15917 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
15918 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
15919 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
15920 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
15921 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
15922 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
15923 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
15924 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
15925 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
15926 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
15927 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
15928 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
15929 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
15930 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
15931 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
15932 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
15933 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
15934 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
15935 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
15936 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
15937 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
15938 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
15939 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
15940 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
15941 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
15942 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
15943 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
15944 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
15945 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
15946 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
15947 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
15948 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
15949 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
15950 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
15951 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
15952 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
15953 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
15954 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
15955 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
15956 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
15957 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
15958 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
15959 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
15960 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
15961 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
15962 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
15963 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
15964 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
15965 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
15966 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
15967 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
15968 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
15969 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
15970 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
15971 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
15972 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
15973 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
15974 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
15975 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
15976 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
15977 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
15978 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
15979 .ilen = 512,
15980 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
15981 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
15982 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
15983 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
15984 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
15985 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
15986 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
15987 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
15988 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
15989 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
15990 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
15991 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
15992 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
15993 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
15994 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
15995 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
15996 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
15997 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
15998 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
15999 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
16000 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
16001 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
16002 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
16003 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
16004 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
16005 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
16006 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
16007 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
16008 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
16009 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
16010 "\xed\x14\xa9\x57\x19\x63\x40\x04"
16011 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
16012 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
16013 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
16014 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
16015 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
16016 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
16017 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
16018 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
16019 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
16020 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
16021 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
16022 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
16023 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
16024 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
16025 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
16026 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
16027 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
16028 "\x35\xa5\x83\x04\x84\x01\x99\x56"
16029 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
16030 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
16031 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
16032 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
16033 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
16034 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
16035 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
16036 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
16037 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
16038 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
16039 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
16040 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
16041 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
16042 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
16043 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
16044 .rlen = 512,
f44d83d1
JK
16045 .also_non_np = 1,
16046 .np = 2,
16047 .tap = { 512 - 16, 16 },
0840605e
JK
16048 },
16049};
16050
16051static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
16052 /* Generated from AES-LRW test vectors */
16053 /* same as enc vectors with input and result reversed */
16054 {
16055 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16056 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16057 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16058 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16059 .klen = 32,
16060 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16061 "\x00\x00\x00\x00\x00\x00\x00\x01",
16062 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
16063 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
16064 .ilen = 16,
16065 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16066 "\x38\x39\x41\x42\x43\x44\x45\x46",
16067 .rlen = 16,
16068 }, {
16069 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16070 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16071 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16072 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16073 .klen = 32,
16074 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16075 "\x00\x00\x00\x00\x00\x00\x00\x02",
16076 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
16077 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
16078 .ilen = 16,
16079 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16080 "\x38\x39\x41\x42\x43\x44\x45\x46",
16081 .rlen = 16,
16082 }, {
16083 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16084 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16085 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16086 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16087 .klen = 32,
16088 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16089 "\x00\x00\x00\x02\x00\x00\x00\x00",
16090 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
16091 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
16092 .ilen = 16,
16093 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16094 "\x38\x39\x41\x42\x43\x44\x45\x46",
16095 .rlen = 16,
16096 }, {
16097 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16098 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16099 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16100 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16101 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16102 .klen = 40,
16103 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16104 "\x00\x00\x00\x00\x00\x00\x00\x01",
16105 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
16106 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
16107 .ilen = 16,
16108 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16109 "\x38\x39\x41\x42\x43\x44\x45\x46",
16110 .rlen = 16,
16111 }, {
16112 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16113 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16114 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16115 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16116 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16117 .klen = 40,
16118 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16119 "\x00\x00\x00\x02\x00\x00\x00\x00",
16120 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
16121 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
16122 .ilen = 16,
16123 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16124 "\x38\x39\x41\x42\x43\x44\x45\x46",
16125 .rlen = 16,
16126 }, {
16127 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16128 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16129 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16130 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16131 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16132 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16133 .klen = 48,
16134 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16135 "\x00\x00\x00\x00\x00\x00\x00\x01",
16136 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
16137 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
16138 .ilen = 16,
16139 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16140 "\x38\x39\x41\x42\x43\x44\x45\x46",
16141 .rlen = 16,
16142 }, {
16143 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16144 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16145 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16146 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16147 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16148 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16149 .klen = 48,
16150 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16151 "\x00\x00\x00\x02\x00\x00\x00\x00",
16152 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
16153 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
16154 .ilen = 16,
16155 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16156 "\x38\x39\x41\x42\x43\x44\x45\x46",
16157 .rlen = 16,
16158 }, {
16159 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16160 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16161 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16162 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16163 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16164 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16165 .klen = 48,
16166 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16167 "\x00\x00\x00\x00\x00\x00\x00\x01",
16168 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
16169 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
16170 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
16171 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
16172 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
16173 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
16174 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
16175 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
16176 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
16177 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
16178 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
16179 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
16180 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
16181 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
16182 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
16183 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
16184 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
16185 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
16186 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
16187 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
16188 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
16189 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
16190 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
16191 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
16192 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
16193 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
16194 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
16195 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
16196 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
16197 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
16198 "\xed\x14\xa9\x57\x19\x63\x40\x04"
16199 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
16200 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
16201 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
16202 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
16203 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
16204 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
16205 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
16206 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
16207 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
16208 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
16209 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
16210 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
16211 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
16212 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
16213 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
16214 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
16215 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
16216 "\x35\xa5\x83\x04\x84\x01\x99\x56"
16217 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
16218 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
16219 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
16220 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
16221 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
16222 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
16223 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
16224 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
16225 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
16226 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
16227 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
16228 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
16229 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
16230 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
16231 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
16232 .ilen = 512,
16233 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16234 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16235 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16236 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16237 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16238 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16239 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16240 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16241 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16242 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16243 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16244 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16245 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16246 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16247 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16248 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16249 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16250 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16251 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16252 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16253 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16254 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16255 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16256 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16257 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16258 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16259 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16260 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16261 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16262 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16263 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16264 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16265 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16266 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16267 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16268 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16269 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16270 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16271 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16272 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16273 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16274 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16275 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16276 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16277 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16278 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16279 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16280 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16281 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16282 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16283 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16284 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16285 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16286 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16287 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16288 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16289 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16290 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16291 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16292 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16293 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16294 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16295 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16296 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16297 .rlen = 512,
f44d83d1
JK
16298 .also_non_np = 1,
16299 .np = 2,
16300 .tap = { 512 - 16, 16 },
0840605e
JK
16301 },
16302};
16303
16304static struct cipher_testvec camellia_xts_enc_tv_template[] = {
16305 /* Generated from AES-XTS test vectors */
16306 {
16307 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
16308 "\x00\x00\x00\x00\x00\x00\x00\x00"
16309 "\x00\x00\x00\x00\x00\x00\x00\x00"
16310 "\x00\x00\x00\x00\x00\x00\x00\x00",
16311 .klen = 32,
16312 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16313 "\x00\x00\x00\x00\x00\x00\x00\x00",
16314 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16315 "\x00\x00\x00\x00\x00\x00\x00\x00"
16316 "\x00\x00\x00\x00\x00\x00\x00\x00"
16317 "\x00\x00\x00\x00\x00\x00\x00\x00",
16318 .ilen = 32,
16319 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
16320 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
16321 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
16322 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
16323 .rlen = 32,
16324 }, {
16325 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
16326 "\x11\x11\x11\x11\x11\x11\x11\x11"
16327 "\x22\x22\x22\x22\x22\x22\x22\x22"
16328 "\x22\x22\x22\x22\x22\x22\x22\x22",
16329 .klen = 32,
16330 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16331 "\x00\x00\x00\x00\x00\x00\x00\x00",
16332 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16333 "\x44\x44\x44\x44\x44\x44\x44\x44"
16334 "\x44\x44\x44\x44\x44\x44\x44\x44"
16335 "\x44\x44\x44\x44\x44\x44\x44\x44",
16336 .ilen = 32,
16337 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
16338 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
16339 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
16340 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
16341 .rlen = 32,
16342 }, {
16343 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
16344 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
16345 "\x22\x22\x22\x22\x22\x22\x22\x22"
16346 "\x22\x22\x22\x22\x22\x22\x22\x22",
16347 .klen = 32,
16348 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16349 "\x00\x00\x00\x00\x00\x00\x00\x00",
16350 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16351 "\x44\x44\x44\x44\x44\x44\x44\x44"
16352 "\x44\x44\x44\x44\x44\x44\x44\x44"
16353 "\x44\x44\x44\x44\x44\x44\x44\x44",
16354 .ilen = 32,
16355 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
16356 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
16357 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
16358 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
16359 .rlen = 32,
16360 }, {
16361 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16362 "\x23\x53\x60\x28\x74\x71\x35\x26"
16363 "\x31\x41\x59\x26\x53\x58\x97\x93"
16364 "\x23\x84\x62\x64\x33\x83\x27\x95",
16365 .klen = 32,
16366 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16367 "\x00\x00\x00\x00\x00\x00\x00\x00",
16368 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16369 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16370 "\x10\x11\x12\x13\x14\x15\x16\x17"
16371 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16372 "\x20\x21\x22\x23\x24\x25\x26\x27"
16373 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16374 "\x30\x31\x32\x33\x34\x35\x36\x37"
16375 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16376 "\x40\x41\x42\x43\x44\x45\x46\x47"
16377 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16378 "\x50\x51\x52\x53\x54\x55\x56\x57"
16379 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16380 "\x60\x61\x62\x63\x64\x65\x66\x67"
16381 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16382 "\x70\x71\x72\x73\x74\x75\x76\x77"
16383 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16384 "\x80\x81\x82\x83\x84\x85\x86\x87"
16385 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16386 "\x90\x91\x92\x93\x94\x95\x96\x97"
16387 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16388 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16389 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16390 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16391 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16392 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16393 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16394 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16395 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16396 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16397 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16398 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16399 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16400 "\x00\x01\x02\x03\x04\x05\x06\x07"
16401 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16402 "\x10\x11\x12\x13\x14\x15\x16\x17"
16403 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16404 "\x20\x21\x22\x23\x24\x25\x26\x27"
16405 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16406 "\x30\x31\x32\x33\x34\x35\x36\x37"
16407 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16408 "\x40\x41\x42\x43\x44\x45\x46\x47"
16409 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16410 "\x50\x51\x52\x53\x54\x55\x56\x57"
16411 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16412 "\x60\x61\x62\x63\x64\x65\x66\x67"
16413 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16414 "\x70\x71\x72\x73\x74\x75\x76\x77"
16415 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16416 "\x80\x81\x82\x83\x84\x85\x86\x87"
16417 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16418 "\x90\x91\x92\x93\x94\x95\x96\x97"
16419 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16420 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16421 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16422 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16423 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16424 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16425 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16426 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16427 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16428 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16429 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16430 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16431 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16432 .ilen = 512,
16433 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
16434 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
16435 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
16436 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
16437 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
16438 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
16439 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
16440 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
16441 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
16442 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
16443 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
16444 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
16445 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
16446 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
16447 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
16448 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
16449 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
16450 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
16451 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
16452 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
16453 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
16454 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
16455 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
16456 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
16457 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
16458 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
16459 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
16460 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
16461 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
16462 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
16463 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
16464 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
16465 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
16466 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
16467 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
16468 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
16469 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
16470 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
16471 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
16472 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
16473 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
16474 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
16475 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
16476 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
16477 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
16478 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
16479 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
16480 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
16481 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
16482 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
16483 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
16484 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
16485 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
16486 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
16487 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
16488 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
16489 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
16490 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
16491 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
16492 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
16493 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
16494 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
16495 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
16496 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
16497 .rlen = 512,
16498 }, {
16499 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16500 "\x23\x53\x60\x28\x74\x71\x35\x26"
16501 "\x62\x49\x77\x57\x24\x70\x93\x69"
16502 "\x99\x59\x57\x49\x66\x96\x76\x27"
16503 "\x31\x41\x59\x26\x53\x58\x97\x93"
16504 "\x23\x84\x62\x64\x33\x83\x27\x95"
16505 "\x02\x88\x41\x97\x16\x93\x99\x37"
16506 "\x51\x05\x82\x09\x74\x94\x45\x92",
16507 .klen = 64,
16508 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
16509 "\x00\x00\x00\x00\x00\x00\x00\x00",
16510 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16511 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16512 "\x10\x11\x12\x13\x14\x15\x16\x17"
16513 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16514 "\x20\x21\x22\x23\x24\x25\x26\x27"
16515 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16516 "\x30\x31\x32\x33\x34\x35\x36\x37"
16517 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16518 "\x40\x41\x42\x43\x44\x45\x46\x47"
16519 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16520 "\x50\x51\x52\x53\x54\x55\x56\x57"
16521 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16522 "\x60\x61\x62\x63\x64\x65\x66\x67"
16523 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16524 "\x70\x71\x72\x73\x74\x75\x76\x77"
16525 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16526 "\x80\x81\x82\x83\x84\x85\x86\x87"
16527 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16528 "\x90\x91\x92\x93\x94\x95\x96\x97"
16529 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16530 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16531 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16532 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16533 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16534 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16535 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16536 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16537 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16538 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16539 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16540 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16541 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16542 "\x00\x01\x02\x03\x04\x05\x06\x07"
16543 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16544 "\x10\x11\x12\x13\x14\x15\x16\x17"
16545 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16546 "\x20\x21\x22\x23\x24\x25\x26\x27"
16547 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16548 "\x30\x31\x32\x33\x34\x35\x36\x37"
16549 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16550 "\x40\x41\x42\x43\x44\x45\x46\x47"
16551 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16552 "\x50\x51\x52\x53\x54\x55\x56\x57"
16553 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16554 "\x60\x61\x62\x63\x64\x65\x66\x67"
16555 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16556 "\x70\x71\x72\x73\x74\x75\x76\x77"
16557 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16558 "\x80\x81\x82\x83\x84\x85\x86\x87"
16559 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16560 "\x90\x91\x92\x93\x94\x95\x96\x97"
16561 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16562 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16563 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16564 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16565 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16566 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16567 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16568 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16569 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16570 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16571 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16572 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16573 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16574 .ilen = 512,
16575 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
16576 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
16577 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
16578 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
16579 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
16580 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
16581 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
16582 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
16583 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
16584 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
16585 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
16586 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
16587 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
16588 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
16589 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
16590 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
16591 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
16592 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
16593 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
16594 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
16595 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
16596 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
16597 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
16598 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
16599 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
16600 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
16601 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
16602 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
16603 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
16604 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
16605 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
16606 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
16607 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
16608 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
16609 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
16610 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
16611 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
16612 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
16613 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
16614 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
16615 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
16616 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
16617 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
16618 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
16619 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
16620 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
16621 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
16622 "\x21\x17\xf8\x59\x15\x24\x64\x22"
16623 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
16624 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
16625 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
16626 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
16627 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
16628 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
16629 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
16630 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
16631 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
16632 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
16633 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
16634 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
16635 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
16636 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
16637 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
16638 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
16639 .rlen = 512,
f44d83d1
JK
16640 .also_non_np = 1,
16641 .np = 2,
16642 .tap = { 512 - 16, 16 },
0840605e
JK
16643 },
16644};
16645
16646static struct cipher_testvec camellia_xts_dec_tv_template[] = {
16647 /* Generated from AES-XTS test vectors */
16648 /* same as enc vectors with input and result reversed */
16649 {
16650 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
16651 "\x00\x00\x00\x00\x00\x00\x00\x00"
16652 "\x00\x00\x00\x00\x00\x00\x00\x00"
16653 "\x00\x00\x00\x00\x00\x00\x00\x00",
16654 .klen = 32,
16655 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16656 "\x00\x00\x00\x00\x00\x00\x00\x00",
16657 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
16658 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
16659 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
16660 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
16661 .ilen = 32,
16662 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
16663 "\x00\x00\x00\x00\x00\x00\x00\x00"
16664 "\x00\x00\x00\x00\x00\x00\x00\x00"
16665 "\x00\x00\x00\x00\x00\x00\x00\x00",
16666 .rlen = 32,
16667 }, {
16668 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
16669 "\x11\x11\x11\x11\x11\x11\x11\x11"
16670 "\x22\x22\x22\x22\x22\x22\x22\x22"
16671 "\x22\x22\x22\x22\x22\x22\x22\x22",
16672 .klen = 32,
16673 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16674 "\x00\x00\x00\x00\x00\x00\x00\x00",
16675 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
16676 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
16677 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
16678 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
16679 .ilen = 32,
16680 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
16681 "\x44\x44\x44\x44\x44\x44\x44\x44"
16682 "\x44\x44\x44\x44\x44\x44\x44\x44"
16683 "\x44\x44\x44\x44\x44\x44\x44\x44",
16684 .rlen = 32,
16685 }, {
16686 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
16687 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
16688 "\x22\x22\x22\x22\x22\x22\x22\x22"
16689 "\x22\x22\x22\x22\x22\x22\x22\x22",
16690 .klen = 32,
16691 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16692 "\x00\x00\x00\x00\x00\x00\x00\x00",
16693 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
16694 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
16695 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
16696 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
16697 .ilen = 32,
16698 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
16699 "\x44\x44\x44\x44\x44\x44\x44\x44"
16700 "\x44\x44\x44\x44\x44\x44\x44\x44"
16701 "\x44\x44\x44\x44\x44\x44\x44\x44",
16702 .rlen = 32,
16703 }, {
16704 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16705 "\x23\x53\x60\x28\x74\x71\x35\x26"
16706 "\x31\x41\x59\x26\x53\x58\x97\x93"
16707 "\x23\x84\x62\x64\x33\x83\x27\x95",
16708 .klen = 32,
16709 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16710 "\x00\x00\x00\x00\x00\x00\x00\x00",
16711 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
16712 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
16713 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
16714 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
16715 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
16716 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
16717 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
16718 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
16719 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
16720 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
16721 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
16722 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
16723 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
16724 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
16725 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
16726 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
16727 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
16728 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
16729 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
16730 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
16731 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
16732 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
16733 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
16734 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
16735 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
16736 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
16737 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
16738 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
16739 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
16740 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
16741 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
16742 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
16743 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
16744 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
16745 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
16746 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
16747 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
16748 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
16749 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
16750 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
16751 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
16752 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
16753 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
16754 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
16755 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
16756 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
16757 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
16758 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
16759 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
16760 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
16761 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
16762 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
16763 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
16764 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
16765 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
16766 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
16767 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
16768 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
16769 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
16770 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
16771 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
16772 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
16773 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
16774 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
16775 .ilen = 512,
16776 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
16777 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16778 "\x10\x11\x12\x13\x14\x15\x16\x17"
16779 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16780 "\x20\x21\x22\x23\x24\x25\x26\x27"
16781 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16782 "\x30\x31\x32\x33\x34\x35\x36\x37"
16783 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16784 "\x40\x41\x42\x43\x44\x45\x46\x47"
16785 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16786 "\x50\x51\x52\x53\x54\x55\x56\x57"
16787 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16788 "\x60\x61\x62\x63\x64\x65\x66\x67"
16789 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16790 "\x70\x71\x72\x73\x74\x75\x76\x77"
16791 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16792 "\x80\x81\x82\x83\x84\x85\x86\x87"
16793 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16794 "\x90\x91\x92\x93\x94\x95\x96\x97"
16795 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16796 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16797 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16798 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16799 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16800 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16801 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16802 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16803 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16804 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16805 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16806 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16807 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16808 "\x00\x01\x02\x03\x04\x05\x06\x07"
16809 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16810 "\x10\x11\x12\x13\x14\x15\x16\x17"
16811 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16812 "\x20\x21\x22\x23\x24\x25\x26\x27"
16813 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16814 "\x30\x31\x32\x33\x34\x35\x36\x37"
16815 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16816 "\x40\x41\x42\x43\x44\x45\x46\x47"
16817 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16818 "\x50\x51\x52\x53\x54\x55\x56\x57"
16819 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16820 "\x60\x61\x62\x63\x64\x65\x66\x67"
16821 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16822 "\x70\x71\x72\x73\x74\x75\x76\x77"
16823 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16824 "\x80\x81\x82\x83\x84\x85\x86\x87"
16825 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16826 "\x90\x91\x92\x93\x94\x95\x96\x97"
16827 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16828 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16829 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16830 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16831 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16832 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16833 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16834 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16835 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16836 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16837 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16838 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16839 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16840 .rlen = 512,
16841 }, {
16842 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16843 "\x23\x53\x60\x28\x74\x71\x35\x26"
16844 "\x62\x49\x77\x57\x24\x70\x93\x69"
16845 "\x99\x59\x57\x49\x66\x96\x76\x27"
16846 "\x31\x41\x59\x26\x53\x58\x97\x93"
16847 "\x23\x84\x62\x64\x33\x83\x27\x95"
16848 "\x02\x88\x41\x97\x16\x93\x99\x37"
16849 "\x51\x05\x82\x09\x74\x94\x45\x92",
16850 .klen = 64,
16851 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
16852 "\x00\x00\x00\x00\x00\x00\x00\x00",
16853 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
16854 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
16855 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
16856 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
16857 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
16858 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
16859 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
16860 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
16861 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
16862 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
16863 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
16864 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
16865 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
16866 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
16867 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
16868 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
16869 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
16870 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
16871 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
16872 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
16873 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
16874 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
16875 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
16876 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
16877 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
16878 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
16879 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
16880 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
16881 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
16882 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
16883 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
16884 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
16885 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
16886 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
16887 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
16888 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
16889 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
16890 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
16891 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
16892 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
16893 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
16894 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
16895 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
16896 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
16897 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
16898 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
16899 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
16900 "\x21\x17\xf8\x59\x15\x24\x64\x22"
16901 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
16902 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
16903 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
16904 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
16905 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
16906 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
16907 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
16908 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
16909 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
16910 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
16911 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
16912 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
16913 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
16914 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
16915 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
16916 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
16917 .ilen = 512,
16918 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
16919 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16920 "\x10\x11\x12\x13\x14\x15\x16\x17"
16921 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16922 "\x20\x21\x22\x23\x24\x25\x26\x27"
16923 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16924 "\x30\x31\x32\x33\x34\x35\x36\x37"
16925 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16926 "\x40\x41\x42\x43\x44\x45\x46\x47"
16927 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16928 "\x50\x51\x52\x53\x54\x55\x56\x57"
16929 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16930 "\x60\x61\x62\x63\x64\x65\x66\x67"
16931 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16932 "\x70\x71\x72\x73\x74\x75\x76\x77"
16933 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16934 "\x80\x81\x82\x83\x84\x85\x86\x87"
16935 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16936 "\x90\x91\x92\x93\x94\x95\x96\x97"
16937 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16938 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16939 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16940 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16941 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16942 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16943 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16944 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16945 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16946 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16947 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16948 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16949 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16950 "\x00\x01\x02\x03\x04\x05\x06\x07"
16951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16952 "\x10\x11\x12\x13\x14\x15\x16\x17"
16953 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16954 "\x20\x21\x22\x23\x24\x25\x26\x27"
16955 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16956 "\x30\x31\x32\x33\x34\x35\x36\x37"
16957 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16958 "\x40\x41\x42\x43\x44\x45\x46\x47"
16959 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16960 "\x50\x51\x52\x53\x54\x55\x56\x57"
16961 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16962 "\x60\x61\x62\x63\x64\x65\x66\x67"
16963 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16964 "\x70\x71\x72\x73\x74\x75\x76\x77"
16965 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16966 "\x80\x81\x82\x83\x84\x85\x86\x87"
16967 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16968 "\x90\x91\x92\x93\x94\x95\x96\x97"
16969 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16970 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16971 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16972 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16973 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16974 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16975 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16976 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16977 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16978 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16979 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16980 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16981 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16982 .rlen = 512,
f44d83d1
JK
16983 .also_non_np = 1,
16984 .np = 2,
16985 .tap = { 512 - 16, 16 },
0840605e 16986 },
da7f033d
HX
16987};
16988
16989/*
16990 * SEED test vectors
16991 */
16992#define SEED_ENC_TEST_VECTORS 4
16993#define SEED_DEC_TEST_VECTORS 4
16994
16995static struct cipher_testvec seed_enc_tv_template[] = {
16996 {
16997 .key = zeroed_string,
16998 .klen = 16,
16999 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17000 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17001 .ilen = 16,
17002 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
17003 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
17004 .rlen = 16,
17005 }, {
17006 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
17007 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17008 .klen = 16,
17009 .input = zeroed_string,
17010 .ilen = 16,
17011 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
17012 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
17013 .rlen = 16,
17014 }, {
17015 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
17016 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
17017 .klen = 16,
17018 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
17019 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
17020 .ilen = 16,
17021 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
17022 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
17023 .rlen = 16,
17024 }, {
17025 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
17026 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
17027 .klen = 16,
17028 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
17029 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
17030 .ilen = 16,
17031 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
17032 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
17033 .rlen = 16,
17034 }
17035};
17036
17037static struct cipher_testvec seed_dec_tv_template[] = {
17038 {
17039 .key = zeroed_string,
17040 .klen = 16,
17041 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
17042 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
17043 .ilen = 16,
17044 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17045 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17046 .rlen = 16,
17047 }, {
17048 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
17049 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17050 .klen = 16,
17051 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
17052 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
17053 .ilen = 16,
17054 .result = zeroed_string,
17055 .rlen = 16,
17056 }, {
17057 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
17058 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
17059 .klen = 16,
17060 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
17061 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
17062 .ilen = 16,
17063 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
17064 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
17065 .rlen = 16,
17066 }, {
17067 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
17068 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
17069 .klen = 16,
17070 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
17071 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
17072 .ilen = 16,
17073 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
17074 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
17075 .rlen = 16,
17076 }
17077};
17078
17079#define SALSA20_STREAM_ENC_TEST_VECTORS 5
17080static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
17081 /*
17082 * Testvectors from verified.test-vectors submitted to ECRYPT.
17083 * They are truncated to size 39, 64, 111, 129 to test a variety
17084 * of input length.
17085 */
17086 { /* Set 3, vector 0 */
17087 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
17088 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
17089 .klen = 16,
17090 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17091 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17092 "\x00\x00\x00\x00\x00\x00\x00\x00"
17093 "\x00\x00\x00\x00\x00\x00\x00\x00"
17094 "\x00\x00\x00\x00\x00\x00\x00\x00"
17095 "\x00\x00\x00\x00\x00\x00\x00",
17096 .ilen = 39,
17097 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
17098 "\x68\x02\x41\x0C\x68\x86\x88\x89"
17099 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
17100 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
17101 "\x58\x3F\x52\x79\x70\xEB\xC1",
17102 .rlen = 39,
17103 }, { /* Set 5, vector 0 */
17104 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17105 "\x00\x00\x00\x00\x00\x00\x00\x00",
17106 .klen = 16,
17107 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
17108 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17109 "\x00\x00\x00\x00\x00\x00\x00\x00"
17110 "\x00\x00\x00\x00\x00\x00\x00\x00"
17111 "\x00\x00\x00\x00\x00\x00\x00\x00"
17112 "\x00\x00\x00\x00\x00\x00\x00\x00"
17113 "\x00\x00\x00\x00\x00\x00\x00\x00"
17114 "\x00\x00\x00\x00\x00\x00\x00\x00"
17115 "\x00\x00\x00\x00\x00\x00\x00\x00",
17116 .ilen = 64,
17117 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
17118 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
17119 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
17120 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
17121 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
17122 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
17123 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
17124 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
17125 .rlen = 64,
17126 }, { /* Set 3, vector 27 */
17127 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
17128 "\x23\x24\x25\x26\x27\x28\x29\x2A"
17129 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
17130 "\x33\x34\x35\x36\x37\x38\x39\x3A",
17131 .klen = 32,
17132 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17133 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17134 "\x00\x00\x00\x00\x00\x00\x00\x00"
17135 "\x00\x00\x00\x00\x00\x00\x00\x00"
17136 "\x00\x00\x00\x00\x00\x00\x00\x00"
17137 "\x00\x00\x00\x00\x00\x00\x00\x00"
17138 "\x00\x00\x00\x00\x00\x00\x00\x00"
17139 "\x00\x00\x00\x00\x00\x00\x00\x00"
17140 "\x00\x00\x00\x00\x00\x00\x00\x00"
17141 "\x00\x00\x00\x00\x00\x00\x00\x00"
17142 "\x00\x00\x00\x00\x00\x00\x00\x00"
17143 "\x00\x00\x00\x00\x00\x00\x00\x00"
17144 "\x00\x00\x00\x00\x00\x00\x00\x00"
17145 "\x00\x00\x00\x00\x00\x00\x00\x00"
17146 "\x00\x00\x00\x00\x00\x00\x00",
17147 .ilen = 111,
17148 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
17149 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
17150 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
17151 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
17152 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
17153 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
17154 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
17155 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
17156 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
17157 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
17158 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
17159 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
17160 "\x95\x46\x45\x54\xE9\x75\x03\x08"
17161 "\x44\xAF\xE5\x8A\x81\x12\x09",
17162 .rlen = 111,
17163 }, { /* Set 5, vector 27 */
17164 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17165 "\x00\x00\x00\x00\x00\x00\x00\x00"
17166 "\x00\x00\x00\x00\x00\x00\x00\x00"
17167 "\x00\x00\x00\x00\x00\x00\x00\x00",
17168 .klen = 32,
17169 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
17170 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
17171 "\x00\x00\x00\x00\x00\x00\x00\x00"
17172 "\x00\x00\x00\x00\x00\x00\x00\x00"
17173 "\x00\x00\x00\x00\x00\x00\x00\x00"
17174 "\x00\x00\x00\x00\x00\x00\x00\x00"
17175 "\x00\x00\x00\x00\x00\x00\x00\x00"
17176 "\x00\x00\x00\x00\x00\x00\x00\x00"
17177 "\x00\x00\x00\x00\x00\x00\x00\x00"
17178 "\x00\x00\x00\x00\x00\x00\x00\x00"
17179 "\x00\x00\x00\x00\x00\x00\x00\x00"
17180 "\x00\x00\x00\x00\x00\x00\x00\x00"
17181 "\x00\x00\x00\x00\x00\x00\x00\x00"
17182 "\x00\x00\x00\x00\x00\x00\x00\x00"
17183 "\x00\x00\x00\x00\x00\x00\x00\x00"
17184 "\x00\x00\x00\x00\x00\x00\x00\x00"
17185 "\x00\x00\x00\x00\x00\x00\x00\x00"
17186 "\x00",
17187 .ilen = 129,
17188 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
17189 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
17190 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
17191 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
17192 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
17193 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
17194 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
17195 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
17196 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
17197 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
17198 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
17199 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
17200 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
17201 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
17202 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
17203 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
17204 "\x5A",
17205 .rlen = 129,
17206 }, { /* large test vector generated using Crypto++ */
17207 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
17208 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17209 "\x10\x11\x12\x13\x14\x15\x16\x17"
17210 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17211 .klen = 32,
17212 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17213 "\x00\x00\x00\x00\x00\x00\x00\x00",
17214 .input =
17215 "\x00\x01\x02\x03\x04\x05\x06\x07"
17216 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17217 "\x10\x11\x12\x13\x14\x15\x16\x17"
17218 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17219 "\x20\x21\x22\x23\x24\x25\x26\x27"
17220 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17221 "\x30\x31\x32\x33\x34\x35\x36\x37"
17222 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17223 "\x40\x41\x42\x43\x44\x45\x46\x47"
17224 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17225 "\x50\x51\x52\x53\x54\x55\x56\x57"
17226 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17227 "\x60\x61\x62\x63\x64\x65\x66\x67"
17228 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17229 "\x70\x71\x72\x73\x74\x75\x76\x77"
17230 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17231 "\x80\x81\x82\x83\x84\x85\x86\x87"
17232 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17233 "\x90\x91\x92\x93\x94\x95\x96\x97"
17234 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17235 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17236 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17237 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17238 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17239 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17240 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17241 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17242 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17243 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17244 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17245 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17246 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17247 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
17248 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
17249 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
17250 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
17251 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
17252 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
17253 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
17254 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
17255 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
17256 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
17257 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
17258 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
17259 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
17260 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
17261 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
17262 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
17263 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
17264 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
17265 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
17266 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
17267 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
17268 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
17269 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
17270 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
17271 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
17272 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
17273 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
17274 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
17275 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
17276 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
17277 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
17278 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
17279 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
17280 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
17281 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
17282 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
17283 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
17284 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
17285 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
17286 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
17287 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
17288 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
17289 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
17290 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
17291 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
17292 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
17293 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
17294 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
17295 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
17296 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
17297 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
17298 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
17299 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
17300 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
17301 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
17302 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
17303 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
17304 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
17305 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
17306 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
17307 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
17308 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
17309 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
17310 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
17311 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
17312 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
17313 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
17314 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
17315 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
17316 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
17317 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
17318 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
17319 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
17320 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
17321 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
17322 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
17323 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
17324 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
17325 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
17326 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
17327 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
17328 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
17329 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
17330 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
17331 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
17332 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
17333 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
17334 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
17335 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
17336 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
17337 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
17338 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
17339 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
17340 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
17341 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
17342 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
17343 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
17344 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
17345 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
17346 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
17347 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
17348 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
17349 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
17350 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
17351 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
17352 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
17353 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
17354 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
17355 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
17356 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
17357 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
17358 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
17359 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
17360 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
17361 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
17362 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
17363 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
17364 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
17365 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
17366 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
17367 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
17368 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
17369 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
17370 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
17371 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
17372 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
17373 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
17374 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
17375 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
17376 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
17377 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
17378 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
17379 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
17380 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
17381 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
17382 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
17383 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
17384 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
17385 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
17386 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
17387 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
17388 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
17389 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
17390 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
17391 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
17392 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
17393 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
17394 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
17395 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
17396 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
17397 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
17398 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
17399 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
17400 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
17401 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
17402 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
17403 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
17404 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
17405 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
17406 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
17407 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
17408 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
17409 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
17410 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
17411 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
17412 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
17413 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
17414 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
17415 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
17416 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
17417 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
17418 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
17419 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
17420 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
17421 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
17422 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
17423 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
17424 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
17425 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
17426 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
17427 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
17428 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
17429 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
17430 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
17431 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
17432 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
17433 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
17434 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
17435 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
17436 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
17437 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
17438 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
17439 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
17440 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
17441 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
17442 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
17443 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
17444 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
17445 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
17446 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
17447 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
17448 "\x38\x47\x56\x65\x74\x83\x92\xa1"
17449 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
17450 "\x28\x37\x46\x55\x64\x73\x82\x91"
17451 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
17452 "\x18\x27\x36\x45\x54\x63\x72\x81"
17453 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
17454 "\x08\x17\x26\x35\x44\x53\x62\x71"
17455 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
17456 "\xf8\x07\x16\x25\x34\x43\x52\x61"
17457 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
17458 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
17459 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
17460 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
17461 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
17462 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
17463 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
17464 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
17465 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
17466 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
17467 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
17468 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
17469 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
17470 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
17471 "\x00\x11\x22\x33\x44\x55\x66\x77"
17472 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
17473 "\x10\x21\x32\x43\x54\x65\x76\x87"
17474 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
17475 "\x20\x31\x42\x53\x64\x75\x86\x97"
17476 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
17477 "\x30\x41\x52\x63\x74\x85\x96\xa7"
17478 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
17479 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
17480 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
17481 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
17482 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
17483 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
17484 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
17485 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
17486 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
17487 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
17488 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
17489 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
17490 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
17491 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
17492 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
17493 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
17494 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
17495 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
17496 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
17497 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
17498 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
17499 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
17500 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
17501 "\xf0\x01\x12\x23\x34\x45\x56\x67"
17502 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
17503 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
17504 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
17505 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
17506 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
17507 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
17508 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
17509 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
17510 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
17511 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
17512 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
17513 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
17514 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
17515 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
17516 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
17517 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
17518 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
17519 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
17520 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
17521 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
17522 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
17523 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
17524 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
17525 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
17526 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
17527 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
17528 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
17529 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
17530 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
17531 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
17532 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
17533 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
17534 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
17535 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
17536 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
17537 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
17538 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
17539 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
17540 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
17541 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
17542 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
17543 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
17544 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
17545 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
17546 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
17547 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
17548 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
17549 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
17550 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
17551 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
17552 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
17553 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
17554 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
17555 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
17556 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
17557 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
17558 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
17559 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
17560 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
17561 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
17562 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
17563 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
17564 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
17565 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
17566 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
17567 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
17568 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
17569 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
17570 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
17571 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
17572 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
17573 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
17574 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
17575 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
17576 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
17577 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
17578 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
17579 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
17580 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
17581 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
17582 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
17583 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
17584 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
17585 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
17586 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
17587 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
17588 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
17589 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
17590 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
17591 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
17592 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
17593 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
17594 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
17595 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
17596 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
17597 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
17598 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
17599 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
17600 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
17601 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
17602 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
17603 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
17604 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
17605 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
17606 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
17607 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
17608 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
17609 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
17610 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
17611 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
17612 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
17613 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
17614 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
17615 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
17616 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
17617 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
17618 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
17619 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
17620 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
17621 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
17622 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
17623 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
17624 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
17625 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
17626 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
17627 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
17628 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
17629 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
17630 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
17631 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
17632 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
17633 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
17634 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
17635 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
17636 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
17637 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
17638 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
17639 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
17640 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
17641 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
17642 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
17643 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
17644 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
17645 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
17646 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
17647 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
17648 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
17649 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
17650 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
17651 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
17652 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
17653 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
17654 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
17655 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
17656 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
17657 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
17658 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
17659 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
17660 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
17661 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
17662 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
17663 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
17664 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
17665 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
17666 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
17667 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
17668 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
17669 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
17670 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
17671 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
17672 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
17673 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
17674 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
17675 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
17676 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
17677 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
17678 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
17679 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
17680 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
17681 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
17682 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
17683 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
17684 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
17685 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
17686 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
17687 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
17688 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
17689 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
17690 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
17691 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
17692 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
17693 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
17694 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
17695 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
17696 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
17697 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
17698 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
17699 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
17700 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
17701 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
17702 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
17703 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
17704 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
17705 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
17706 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
17707 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
17708 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
17709 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
17710 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
17711 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
17712 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
17713 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
17714 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
17715 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
17716 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
17717 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
17718 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
17719 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
17720 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
17721 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
17722 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
17723 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
17724 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
17725 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
17726 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
17727 "\x00\x21\x42\x63",
17728 .ilen = 4100,
17729 .result =
17730 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
17731 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
17732 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
17733 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
17734 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
17735 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
17736 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
17737 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
17738 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
17739 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
17740 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
17741 "\xbb\xde\x56\x86\xab\x65\x21\x30"
17742 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
17743 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
17744 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
17745 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
17746 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
17747 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
17748 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
17749 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
17750 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
17751 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
17752 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
17753 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
17754 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
17755 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
17756 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
17757 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
17758 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
17759 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
17760 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
17761 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
17762 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
17763 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
17764 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
17765 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
17766 "\x62\x08\x18\x7a\x25\x49\x28\xac"
17767 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
17768 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
17769 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
17770 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
17771 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
17772 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
17773 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
17774 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
17775 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
17776 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
17777 "\x33\xee\x14\x19\x22\x52\x89\xa7"
17778 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
17779 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
17780 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
17781 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
17782 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
17783 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
17784 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
17785 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
17786 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
17787 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
17788 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
17789 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
17790 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
17791 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
17792 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
17793 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
17794 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
17795 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
17796 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
17797 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
17798 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
17799 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
17800 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
17801 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
17802 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
17803 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
17804 "\x49\x97\x33\xab\x36\x14\x0a\x70"
17805 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
17806 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
17807 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
17808 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
17809 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
17810 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
17811 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
17812 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
17813 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
17814 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
17815 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
17816 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
17817 "\xad\x04\x07\xae\x22\x90\x4a\x93"
17818 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
17819 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
17820 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
17821 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
17822 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
17823 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
17824 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
17825 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
17826 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
17827 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
17828 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
17829 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
17830 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
17831 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
17832 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
17833 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
17834 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
17835 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
17836 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
17837 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
17838 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
17839 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
17840 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
17841 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
17842 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
17843 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
17844 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
17845 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
17846 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
17847 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
17848 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
17849 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
17850 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
17851 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
17852 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
17853 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
17854 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
17855 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
17856 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
17857 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
17858 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
17859 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
17860 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
17861 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
17862 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
17863 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
17864 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
17865 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
17866 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
17867 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
17868 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
17869 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
17870 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
17871 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
17872 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
17873 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
17874 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
17875 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
17876 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
17877 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
17878 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
17879 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
17880 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
17881 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
17882 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
17883 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
17884 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
17885 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
17886 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
17887 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
17888 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
17889 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
17890 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
17891 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
17892 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
17893 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
17894 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
17895 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
17896 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
17897 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
17898 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
17899 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
17900 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
17901 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
17902 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
17903 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
17904 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
17905 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
17906 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
17907 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
17908 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
17909 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
17910 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
17911 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
17912 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
17913 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
17914 "\x2e\x53\x49\x97\x94\x33\xae\x40"
17915 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
17916 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
17917 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
17918 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
17919 "\xce\x87\xad\xcc\x72\x05\x00\x29"
17920 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
17921 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
17922 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
17923 "\xac\xc0\x79\x50\x69\xca\x59\x32"
17924 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
17925 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
17926 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
17927 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
17928 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
17929 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
17930 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
17931 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
17932 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
17933 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
17934 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
17935 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
17936 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
17937 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
17938 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
17939 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
17940 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
17941 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
17942 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
17943 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
17944 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
17945 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
17946 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
17947 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
17948 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
17949 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
17950 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
17951 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
17952 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
17953 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
17954 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
17955 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
17956 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
17957 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
17958 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
17959 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
17960 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
17961 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
17962 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
17963 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
17964 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
17965 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
17966 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
17967 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
17968 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
17969 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
17970 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
17971 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
17972 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
17973 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
17974 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
17975 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
17976 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
17977 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
17978 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
17979 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
17980 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
17981 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
17982 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
17983 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
17984 "\x38\x55\xab\x33\x26\xef\x9f\x43"
17985 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
17986 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
17987 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
17988 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
17989 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
17990 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
17991 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
17992 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
17993 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
17994 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
17995 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
17996 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
17997 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
17998 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
17999 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
18000 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
18001 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
18002 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
18003 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
18004 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
18005 "\x62\x36\x43\xb2\x82\x15\x75\x50"
18006 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
18007 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
18008 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
18009 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
18010 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
18011 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
18012 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
18013 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
18014 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
18015 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
18016 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
18017 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
18018 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
18019 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
18020 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
18021 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
18022 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
18023 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
18024 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
18025 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
18026 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
18027 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
18028 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
18029 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
18030 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
18031 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
18032 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
18033 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
18034 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
18035 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
18036 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
18037 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
18038 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
18039 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
18040 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
18041 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
18042 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
18043 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
18044 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
18045 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
18046 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
18047 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
18048 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
18049 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
18050 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
18051 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
18052 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
18053 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
18054 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
18055 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
18056 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
18057 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
18058 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
18059 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
18060 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
18061 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
18062 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
18063 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
18064 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
18065 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
18066 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
18067 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
18068 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
18069 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
18070 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
18071 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
18072 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
18073 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
18074 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
18075 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
18076 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
18077 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
18078 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
18079 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
18080 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
18081 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
18082 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
18083 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
18084 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
18085 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
18086 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
18087 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
18088 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
18089 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
18090 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
18091 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
18092 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
18093 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
18094 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
18095 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
18096 "\x73\x2e\x71\x79\x16\x06\x63\x28"
18097 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
18098 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
18099 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
18100 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
18101 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
18102 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
18103 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
18104 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
18105 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
18106 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
18107 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
18108 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
18109 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
18110 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
18111 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
18112 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
18113 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
18114 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
18115 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
18116 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
18117 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
18118 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
18119 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
18120 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
18121 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
18122 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
18123 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
18124 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
18125 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
18126 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
18127 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
18128 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
18129 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
18130 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
18131 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
18132 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
18133 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
18134 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
18135 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
18136 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
18137 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
18138 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
18139 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
18140 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
18141 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
18142 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
18143 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
18144 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
18145 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
18146 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
18147 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
18148 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
18149 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
18150 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
18151 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
18152 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
18153 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
18154 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
18155 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
18156 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
18157 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
18158 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
18159 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
18160 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
18161 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
18162 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
18163 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
18164 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
18165 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
18166 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
18167 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
18168 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
18169 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
18170 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
18171 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
18172 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
18173 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
18174 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
18175 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
18176 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
18177 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
18178 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
18179 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
18180 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
18181 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
18182 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
18183 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
18184 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
18185 "\x85\x73\x78\x45\x20\x7f\xae\x13"
18186 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
18187 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
18188 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
18189 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
18190 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
18191 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
18192 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
18193 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
18194 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
18195 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
18196 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
18197 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
18198 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
18199 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
18200 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
18201 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
18202 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
18203 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
18204 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
18205 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
18206 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
18207 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
18208 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
18209 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
18210 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
18211 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
18212 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
18213 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
18214 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
18215 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
18216 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
18217 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
18218 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
18219 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
18220 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
18221 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
18222 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
18223 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
18224 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
18225 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
18226 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
18227 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
18228 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
18229 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
18230 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
18231 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
18232 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
18233 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
18234 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
18235 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
18236 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
18237 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
18238 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
18239 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
18240 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
18241 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
18242 "\xaf\xdf\x11\x95",
18243 .rlen = 4100,
18244 .np = 2,
18245 .tap = { 4064, 36 },
18246 },
18247};
18248
18249/*
18250 * CTS (Cipher Text Stealing) mode tests
18251 */
18252#define CTS_MODE_ENC_TEST_VECTORS 6
18253#define CTS_MODE_DEC_TEST_VECTORS 6
18254static struct cipher_testvec cts_mode_enc_tv_template[] = {
18255 { /* from rfc3962 */
18256 .klen = 16,
18257 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18258 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18259 .ilen = 17,
18260 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18261 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18262 "\x20",
18263 .rlen = 17,
18264 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
18265 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
18266 "\x97",
18267 }, {
18268 .klen = 16,
18269 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18270 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18271 .ilen = 31,
18272 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18273 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18274 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18275 "\x20\x47\x61\x75\x27\x73\x20",
18276 .rlen = 31,
18277 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
18278 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
18279 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18280 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
18281 }, {
18282 .klen = 16,
18283 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18284 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18285 .ilen = 32,
18286 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18287 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18288 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18289 "\x20\x47\x61\x75\x27\x73\x20\x43",
18290 .rlen = 32,
18291 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18292 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
18293 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18294 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
18295 }, {
18296 .klen = 16,
18297 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18298 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18299 .ilen = 47,
18300 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18301 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18302 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18303 "\x20\x47\x61\x75\x27\x73\x20\x43"
18304 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18305 "\x70\x6c\x65\x61\x73\x65\x2c",
18306 .rlen = 47,
18307 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18308 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18309 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
18310 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
18311 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18312 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
18313 }, {
18314 .klen = 16,
18315 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18316 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18317 .ilen = 48,
18318 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18319 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18320 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18321 "\x20\x47\x61\x75\x27\x73\x20\x43"
18322 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18323 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
18324 .rlen = 48,
18325 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18326 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18327 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
18328 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
18329 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18330 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
18331 }, {
18332 .klen = 16,
18333 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18334 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18335 .ilen = 64,
18336 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18337 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18338 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18339 "\x20\x47\x61\x75\x27\x73\x20\x43"
18340 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18341 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
18342 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
18343 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
18344 .rlen = 64,
18345 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18346 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18347 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18348 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
18349 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
18350 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
18351 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
18352 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
18353 }
18354};
18355
18356static struct cipher_testvec cts_mode_dec_tv_template[] = {
18357 { /* from rfc3962 */
18358 .klen = 16,
18359 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18360 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18361 .rlen = 17,
18362 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18363 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18364 "\x20",
18365 .ilen = 17,
18366 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
18367 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
18368 "\x97",
18369 }, {
18370 .klen = 16,
18371 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18372 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18373 .rlen = 31,
18374 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18375 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18376 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18377 "\x20\x47\x61\x75\x27\x73\x20",
18378 .ilen = 31,
18379 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
18380 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
18381 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18382 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
18383 }, {
18384 .klen = 16,
18385 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18386 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18387 .rlen = 32,
18388 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18389 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18390 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18391 "\x20\x47\x61\x75\x27\x73\x20\x43",
18392 .ilen = 32,
18393 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18394 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
18395 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18396 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
18397 }, {
18398 .klen = 16,
18399 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18400 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18401 .rlen = 47,
18402 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18403 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18404 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18405 "\x20\x47\x61\x75\x27\x73\x20\x43"
18406 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18407 "\x70\x6c\x65\x61\x73\x65\x2c",
18408 .ilen = 47,
18409 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18410 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18411 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
18412 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
18413 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18414 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
18415 }, {
18416 .klen = 16,
18417 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18418 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18419 .rlen = 48,
18420 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18421 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18422 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18423 "\x20\x47\x61\x75\x27\x73\x20\x43"
18424 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18425 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
18426 .ilen = 48,
18427 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18428 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18429 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
18430 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
18431 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18432 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
18433 }, {
18434 .klen = 16,
18435 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
18436 "\x74\x65\x72\x69\x79\x61\x6b\x69",
18437 .rlen = 64,
18438 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
18439 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
18440 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
18441 "\x20\x47\x61\x75\x27\x73\x20\x43"
18442 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
18443 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
18444 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
18445 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
18446 .ilen = 64,
18447 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
18448 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
18449 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
18450 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
18451 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
18452 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
18453 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
18454 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
18455 }
18456};
18457
18458/*
18459 * Compression stuff.
18460 */
18461#define COMP_BUF_SIZE 512
18462
18463struct comp_testvec {
18464 int inlen, outlen;
18465 char input[COMP_BUF_SIZE];
18466 char output[COMP_BUF_SIZE];
18467};
18468
8064efb8
GU
18469struct pcomp_testvec {
18470 void *params;
18471 unsigned int paramsize;
18472 int inlen, outlen;
18473 char input[COMP_BUF_SIZE];
18474 char output[COMP_BUF_SIZE];
18475};
18476
da7f033d
HX
18477/*
18478 * Deflate test vectors (null-terminated strings).
bcf84a38 18479 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
da7f033d 18480 */
0c01aed5 18481
da7f033d
HX
18482#define DEFLATE_COMP_TEST_VECTORS 2
18483#define DEFLATE_DECOMP_TEST_VECTORS 2
18484
18485static struct comp_testvec deflate_comp_tv_template[] = {
18486 {
18487 .inlen = 70,
18488 .outlen = 38,
18489 .input = "Join us now and share the software "
18490 "Join us now and share the software ",
18491 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
18492 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
18493 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
18494 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
18495 "\x71\xbc\x08\x2b\x01\x00",
18496 }, {
18497 .inlen = 191,
18498 .outlen = 122,
18499 .input = "This document describes a compression method based on the DEFLATE"
18500 "compression algorithm. This document defines the application of "
18501 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
18502 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
18503 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
18504 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
18505 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
18506 "\x68\x12\x51\xae\x76\x67\xd6\x27"
18507 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
18508 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
18509 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
18510 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
18511 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
18512 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
18513 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
18514 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
18515 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
18516 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
18517 "\xfa\x02",
18518 },
18519};
18520
18521static struct comp_testvec deflate_decomp_tv_template[] = {
18522 {
18523 .inlen = 122,
18524 .outlen = 191,
18525 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
18526 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
18527 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
18528 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
18529 "\x68\x12\x51\xae\x76\x67\xd6\x27"
18530 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
18531 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
18532 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
18533 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
18534 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
18535 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
18536 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
18537 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
18538 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
18539 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
18540 "\xfa\x02",
18541 .output = "This document describes a compression method based on the DEFLATE"
18542 "compression algorithm. This document defines the application of "
18543 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
18544 }, {
18545 .inlen = 38,
18546 .outlen = 70,
18547 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
18548 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
18549 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
18550 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
0c01aed5
GU
18551 "\x71\xbc\x08\x2b\x01\x00",
18552 .output = "Join us now and share the software "
18553 "Join us now and share the software ",
18554 },
18555};
18556
18557#define ZLIB_COMP_TEST_VECTORS 2
18558#define ZLIB_DECOMP_TEST_VECTORS 2
18559
18560static const struct {
18561 struct nlattr nla;
18562 int val;
18563} deflate_comp_params[] = {
18564 {
18565 .nla = {
18566 .nla_len = NLA_HDRLEN + sizeof(int),
18567 .nla_type = ZLIB_COMP_LEVEL,
18568 },
18569 .val = Z_DEFAULT_COMPRESSION,
18570 }, {
18571 .nla = {
18572 .nla_len = NLA_HDRLEN + sizeof(int),
18573 .nla_type = ZLIB_COMP_METHOD,
18574 },
18575 .val = Z_DEFLATED,
18576 }, {
18577 .nla = {
18578 .nla_len = NLA_HDRLEN + sizeof(int),
18579 .nla_type = ZLIB_COMP_WINDOWBITS,
18580 },
18581 .val = -11,
18582 }, {
18583 .nla = {
18584 .nla_len = NLA_HDRLEN + sizeof(int),
18585 .nla_type = ZLIB_COMP_MEMLEVEL,
18586 },
18587 .val = MAX_MEM_LEVEL,
18588 }, {
18589 .nla = {
18590 .nla_len = NLA_HDRLEN + sizeof(int),
18591 .nla_type = ZLIB_COMP_STRATEGY,
18592 },
18593 .val = Z_DEFAULT_STRATEGY,
18594 }
18595};
18596
18597static const struct {
18598 struct nlattr nla;
18599 int val;
18600} deflate_decomp_params[] = {
18601 {
18602 .nla = {
18603 .nla_len = NLA_HDRLEN + sizeof(int),
18604 .nla_type = ZLIB_DECOMP_WINDOWBITS,
18605 },
18606 .val = -11,
18607 }
18608};
18609
18610static struct pcomp_testvec zlib_comp_tv_template[] = {
18611 {
18612 .params = &deflate_comp_params,
18613 .paramsize = sizeof(deflate_comp_params),
18614 .inlen = 70,
18615 .outlen = 38,
18616 .input = "Join us now and share the software "
18617 "Join us now and share the software ",
18618 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
18619 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
18620 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
18621 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
18622 "\x71\xbc\x08\x2b\x01\x00",
18623 }, {
18624 .params = &deflate_comp_params,
18625 .paramsize = sizeof(deflate_comp_params),
18626 .inlen = 191,
18627 .outlen = 122,
18628 .input = "This document describes a compression method based on the DEFLATE"
18629 "compression algorithm. This document defines the application of "
18630 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
18631 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
18632 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
18633 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
18634 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
18635 "\x68\x12\x51\xae\x76\x67\xd6\x27"
18636 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
18637 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
18638 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
18639 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
18640 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
18641 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
18642 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
18643 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
18644 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
18645 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
18646 "\xfa\x02",
18647 },
18648};
18649
18650static struct pcomp_testvec zlib_decomp_tv_template[] = {
18651 {
18652 .params = &deflate_decomp_params,
18653 .paramsize = sizeof(deflate_decomp_params),
18654 .inlen = 122,
18655 .outlen = 191,
18656 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
18657 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
18658 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
18659 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
18660 "\x68\x12\x51\xae\x76\x67\xd6\x27"
18661 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
18662 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
18663 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
18664 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
18665 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
18666 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
18667 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
18668 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
18669 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
18670 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
18671 "\xfa\x02",
18672 .output = "This document describes a compression method based on the DEFLATE"
18673 "compression algorithm. This document defines the application of "
18674 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
18675 }, {
18676 .params = &deflate_decomp_params,
18677 .paramsize = sizeof(deflate_decomp_params),
18678 .inlen = 38,
18679 .outlen = 70,
18680 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
18681 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
18682 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
18683 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
da7f033d
HX
18684 "\x71\xbc\x08\x2b\x01\x00",
18685 .output = "Join us now and share the software "
18686 "Join us now and share the software ",
18687 },
18688};
18689
18690/*
18691 * LZO test vectors (null-terminated strings).
18692 */
18693#define LZO_COMP_TEST_VECTORS 2
18694#define LZO_DECOMP_TEST_VECTORS 2
18695
18696static struct comp_testvec lzo_comp_tv_template[] = {
18697 {
18698 .inlen = 70,
18699 .outlen = 46,
18700 .input = "Join us now and share the software "
18701 "Join us now and share the software ",
18702 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
18703 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
18704 "\x64\x20\x73\x68\x61\x72\x65\x20"
18705 "\x74\x68\x65\x20\x73\x6f\x66\x74"
18706 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
18707 "\x3d\x88\x00\x11\x00\x00",
18708 }, {
18709 .inlen = 159,
18710 .outlen = 133,
18711 .input = "This document describes a compression method based on the LZO "
18712 "compression algorithm. This document defines the application of "
18713 "the LZO algorithm used in UBIFS.",
18714 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
18715 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
18716 "\x64\x65\x73\x63\x72\x69\x62\x65"
18717 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
18718 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
18719 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
18720 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
18721 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
18722 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
18723 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
18724 "\x68\x69\x73\x2a\x54\x01\x02\x66"
18725 "\x69\x6e\x65\x73\x94\x06\x05\x61"
18726 "\x70\x70\x6c\x69\x63\x61\x74\x76"
18727 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
18728 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
18729 "\x20\x69\x6e\x20\x55\x42\x49\x46"
18730 "\x53\x2e\x11\x00\x00",
18731 },
18732};
18733
18734static struct comp_testvec lzo_decomp_tv_template[] = {
18735 {
18736 .inlen = 133,
18737 .outlen = 159,
18738 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
18739 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
18740 "\x64\x65\x73\x63\x72\x69\x62\x65"
18741 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
18742 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
18743 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
18744 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
18745 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
18746 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
18747 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
18748 "\x68\x69\x73\x2a\x54\x01\x02\x66"
18749 "\x69\x6e\x65\x73\x94\x06\x05\x61"
18750 "\x70\x70\x6c\x69\x63\x61\x74\x76"
18751 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
18752 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
18753 "\x20\x69\x6e\x20\x55\x42\x49\x46"
18754 "\x53\x2e\x11\x00\x00",
18755 .output = "This document describes a compression method based on the LZO "
18756 "compression algorithm. This document defines the application of "
18757 "the LZO algorithm used in UBIFS.",
18758 }, {
18759 .inlen = 46,
18760 .outlen = 70,
18761 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
18762 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
18763 "\x64\x20\x73\x68\x61\x72\x65\x20"
18764 "\x74\x68\x65\x20\x73\x6f\x66\x74"
18765 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
18766 "\x3d\x88\x00\x11\x00\x00",
18767 .output = "Join us now and share the software "
18768 "Join us now and share the software ",
18769 },
18770};
18771
18772/*
18773 * Michael MIC test vectors from IEEE 802.11i
18774 */
18775#define MICHAEL_MIC_TEST_VECTORS 6
18776
18777static struct hash_testvec michael_mic_tv_template[] = {
18778 {
18779 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
18780 .ksize = 8,
18781 .plaintext = zeroed_string,
18782 .psize = 0,
18783 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
18784 },
18785 {
18786 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
18787 .ksize = 8,
18788 .plaintext = "M",
18789 .psize = 1,
18790 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
18791 },
18792 {
18793 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
18794 .ksize = 8,
18795 .plaintext = "Mi",
18796 .psize = 2,
18797 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
18798 },
18799 {
18800 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
18801 .ksize = 8,
18802 .plaintext = "Mic",
18803 .psize = 3,
18804 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
18805 },
18806 {
18807 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
18808 .ksize = 8,
18809 .plaintext = "Mich",
18810 .psize = 4,
18811 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
18812 },
18813 {
18814 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
18815 .ksize = 8,
18816 .plaintext = "Michael",
18817 .psize = 7,
18818 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
18819 }
18820};
18821
18822/*
18823 * CRC32C test vectors
18824 */
18825#define CRC32C_TEST_VECTORS 14
18826
18827static struct hash_testvec crc32c_tv_template[] = {
18828 {
18829 .psize = 0,
18830 .digest = "\x00\x00\x00\x00",
18831 },
18832 {
18833 .key = "\x87\xa9\xcb\xed",
18834 .ksize = 4,
18835 .psize = 0,
18836 .digest = "\x78\x56\x34\x12",
18837 },
18838 {
18839 .key = "\xff\xff\xff\xff",
18840 .ksize = 4,
18841 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
18842 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
18843 "\x11\x12\x13\x14\x15\x16\x17\x18"
18844 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
18845 "\x21\x22\x23\x24\x25\x26\x27\x28",
18846 .psize = 40,
18847 .digest = "\x7f\x15\x2c\x0e",
18848 },
18849 {
18850 .key = "\xff\xff\xff\xff",
18851 .ksize = 4,
18852 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
18853 "\x31\x32\x33\x34\x35\x36\x37\x38"
18854 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
18855 "\x41\x42\x43\x44\x45\x46\x47\x48"
18856 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
18857 .psize = 40,
18858 .digest = "\xf6\xeb\x80\xe9",
18859 },
18860 {
18861 .key = "\xff\xff\xff\xff",
18862 .ksize = 4,
18863 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
18864 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
18865 "\x61\x62\x63\x64\x65\x66\x67\x68"
18866 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
18867 "\x71\x72\x73\x74\x75\x76\x77\x78",
18868 .psize = 40,
18869 .digest = "\xed\xbd\x74\xde",
18870 },
18871 {
18872 .key = "\xff\xff\xff\xff",
18873 .ksize = 4,
18874 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
18875 "\x81\x82\x83\x84\x85\x86\x87\x88"
18876 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
18877 "\x91\x92\x93\x94\x95\x96\x97\x98"
18878 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
18879 .psize = 40,
18880 .digest = "\x62\xc8\x79\xd5",
18881 },
18882 {
18883 .key = "\xff\xff\xff\xff",
18884 .ksize = 4,
18885 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
18886 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
18887 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
18888 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
18889 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
18890 .psize = 40,
18891 .digest = "\xd0\x9a\x97\xba",
18892 },
18893 {
18894 .key = "\xff\xff\xff\xff",
18895 .ksize = 4,
18896 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
18897 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
18898 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
18899 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
18900 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
18901 .psize = 40,
18902 .digest = "\x13\xd9\x29\x2b",
18903 },
18904 {
18905 .key = "\x80\xea\xd3\xf1",
18906 .ksize = 4,
18907 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
18908 "\x31\x32\x33\x34\x35\x36\x37\x38"
18909 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
18910 "\x41\x42\x43\x44\x45\x46\x47\x48"
18911 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
18912 .psize = 40,
18913 .digest = "\x0c\xb5\xe2\xa2",
18914 },
18915 {
18916 .key = "\xf3\x4a\x1d\x5d",
18917 .ksize = 4,
18918 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
18919 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
18920 "\x61\x62\x63\x64\x65\x66\x67\x68"
18921 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
18922 "\x71\x72\x73\x74\x75\x76\x77\x78",
18923 .psize = 40,
18924 .digest = "\xd1\x7f\xfb\xa6",
18925 },
18926 {
18927 .key = "\x2e\x80\x04\x59",
18928 .ksize = 4,
18929 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
18930 "\x81\x82\x83\x84\x85\x86\x87\x88"
18931 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
18932 "\x91\x92\x93\x94\x95\x96\x97\x98"
18933 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
18934 .psize = 40,
18935 .digest = "\x59\x33\xe6\x7a",
18936 },
18937 {
18938 .key = "\xa6\xcc\x19\x85",
18939 .ksize = 4,
18940 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
18941 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
18942 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
18943 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
18944 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
18945 .psize = 40,
18946 .digest = "\xbe\x03\x01\xd2",
18947 },
18948 {
18949 .key = "\x41\xfc\xfe\x2d",
18950 .ksize = 4,
18951 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
18952 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
18953 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
18954 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
18955 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
18956 .psize = 40,
18957 .digest = "\x75\xd3\xc5\x24",
18958 },
18959 {
18960 .key = "\xff\xff\xff\xff",
18961 .ksize = 4,
18962 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
18963 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
18964 "\x11\x12\x13\x14\x15\x16\x17\x18"
18965 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
18966 "\x21\x22\x23\x24\x25\x26\x27\x28"
18967 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
18968 "\x31\x32\x33\x34\x35\x36\x37\x38"
18969 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
18970 "\x41\x42\x43\x44\x45\x46\x47\x48"
18971 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
18972 "\x51\x52\x53\x54\x55\x56\x57\x58"
18973 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
18974 "\x61\x62\x63\x64\x65\x66\x67\x68"
18975 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
18976 "\x71\x72\x73\x74\x75\x76\x77\x78"
18977 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
18978 "\x81\x82\x83\x84\x85\x86\x87\x88"
18979 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
18980 "\x91\x92\x93\x94\x95\x96\x97\x98"
18981 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
18982 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
18983 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
18984 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
18985 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
18986 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
18987 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
18988 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
18989 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
18990 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
18991 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
18992 .psize = 240,
18993 .digest = "\x75\xd3\xc5\x24",
18994 .np = 2,
18995 .tap = { 31, 209 }
18996 },
18997};
18998
a482b081
SZ
18999/*
19000 * Blakcifn CRC test vectors
19001 */
19002#define BFIN_CRC_TEST_VECTORS 6
19003
19004static struct hash_testvec bfin_crc_tv_template[] = {
19005 {
19006 .psize = 0,
19007 .digest = "\x00\x00\x00\x00",
19008 },
19009 {
19010 .key = "\x87\xa9\xcb\xed",
19011 .ksize = 4,
19012 .psize = 0,
19013 .digest = "\x87\xa9\xcb\xed",
19014 },
19015 {
19016 .key = "\xff\xff\xff\xff",
19017 .ksize = 4,
19018 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
19019 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
19020 "\x11\x12\x13\x14\x15\x16\x17\x18"
19021 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
19022 "\x21\x22\x23\x24\x25\x26\x27\x28",
19023 .psize = 40,
19024 .digest = "\x84\x0c\x8d\xa2",
19025 },
19026 {
19027 .key = "\xff\xff\xff\xff",
19028 .ksize = 4,
19029 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
19030 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
19031 "\x11\x12\x13\x14\x15\x16\x17\x18"
19032 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
19033 "\x21\x22\x23\x24\x25\x26",
19034 .psize = 38,
19035 .digest = "\x8c\x58\xec\xb7",
19036 },
19037 {
19038 .key = "\xff\xff\xff\xff",
19039 .ksize = 4,
19040 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
19041 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
19042 "\x11\x12\x13\x14\x15\x16\x17\x18"
19043 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
19044 "\x21\x22\x23\x24\x25\x26\x27",
19045 .psize = 39,
19046 .digest = "\xdc\x50\x28\x7b",
19047 },
19048 {
19049 .key = "\xff\xff\xff\xff",
19050 .ksize = 4,
19051 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
19052 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
19053 "\x11\x12\x13\x14\x15\x16\x17\x18"
19054 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
19055 "\x21\x22\x23\x24\x25\x26\x27\x28"
19056 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
19057 "\x31\x32\x33\x34\x35\x36\x37\x38"
19058 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
19059 "\x41\x42\x43\x44\x45\x46\x47\x48"
19060 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
19061 "\x51\x52\x53\x54\x55\x56\x57\x58"
19062 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
19063 "\x61\x62\x63\x64\x65\x66\x67\x68"
19064 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
19065 "\x71\x72\x73\x74\x75\x76\x77\x78"
19066 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
19067 "\x81\x82\x83\x84\x85\x86\x87\x88"
19068 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
19069 "\x91\x92\x93\x94\x95\x96\x97\x98"
19070 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
19071 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
19072 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
19073 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
19074 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
19075 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
19076 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
19077 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
19078 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
19079 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
19080 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
19081 .psize = 240,
19082 .digest = "\x10\x19\x4a\x5c",
19083 .np = 2,
19084 .tap = { 31, 209 }
19085 },
19086
19087};
19088
da7f033d 19089#endif /* _CRYPTO_TESTMGR_H */