blob: 9158a92aa18bad3aa43fc7b3a8988f6d1c1258dc [file] [log] [blame]
Herbert Xuda7f0332008-07-31 17:08:25 +08001/*
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 *
Adrian Hoban69435b92010-11-04 15:02:04 -04009 * 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 *
Herbert Xuda7f0332008-07-31 17:08:25 +080018 * 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
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080027#include <linux/netlink.h>
28#include <linux/zlib.h>
29
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030#include <crypto/compress.h>
31
Herbert Xuda7f0332008-07-31 17:08:25 +080032#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;
56 unsigned char fail;
57 unsigned char wk; /* weak key flag */
58 unsigned char klen;
59 unsigned short ilen;
60 unsigned short rlen;
61};
62
63struct aead_testvec {
64 char *key;
65 char *iv;
66 char *input;
67 char *assoc;
68 char *result;
69 unsigned char tap[MAX_TAP];
70 unsigned char atap[MAX_TAP];
71 int np;
72 int anp;
73 unsigned char fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080074 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080075 unsigned char wk; /* weak key flag */
76 unsigned char klen;
77 unsigned short ilen;
78 unsigned short alen;
79 unsigned short rlen;
80};
81
Jarod Wilson7647d6c2009-05-04 19:44:50 +080082struct cprng_testvec {
83 char *key;
84 char *dt;
85 char *v;
86 char *result;
87 unsigned char klen;
88 unsigned short dtlen;
89 unsigned short vlen;
90 unsigned short rlen;
91 unsigned short loops;
92};
93
Herbert Xuda7f0332008-07-31 17:08:25 +080094static char zeroed_string[48];
95
96/*
97 * MD4 test vectors from RFC1320
98 */
99#define MD4_TEST_VECTORS 7
100
101static struct hash_testvec md4_tv_template [] = {
102 {
103 .plaintext = "",
104 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
105 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
106 }, {
107 .plaintext = "a",
108 .psize = 1,
109 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
110 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
111 }, {
112 .plaintext = "abc",
113 .psize = 3,
114 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
115 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
116 }, {
117 .plaintext = "message digest",
118 .psize = 14,
119 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
120 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
121 }, {
122 .plaintext = "abcdefghijklmnopqrstuvwxyz",
123 .psize = 26,
124 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
125 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
126 .np = 2,
127 .tap = { 13, 13 },
128 }, {
129 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
130 .psize = 62,
131 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
132 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
133 }, {
134 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
135 "45678901234567890",
136 .psize = 80,
137 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
138 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
139 },
140};
141
142/*
143 * MD5 test vectors from RFC1321
144 */
145#define MD5_TEST_VECTORS 7
146
147static struct hash_testvec md5_tv_template[] = {
148 {
149 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
150 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
151 }, {
152 .plaintext = "a",
153 .psize = 1,
154 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
155 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
156 }, {
157 .plaintext = "abc",
158 .psize = 3,
159 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
160 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
161 }, {
162 .plaintext = "message digest",
163 .psize = 14,
164 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
165 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
166 }, {
167 .plaintext = "abcdefghijklmnopqrstuvwxyz",
168 .psize = 26,
169 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
170 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
171 .np = 2,
172 .tap = {13, 13}
173 }, {
174 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
175 .psize = 62,
176 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
177 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
178 }, {
179 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
180 "345678901234567890",
181 .psize = 80,
182 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
183 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
184 }
185
186};
187
188/*
189 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
190 */
191#define RMD128_TEST_VECTORS 10
192
193static struct hash_testvec rmd128_tv_template[] = {
194 {
195 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
196 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
197 }, {
198 .plaintext = "a",
199 .psize = 1,
200 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
201 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
202 }, {
203 .plaintext = "abc",
204 .psize = 3,
205 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
206 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
207 }, {
208 .plaintext = "message digest",
209 .psize = 14,
210 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
211 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
212 }, {
213 .plaintext = "abcdefghijklmnopqrstuvwxyz",
214 .psize = 26,
215 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
216 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
217 }, {
218 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
219 "fghijklmnopqrstuvwxyz0123456789",
220 .psize = 62,
221 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
222 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
223 }, {
224 .plaintext = "1234567890123456789012345678901234567890"
225 "1234567890123456789012345678901234567890",
226 .psize = 80,
227 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
228 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
229 }, {
230 .plaintext = "abcdbcdecdefdefgefghfghighij"
231 "hijkijkljklmklmnlmnomnopnopq",
232 .psize = 56,
233 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
234 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
235 .np = 2,
236 .tap = { 28, 28 },
237 }, {
238 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
239 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
240 "lmnopqrsmnopqrstnopqrstu",
241 .psize = 112,
242 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
243 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
244 }, {
245 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
246 .psize = 32,
247 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
248 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
249 }
250};
251
252/*
253 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
254 */
255#define RMD160_TEST_VECTORS 10
256
257static struct hash_testvec rmd160_tv_template[] = {
258 {
259 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
260 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
261 }, {
262 .plaintext = "a",
263 .psize = 1,
264 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
265 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
266 }, {
267 .plaintext = "abc",
268 .psize = 3,
269 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
270 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
271 }, {
272 .plaintext = "message digest",
273 .psize = 14,
274 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
275 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
276 }, {
277 .plaintext = "abcdefghijklmnopqrstuvwxyz",
278 .psize = 26,
279 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
280 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
281 }, {
282 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
283 "fghijklmnopqrstuvwxyz0123456789",
284 .psize = 62,
285 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
286 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
287 }, {
288 .plaintext = "1234567890123456789012345678901234567890"
289 "1234567890123456789012345678901234567890",
290 .psize = 80,
291 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
292 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
293 }, {
294 .plaintext = "abcdbcdecdefdefgefghfghighij"
295 "hijkijkljklmklmnlmnomnopnopq",
296 .psize = 56,
297 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
298 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
299 .np = 2,
300 .tap = { 28, 28 },
301 }, {
302 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
303 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
304 "lmnopqrsmnopqrstnopqrstu",
305 .psize = 112,
306 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
307 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
308 }, {
309 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
310 .psize = 32,
311 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
312 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
313 }
314};
315
316/*
317 * RIPEMD-256 test vectors
318 */
319#define RMD256_TEST_VECTORS 8
320
321static struct hash_testvec rmd256_tv_template[] = {
322 {
323 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
324 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
325 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
326 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
327 }, {
328 .plaintext = "a",
329 .psize = 1,
330 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
331 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
332 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
333 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
334 }, {
335 .plaintext = "abc",
336 .psize = 3,
337 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
338 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
339 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
340 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
341 }, {
342 .plaintext = "message digest",
343 .psize = 14,
344 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
345 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
346 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
347 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
348 }, {
349 .plaintext = "abcdefghijklmnopqrstuvwxyz",
350 .psize = 26,
351 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
352 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
353 "\x78\x96\x11\x8a\x51\x97\x96\x87"
354 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
355 }, {
356 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
357 "fghijklmnopqrstuvwxyz0123456789",
358 .psize = 62,
359 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
360 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
361 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
362 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
363 }, {
364 .plaintext = "1234567890123456789012345678901234567890"
365 "1234567890123456789012345678901234567890",
366 .psize = 80,
367 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
368 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
369 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
370 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
371 }, {
372 .plaintext = "abcdbcdecdefdefgefghfghighij"
373 "hijkijkljklmklmnlmnomnopnopq",
374 .psize = 56,
375 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
376 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
377 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
378 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
379 .np = 2,
380 .tap = { 28, 28 },
381 }
382};
383
384/*
385 * RIPEMD-320 test vectors
386 */
387#define RMD320_TEST_VECTORS 8
388
389static struct hash_testvec rmd320_tv_template[] = {
390 {
391 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
392 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
393 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
394 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
395 }, {
396 .plaintext = "a",
397 .psize = 1,
398 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
399 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
400 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
401 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
402 }, {
403 .plaintext = "abc",
404 .psize = 3,
405 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
406 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
407 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
408 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
409 }, {
410 .plaintext = "message digest",
411 .psize = 14,
412 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
413 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
414 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
415 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
416 }, {
417 .plaintext = "abcdefghijklmnopqrstuvwxyz",
418 .psize = 26,
419 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
420 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
421 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
422 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
423 }, {
424 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
425 "fghijklmnopqrstuvwxyz0123456789",
426 .psize = 62,
427 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
428 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
429 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
430 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
431 }, {
432 .plaintext = "1234567890123456789012345678901234567890"
433 "1234567890123456789012345678901234567890",
434 .psize = 80,
435 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
436 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
437 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
438 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
439 }, {
440 .plaintext = "abcdbcdecdefdefgefghfghighij"
441 "hijkijkljklmklmnlmnomnopnopq",
442 .psize = 56,
443 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
444 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
445 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
446 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
447 .np = 2,
448 .tap = { 28, 28 },
449 }
450};
451
452/*
453 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100454 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800455 */
Herbert Xubd1f2992011-02-17 14:24:45 +1100456#define SHA1_TEST_VECTORS 3
Herbert Xuda7f0332008-07-31 17:08:25 +0800457
458static struct hash_testvec sha1_tv_template[] = {
459 {
460 .plaintext = "abc",
461 .psize = 3,
462 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
463 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
464 }, {
465 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
466 .psize = 56,
467 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
468 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
469 .np = 2,
470 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100471 }, {
472 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
473 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
474 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
475 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
476 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
477 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
478 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
479 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
480 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
481 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
482 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
483 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
484 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
485 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
486 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
487 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
488 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
489 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
490 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
491 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
492 "\x5a\x90\x11",
493 .psize = 163,
494 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
495 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
496 .np = 4,
497 .tap = { 63, 64, 31, 5 }
Herbert Xuda7f0332008-07-31 17:08:25 +0800498 }
499};
500
501
502/*
503 * SHA224 test vectors from from FIPS PUB 180-2
504 */
505#define SHA224_TEST_VECTORS 2
506
507static struct hash_testvec sha224_tv_template[] = {
508 {
509 .plaintext = "abc",
510 .psize = 3,
511 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
512 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
513 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
514 "\xE3\x6C\x9D\xA7",
515 }, {
516 .plaintext =
517 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
518 .psize = 56,
519 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
520 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
521 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
522 "\x52\x52\x25\x25",
523 .np = 2,
524 .tap = { 28, 28 }
525 }
526};
527
528/*
529 * SHA256 test vectors from from NIST
530 */
531#define SHA256_TEST_VECTORS 2
532
533static struct hash_testvec sha256_tv_template[] = {
534 {
535 .plaintext = "abc",
536 .psize = 3,
537 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
538 "\x41\x41\x40\xde\x5d\xae\x22\x23"
539 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
540 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
541 }, {
542 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
543 .psize = 56,
544 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
545 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
546 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
547 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
548 .np = 2,
549 .tap = { 28, 28 }
550 },
551};
552
553/*
554 * SHA384 test vectors from from NIST and kerneli
555 */
556#define SHA384_TEST_VECTORS 4
557
558static struct hash_testvec sha384_tv_template[] = {
559 {
560 .plaintext= "abc",
561 .psize = 3,
562 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
563 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
564 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
565 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
566 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
567 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
568 }, {
569 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
570 .psize = 56,
571 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
572 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
573 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
574 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
575 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
576 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
577 }, {
578 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
579 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
580 .psize = 112,
581 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
582 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
583 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
584 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
585 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
586 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
587 }, {
588 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
589 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
590 .psize = 104,
591 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
592 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
593 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
594 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
595 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
596 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
597 .np = 4,
598 .tap = { 26, 26, 26, 26 }
599 },
600};
601
602/*
603 * SHA512 test vectors from from NIST and kerneli
604 */
605#define SHA512_TEST_VECTORS 4
606
607static struct hash_testvec sha512_tv_template[] = {
608 {
609 .plaintext = "abc",
610 .psize = 3,
611 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
612 "\xcc\x41\x73\x49\xae\x20\x41\x31"
613 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
614 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
615 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
616 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
617 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
618 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
619 }, {
620 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
621 .psize = 56,
622 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
623 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
624 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
625 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
626 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
627 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
628 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
629 "\x54\xec\x63\x12\x38\xca\x34\x45",
630 }, {
631 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
632 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
633 .psize = 112,
634 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
635 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
636 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
637 "\x72\x99\xae\xad\xb6\x88\x90\x18"
638 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
639 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
640 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
641 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
642 }, {
643 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
644 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
645 .psize = 104,
646 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
647 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
648 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
649 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
650 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
651 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
652 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
653 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
654 .np = 4,
655 .tap = { 26, 26, 26, 26 }
656 },
657};
658
659
660/*
661 * WHIRLPOOL test vectors from Whirlpool package
662 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
663 * submission
664 */
665#define WP512_TEST_VECTORS 8
666
667static struct hash_testvec wp512_tv_template[] = {
668 {
669 .plaintext = "",
670 .psize = 0,
671 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
672 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
673 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
674 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
675 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
676 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
677 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
678 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
679
680
681 }, {
682 .plaintext = "a",
683 .psize = 1,
684 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
685 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
686 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
687 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
688 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
689 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
690 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
691 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
692 }, {
693 .plaintext = "abc",
694 .psize = 3,
695 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
696 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
697 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
698 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
699 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
700 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
701 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
702 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
703 }, {
704 .plaintext = "message digest",
705 .psize = 14,
706 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
707 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
708 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
709 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
710 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
711 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
712 "\x92\xED\x92\x00\x52\x83\x8F\x33"
713 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
714 }, {
715 .plaintext = "abcdefghijklmnopqrstuvwxyz",
716 .psize = 26,
717 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
718 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
719 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
720 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
721 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
722 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
723 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
724 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
725 }, {
726 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
727 "abcdefghijklmnopqrstuvwxyz0123456789",
728 .psize = 62,
729 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
730 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
731 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
732 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
733 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
734 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
735 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
736 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
737 }, {
738 .plaintext = "1234567890123456789012345678901234567890"
739 "1234567890123456789012345678901234567890",
740 .psize = 80,
741 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
742 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
743 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
744 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
745 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
746 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
747 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
748 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
749 }, {
750 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
751 .psize = 32,
752 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
753 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
754 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
755 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
756 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
757 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
758 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
759 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
760 },
761};
762
763#define WP384_TEST_VECTORS 8
764
765static struct hash_testvec wp384_tv_template[] = {
766 {
767 .plaintext = "",
768 .psize = 0,
769 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
770 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
771 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
772 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
773 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
774 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
775
776
777 }, {
778 .plaintext = "a",
779 .psize = 1,
780 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
781 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
782 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
783 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
784 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
785 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
786 }, {
787 .plaintext = "abc",
788 .psize = 3,
789 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
790 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
791 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
792 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
793 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
794 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
795 }, {
796 .plaintext = "message digest",
797 .psize = 14,
798 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
799 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
800 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
801 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
802 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
803 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
804 }, {
805 .plaintext = "abcdefghijklmnopqrstuvwxyz",
806 .psize = 26,
807 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
808 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
809 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
810 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
811 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
812 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
813 }, {
814 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
815 "abcdefghijklmnopqrstuvwxyz0123456789",
816 .psize = 62,
817 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
818 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
819 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
820 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
821 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
822 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
823 }, {
824 .plaintext = "1234567890123456789012345678901234567890"
825 "1234567890123456789012345678901234567890",
826 .psize = 80,
827 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
828 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
829 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
830 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
831 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
832 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
833 }, {
834 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
835 .psize = 32,
836 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
837 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
838 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
839 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
840 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
841 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
842 },
843};
844
845#define WP256_TEST_VECTORS 8
846
847static struct hash_testvec wp256_tv_template[] = {
848 {
849 .plaintext = "",
850 .psize = 0,
851 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
852 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
853 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
854 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
855
856
857 }, {
858 .plaintext = "a",
859 .psize = 1,
860 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
861 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
862 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
863 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
864 }, {
865 .plaintext = "abc",
866 .psize = 3,
867 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
868 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
869 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
870 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
871 }, {
872 .plaintext = "message digest",
873 .psize = 14,
874 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
875 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
876 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
877 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
878 }, {
879 .plaintext = "abcdefghijklmnopqrstuvwxyz",
880 .psize = 26,
881 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
882 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
883 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
884 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
885 }, {
886 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
887 "abcdefghijklmnopqrstuvwxyz0123456789",
888 .psize = 62,
889 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
890 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
891 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
892 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
893 }, {
894 .plaintext = "1234567890123456789012345678901234567890"
895 "1234567890123456789012345678901234567890",
896 .psize = 80,
897 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
898 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
899 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
900 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
901 }, {
902 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
903 .psize = 32,
904 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
905 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
906 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
907 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
908 },
909};
910
911/*
912 * TIGER test vectors from Tiger website
913 */
914#define TGR192_TEST_VECTORS 6
915
916static struct hash_testvec tgr192_tv_template[] = {
917 {
918 .plaintext = "",
919 .psize = 0,
920 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
921 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
922 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
923 }, {
924 .plaintext = "abc",
925 .psize = 3,
926 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
927 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
928 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
929 }, {
930 .plaintext = "Tiger",
931 .psize = 5,
932 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
933 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
934 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
935 }, {
936 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
937 .psize = 64,
938 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
939 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
940 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
941 }, {
942 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
943 .psize = 64,
944 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
945 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
946 "\x57\x89\x65\x65\x97\x5f\x91\x97",
947 }, {
948 .plaintext = "Tiger - A Fast New Hash Function, "
949 "by Ross Anderson and Eli Biham, "
950 "proceedings of Fast Software Encryption 3, "
951 "Cambridge, 1996.",
952 .psize = 125,
953 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
954 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
955 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
956 },
957};
958
959#define TGR160_TEST_VECTORS 6
960
961static struct hash_testvec tgr160_tv_template[] = {
962 {
963 .plaintext = "",
964 .psize = 0,
965 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
966 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
967 "\xf3\x73\xde\x2d",
968 }, {
969 .plaintext = "abc",
970 .psize = 3,
971 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
972 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
973 "\x93\x5f\x7b\x95",
974 }, {
975 .plaintext = "Tiger",
976 .psize = 5,
977 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
978 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
979 "\x37\x79\x0c\x11",
980 }, {
981 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
982 .psize = 64,
983 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
984 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
985 "\xb5\x86\x44\x50",
986 }, {
987 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
988 .psize = 64,
989 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
990 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
991 "\x57\x89\x65\x65",
992 }, {
993 .plaintext = "Tiger - A Fast New Hash Function, "
994 "by Ross Anderson and Eli Biham, "
995 "proceedings of Fast Software Encryption 3, "
996 "Cambridge, 1996.",
997 .psize = 125,
998 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
999 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1000 "\xdd\x68\x15\x1d",
1001 },
1002};
1003
1004#define TGR128_TEST_VECTORS 6
1005
1006static struct hash_testvec tgr128_tv_template[] = {
1007 {
1008 .plaintext = "",
1009 .psize = 0,
1010 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1011 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1012 }, {
1013 .plaintext = "abc",
1014 .psize = 3,
1015 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1016 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1017 }, {
1018 .plaintext = "Tiger",
1019 .psize = 5,
1020 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1021 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1022 }, {
1023 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1024 .psize = 64,
1025 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1026 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1027 }, {
1028 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1029 .psize = 64,
1030 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1031 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1032 }, {
1033 .plaintext = "Tiger - A Fast New Hash Function, "
1034 "by Ross Anderson and Eli Biham, "
1035 "proceedings of Fast Software Encryption 3, "
1036 "Cambridge, 1996.",
1037 .psize = 125,
1038 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1039 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1040 },
1041};
1042
Youquan, Song507069c2009-11-23 20:23:04 +08001043#define GHASH_TEST_VECTORS 1
1044
1045static struct hash_testvec ghash_tv_template[] =
1046{
1047 {
1048
1049 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1050 .ksize = 16,
1051 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1052 .psize = 16,
1053 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1054 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1055 },
1056};
1057
Herbert Xuda7f0332008-07-31 17:08:25 +08001058/*
1059 * HMAC-MD5 test vectors from RFC2202
1060 * (These need to be fixed to not use strlen).
1061 */
1062#define HMAC_MD5_TEST_VECTORS 7
1063
1064static struct hash_testvec hmac_md5_tv_template[] =
1065{
1066 {
1067 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1068 .ksize = 16,
1069 .plaintext = "Hi There",
1070 .psize = 8,
1071 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1072 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1073 }, {
1074 .key = "Jefe",
1075 .ksize = 4,
1076 .plaintext = "what do ya want for nothing?",
1077 .psize = 28,
1078 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1079 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1080 .np = 2,
1081 .tap = {14, 14}
1082 }, {
1083 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1084 .ksize = 16,
1085 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1086 "\xdd\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",
1089 .psize = 50,
1090 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1091 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1092 }, {
1093 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1094 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1095 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1096 .ksize = 25,
1097 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1098 "\xcd\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",
1101 .psize = 50,
1102 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1103 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1104 }, {
1105 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1106 .ksize = 16,
1107 .plaintext = "Test With Truncation",
1108 .psize = 20,
1109 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1110 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1111 }, {
1112 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1113 "\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",
1119 .ksize = 80,
1120 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1121 .psize = 54,
1122 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1123 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1124 }, {
1125 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1126 "\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",
1132 .ksize = 80,
1133 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1134 "Block-Size Data",
1135 .psize = 73,
1136 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1137 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1138 },
1139};
1140
1141/*
1142 * HMAC-RIPEMD128 test vectors from RFC2286
1143 */
1144#define HMAC_RMD128_TEST_VECTORS 7
1145
1146static struct hash_testvec hmac_rmd128_tv_template[] = {
1147 {
1148 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1149 .ksize = 16,
1150 .plaintext = "Hi There",
1151 .psize = 8,
1152 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1153 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1154 }, {
1155 .key = "Jefe",
1156 .ksize = 4,
1157 .plaintext = "what do ya want for nothing?",
1158 .psize = 28,
1159 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1160 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1161 .np = 2,
1162 .tap = { 14, 14 },
1163 }, {
1164 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1165 .ksize = 16,
1166 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1167 "\xdd\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",
1170 .psize = 50,
1171 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1172 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1173 }, {
1174 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1175 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1176 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1177 .ksize = 25,
1178 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1179 "\xcd\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",
1182 .psize = 50,
1183 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1184 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1185 }, {
1186 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1187 .ksize = 16,
1188 .plaintext = "Test With Truncation",
1189 .psize = 20,
1190 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1191 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1192 }, {
1193 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1194 "\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",
1200 .ksize = 80,
1201 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1202 .psize = 54,
1203 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1204 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1205 }, {
1206 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1207 "\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",
1213 .ksize = 80,
1214 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1215 "Block-Size Data",
1216 .psize = 73,
1217 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1218 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1219 },
1220};
1221
1222/*
1223 * HMAC-RIPEMD160 test vectors from RFC2286
1224 */
1225#define HMAC_RMD160_TEST_VECTORS 7
1226
1227static struct hash_testvec hmac_rmd160_tv_template[] = {
1228 {
1229 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1230 .ksize = 20,
1231 .plaintext = "Hi There",
1232 .psize = 8,
1233 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1234 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1235 }, {
1236 .key = "Jefe",
1237 .ksize = 4,
1238 .plaintext = "what do ya want for nothing?",
1239 .psize = 28,
1240 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1241 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1242 .np = 2,
1243 .tap = { 14, 14 },
1244 }, {
1245 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1246 .ksize = 20,
1247 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1248 "\xdd\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",
1251 .psize = 50,
1252 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1253 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1254 }, {
1255 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1256 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1257 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1258 .ksize = 25,
1259 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1260 "\xcd\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",
1263 .psize = 50,
1264 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1265 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1266 }, {
1267 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1268 .ksize = 20,
1269 .plaintext = "Test With Truncation",
1270 .psize = 20,
1271 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1272 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1273 }, {
1274 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1275 "\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",
1281 .ksize = 80,
1282 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1283 .psize = 54,
1284 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1285 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1286 }, {
1287 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1288 "\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",
1294 .ksize = 80,
1295 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1296 "Block-Size Data",
1297 .psize = 73,
1298 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1299 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1300 },
1301};
1302
1303/*
1304 * HMAC-SHA1 test vectors from RFC2202
1305 */
1306#define HMAC_SHA1_TEST_VECTORS 7
1307
1308static struct hash_testvec hmac_sha1_tv_template[] = {
1309 {
1310 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1311 .ksize = 20,
1312 .plaintext = "Hi There",
1313 .psize = 8,
1314 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1315 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1316 "\x46\xbe",
1317 }, {
1318 .key = "Jefe",
1319 .ksize = 4,
1320 .plaintext = "what do ya want for nothing?",
1321 .psize = 28,
1322 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1323 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1324 .np = 2,
1325 .tap = { 14, 14 }
1326 }, {
1327 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1328 .ksize = 20,
1329 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1330 "\xdd\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",
1333 .psize = 50,
1334 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1335 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1336 }, {
1337 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1338 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1339 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1340 .ksize = 25,
1341 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1342 "\xcd\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",
1345 .psize = 50,
1346 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1347 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1348 }, {
1349 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1350 .ksize = 20,
1351 .plaintext = "Test With Truncation",
1352 .psize = 20,
1353 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1354 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1355 }, {
1356 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1357 "\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",
1363 .ksize = 80,
1364 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1365 .psize = 54,
1366 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1367 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1368 }, {
1369 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1370 "\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",
1376 .ksize = 80,
1377 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1378 "Block-Size Data",
1379 .psize = 73,
1380 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1381 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1382 },
1383};
1384
1385
1386/*
1387 * SHA224 HMAC test vectors from RFC4231
1388 */
1389#define HMAC_SHA224_TEST_VECTORS 4
1390
1391static struct hash_testvec hmac_sha224_tv_template[] = {
1392 {
1393 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1394 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1395 "\x0b\x0b\x0b\x0b",
1396 .ksize = 20,
1397 /* ("Hi There") */
1398 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1399 .psize = 8,
1400 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1401 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1402 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1403 "\x53\x68\x4b\x22",
1404 }, {
1405 .key = "Jefe",
1406 .ksize = 4,
1407 /* ("what do ya want for nothing?") */
1408 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1409 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1410 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1411 "\x69\x6e\x67\x3f",
1412 .psize = 28,
1413 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1414 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1415 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1416 "\x8f\xd0\x5e\x44",
1417 .np = 4,
1418 .tap = { 7, 7, 7, 7 }
1419 }, {
1420 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1421 "\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",
1437 .ksize = 131,
1438 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
1439 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1440 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1441 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1442 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1443 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1444 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1445 "\x20\x46\x69\x72\x73\x74",
1446 .psize = 54,
1447 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1448 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1449 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1450 "\x3f\xa6\x87\x0e",
1451 }, {
1452 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1453 "\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",
1469 .ksize = 131,
1470 /* ("This is a test using a larger than block-size key and a")
1471 (" larger than block-size data. The key needs to be")
1472 (" hashed before being used by the HMAC algorithm.") */
1473 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1474 "\x61\x20\x74\x65\x73\x74\x20\x75"
1475 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1476 "\x61\x72\x67\x65\x72\x20\x74\x68"
1477 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1478 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1479 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1480 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1481 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1482 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1483 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1484 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1485 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1486 "\x20\x68\x61\x73\x68\x65\x64\x20"
1487 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1488 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1489 "\x64\x20\x62\x79\x20\x74\x68\x65"
1490 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1491 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1492 .psize = 152,
1493 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1494 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1495 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1496 "\xf6\xf5\x65\xd1",
1497 },
1498};
1499
1500/*
1501 * HMAC-SHA256 test vectors from
1502 * draft-ietf-ipsec-ciph-sha-256-01.txt
1503 */
1504#define HMAC_SHA256_TEST_VECTORS 10
1505
1506static struct hash_testvec hmac_sha256_tv_template[] = {
1507 {
1508 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1509 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1510 "\x11\x12\x13\x14\x15\x16\x17\x18"
1511 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1512 .ksize = 32,
1513 .plaintext = "abc",
1514 .psize = 3,
1515 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1516 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1517 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1518 "\x92\x75\x90\x21\xcf\xab\x81\x81",
1519 }, {
1520 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1521 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1522 "\x11\x12\x13\x14\x15\x16\x17\x18"
1523 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1524 .ksize = 32,
1525 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1526 .psize = 56,
1527 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1528 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1529 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1530 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1531 }, {
1532 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1533 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1534 "\x11\x12\x13\x14\x15\x16\x17\x18"
1535 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1536 .ksize = 32,
1537 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1538 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1539 .psize = 112,
1540 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1541 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1542 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1543 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1544 }, {
1545 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1546 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1547 "\x0b\x0b\x0b\x0b\x0b\x0b",
1548 .ksize = 32,
1549 .plaintext = "Hi There",
1550 .psize = 8,
1551 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1552 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1553 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1554 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1555 }, {
1556 .key = "Jefe",
1557 .ksize = 4,
1558 .plaintext = "what do ya want for nothing?",
1559 .psize = 28,
1560 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1561 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1562 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1563 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1564 .np = 2,
1565 .tap = { 14, 14 }
1566 }, {
1567 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1568 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1569 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1570 .ksize = 32,
1571 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1572 "\xdd\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",
1575 .psize = 50,
1576 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1577 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1578 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1579 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1580 }, {
1581 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1582 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1583 "\x11\x12\x13\x14\x15\x16\x17\x18"
1584 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1585 "\x21\x22\x23\x24\x25",
1586 .ksize = 37,
1587 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1588 "\xcd\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",
1591 .psize = 50,
1592 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1593 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1594 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1595 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1596 }, {
1597 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1598 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1599 "\x0c\x0c\x0c\x0c\x0c\x0c",
1600 .ksize = 32,
1601 .plaintext = "Test With Truncation",
1602 .psize = 20,
1603 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1604 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1605 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1606 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1607 }, {
1608 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1609 "\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",
1615 .ksize = 80,
1616 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1617 .psize = 54,
1618 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1619 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1620 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1621 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1622 }, {
1623 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1624 "\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",
1630 .ksize = 80,
1631 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1632 "One Block-Size Data",
1633 .psize = 73,
1634 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1635 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1636 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1637 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1638 },
1639};
1640
1641#define XCBC_AES_TEST_VECTORS 6
1642
1643static struct hash_testvec aes_xcbc128_tv_template[] = {
1644 {
1645 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1646 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1647 .plaintext = zeroed_string,
1648 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1649 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1650 .psize = 0,
1651 .ksize = 16,
1652 }, {
1653 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1655 .plaintext = "\x00\x01\x02",
1656 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1657 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1658 .psize = 3,
1659 .ksize = 16,
1660 } , {
1661 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1663 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1664 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1665 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1666 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1667 .psize = 16,
1668 .ksize = 16,
1669 }, {
1670 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1671 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1672 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1674 "\x10\x11\x12\x13",
1675 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1676 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1677 .tap = { 10, 10 },
1678 .psize = 20,
1679 .np = 2,
1680 .ksize = 16,
1681 }, {
1682 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1683 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1684 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1685 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1686 "\x10\x11\x12\x13\x14\x15\x16\x17"
1687 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1688 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1689 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1690 .psize = 32,
1691 .ksize = 16,
1692 }, {
1693 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1694 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1695 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1696 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1697 "\x10\x11\x12\x13\x14\x15\x16\x17"
1698 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1699 "\x20\x21",
1700 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1701 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1702 .tap = { 17, 17 },
1703 .psize = 34,
1704 .np = 2,
1705 .ksize = 16,
1706 }
1707};
1708
Shane Wang304a2042010-03-18 20:22:55 +08001709#define VMAC_AES_TEST_VECTORS 8
1710static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10001711 '\x02', '\x03', '\x02', '\x02',
1712 '\x02', '\x04', '\x01', '\x07',
1713 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08001714static char vmac_string2[128] = {'a', 'b', 'c',};
1715static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
1716 '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 };
1724
Shane Wangf1939f72009-09-02 20:05:22 +10001725static struct hash_testvec aes_vmac128_tv_template[] = {
1726 {
Shane Wang304a2042010-03-18 20:22:55 +08001727 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1728 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1729 .plaintext = NULL,
1730 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1731 .psize = 0,
1732 .ksize = 16,
1733 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10001734 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1735 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08001736 .plaintext = vmac_string1,
1737 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1738 .psize = 128,
1739 .ksize = 16,
1740 }, {
1741 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1742 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1743 .plaintext = vmac_string2,
1744 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1745 .psize = 128,
1746 .ksize = 16,
1747 }, {
1748 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1749 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1750 .plaintext = vmac_string3,
1751 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1752 .psize = 128,
1753 .ksize = 16,
1754 }, {
1755 .key = "abcdefghijklmnop",
1756 .plaintext = NULL,
1757 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1758 .psize = 0,
1759 .ksize = 16,
1760 }, {
1761 .key = "abcdefghijklmnop",
1762 .plaintext = vmac_string1,
1763 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1764 .psize = 128,
1765 .ksize = 16,
1766 }, {
1767 .key = "abcdefghijklmnop",
1768 .plaintext = vmac_string2,
1769 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1770 .psize = 128,
1771 .ksize = 16,
1772 }, {
1773 .key = "abcdefghijklmnop",
1774 .plaintext = vmac_string3,
1775 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10001776 .psize = 128,
1777 .ksize = 16,
1778 },
1779};
1780
Herbert Xuda7f0332008-07-31 17:08:25 +08001781/*
1782 * SHA384 HMAC test vectors from RFC4231
1783 */
1784
1785#define HMAC_SHA384_TEST_VECTORS 4
1786
1787static struct hash_testvec hmac_sha384_tv_template[] = {
1788 {
1789 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1790 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1791 "\x0b\x0b\x0b\x0b",
1792 .ksize = 20,
1793 .plaintext = "Hi There",
1794 .psize = 8,
1795 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1796 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1797 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1798 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1799 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1800 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1801 }, {
1802 .key = "Jefe",
1803 .ksize = 4,
1804 .plaintext = "what do ya want for nothing?",
1805 .psize = 28,
1806 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1807 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1808 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1809 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1810 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1811 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
1812 .np = 4,
1813 .tap = { 7, 7, 7, 7 }
1814 }, {
1815 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1816 "\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",
1832 .ksize = 131,
1833 .plaintext = "Test Using Larger Than Block-Siz"
1834 "e Key - Hash Key First",
1835 .psize = 54,
1836 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1837 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1838 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1839 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1840 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1841 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
1842 }, {
1843 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1844 "\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",
1860 .ksize = 131,
1861 .plaintext = "This is a test u"
1862 "sing a larger th"
1863 "an block-size ke"
1864 "y and a larger t"
1865 "han block-size d"
1866 "ata. The key nee"
1867 "ds to be hashed "
1868 "before being use"
1869 "d by the HMAC al"
1870 "gorithm.",
1871 .psize = 152,
1872 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1873 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1874 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1875 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1876 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1877 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
1878 },
1879};
1880
1881/*
1882 * SHA512 HMAC test vectors from RFC4231
1883 */
1884
1885#define HMAC_SHA512_TEST_VECTORS 4
1886
1887static struct hash_testvec hmac_sha512_tv_template[] = {
1888 {
1889 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1890 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1891 "\x0b\x0b\x0b\x0b",
1892 .ksize = 20,
1893 .plaintext = "Hi There",
1894 .psize = 8,
1895 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1896 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1897 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1898 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1899 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1900 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1901 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1902 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
1903 }, {
1904 .key = "Jefe",
1905 .ksize = 4,
1906 .plaintext = "what do ya want for nothing?",
1907 .psize = 28,
1908 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1909 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1910 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1911 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1912 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1913 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1914 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1915 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
1916 .np = 4,
1917 .tap = { 7, 7, 7, 7 }
1918 }, {
1919 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1920 "\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",
1936 .ksize = 131,
1937 .plaintext = "Test Using Large"
1938 "r Than Block-Siz"
1939 "e Key - Hash Key"
1940 " First",
1941 .psize = 54,
1942 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1943 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1944 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1945 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1946 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1947 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1948 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1949 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
1950 }, {
1951 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1952 "\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",
1968 .ksize = 131,
1969 .plaintext =
1970 "This is a test u"
1971 "sing a larger th"
1972 "an block-size ke"
1973 "y and a larger t"
1974 "han block-size d"
1975 "ata. The key nee"
1976 "ds to be hashed "
1977 "before being use"
1978 "d by the HMAC al"
1979 "gorithm.",
1980 .psize = 152,
1981 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
1982 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
1983 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
1984 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
1985 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
1986 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
1987 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
1988 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
1989 },
1990};
1991
1992/*
1993 * DES test vectors.
1994 */
1995#define DES_ENC_TEST_VECTORS 10
1996#define DES_DEC_TEST_VECTORS 4
1997#define DES_CBC_ENC_TEST_VECTORS 5
1998#define DES_CBC_DEC_TEST_VECTORS 4
1999#define DES3_EDE_ENC_TEST_VECTORS 3
2000#define DES3_EDE_DEC_TEST_VECTORS 3
2001#define DES3_EDE_CBC_ENC_TEST_VECTORS 1
2002#define DES3_EDE_CBC_DEC_TEST_VECTORS 1
2003
2004static struct cipher_testvec des_enc_tv_template[] = {
2005 { /* From Applied Cryptography */
2006 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2007 .klen = 8,
2008 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2009 .ilen = 8,
2010 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2011 .rlen = 8,
2012 }, { /* Same key, different plaintext block */
2013 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2014 .klen = 8,
2015 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2016 .ilen = 8,
2017 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2018 .rlen = 8,
2019 }, { /* Sbox test from NBS */
2020 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2021 .klen = 8,
2022 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2023 .ilen = 8,
2024 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2025 .rlen = 8,
2026 }, { /* Three blocks */
2027 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2028 .klen = 8,
2029 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2030 "\x22\x33\x44\x55\x66\x77\x88\x99"
2031 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2032 .ilen = 24,
2033 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2034 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2035 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2036 .rlen = 24,
2037 }, { /* Weak key */
2038 .fail = 1,
2039 .wk = 1,
2040 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2041 .klen = 8,
2042 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2043 .ilen = 8,
2044 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2045 .rlen = 8,
2046 }, { /* Two blocks -- for testing encryption across pages */
2047 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2048 .klen = 8,
2049 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2050 "\x22\x33\x44\x55\x66\x77\x88\x99",
2051 .ilen = 16,
2052 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2053 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2054 .rlen = 16,
2055 .np = 2,
2056 .tap = { 8, 8 }
2057 }, { /* Four blocks -- for testing encryption with chunking */
2058 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2059 .klen = 8,
2060 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2061 "\x22\x33\x44\x55\x66\x77\x88\x99"
2062 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2063 "\x22\x33\x44\x55\x66\x77\x88\x99",
2064 .ilen = 32,
2065 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2066 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2067 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2068 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2069 .rlen = 32,
2070 .np = 3,
2071 .tap = { 14, 10, 8 }
2072 }, {
2073 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2074 .klen = 8,
2075 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2076 "\x22\x33\x44\x55\x66\x77\x88\x99"
2077 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2078 .ilen = 24,
2079 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2080 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2081 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2082 .rlen = 24,
2083 .np = 4,
2084 .tap = { 2, 1, 3, 18 }
2085 }, {
2086 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2087 .klen = 8,
2088 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2089 "\x22\x33\x44\x55\x66\x77\x88\x99",
2090 .ilen = 16,
2091 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2092 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2093 .rlen = 16,
2094 .np = 5,
2095 .tap = { 2, 2, 2, 2, 8 }
2096 }, {
2097 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2098 .klen = 8,
2099 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2100 .ilen = 8,
2101 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2102 .rlen = 8,
2103 .np = 8,
2104 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
2105 },
2106};
2107
2108static struct cipher_testvec des_dec_tv_template[] = {
2109 { /* From Applied Cryptography */
2110 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2111 .klen = 8,
2112 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2113 .ilen = 8,
2114 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2115 .rlen = 8,
2116 }, { /* Sbox test from NBS */
2117 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2118 .klen = 8,
2119 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2120 .ilen = 8,
2121 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2122 .rlen = 8,
2123 }, { /* Two blocks, for chunking test */
2124 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2125 .klen = 8,
2126 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2127 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2128 .ilen = 16,
2129 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2130 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2131 .rlen = 16,
2132 .np = 2,
2133 .tap = { 8, 8 }
2134 }, {
2135 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2136 .klen = 8,
2137 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2138 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2139 .ilen = 16,
2140 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2141 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2142 .rlen = 16,
2143 .np = 3,
2144 .tap = { 3, 12, 1 }
2145 },
2146};
2147
2148static struct cipher_testvec des_cbc_enc_tv_template[] = {
2149 { /* From OpenSSL */
2150 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2151 .klen = 8,
2152 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2153 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2154 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2155 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2156 .ilen = 24,
2157 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2158 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2159 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2160 .rlen = 24,
2161 }, { /* FIPS Pub 81 */
2162 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2163 .klen = 8,
2164 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2165 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2166 .ilen = 8,
2167 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2168 .rlen = 8,
2169 }, {
2170 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2171 .klen = 8,
2172 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2173 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2174 .ilen = 8,
2175 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2176 .rlen = 8,
2177 }, {
2178 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2179 .klen = 8,
2180 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2181 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2182 .ilen = 8,
2183 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2184 .rlen = 8,
2185 }, { /* Copy of openssl vector for chunk testing */
2186 /* From OpenSSL */
2187 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2188 .klen = 8,
2189 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2190 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2191 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2192 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2193 .ilen = 24,
2194 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2195 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2196 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2197 .rlen = 24,
2198 .np = 2,
2199 .tap = { 13, 11 }
2200 },
2201};
2202
2203static struct cipher_testvec des_cbc_dec_tv_template[] = {
2204 { /* FIPS Pub 81 */
2205 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2206 .klen = 8,
2207 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2208 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2209 .ilen = 8,
2210 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2211 .rlen = 8,
2212 }, {
2213 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2214 .klen = 8,
2215 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2216 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2217 .ilen = 8,
2218 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2219 .rlen = 8,
2220 }, {
2221 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2222 .klen = 8,
2223 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2224 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2225 .ilen = 8,
2226 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2227 .rlen = 8,
2228 }, { /* Copy of above, for chunk testing */
2229 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2230 .klen = 8,
2231 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2232 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2233 .ilen = 8,
2234 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2235 .rlen = 8,
2236 .np = 2,
2237 .tap = { 4, 4 }
2238 },
2239};
2240
2241static struct cipher_testvec des3_ede_enc_tv_template[] = {
2242 { /* These are from openssl */
2243 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2244 "\x55\x55\x55\x55\x55\x55\x55\x55"
2245 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2246 .klen = 24,
2247 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2248 .ilen = 8,
2249 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2250 .rlen = 8,
2251 }, {
2252 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2253 "\x86\x02\x87\x66\x59\x08\x21\x98"
2254 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2255 .klen = 24,
2256 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2257 .ilen = 8,
2258 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2259 .rlen = 8,
2260 }, {
2261 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2262 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2263 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2264 .klen = 24,
2265 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2266 .ilen = 8,
2267 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2268 .rlen = 8,
2269 },
2270};
2271
2272static struct cipher_testvec des3_ede_dec_tv_template[] = {
2273 { /* These are from openssl */
2274 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2275 "\x55\x55\x55\x55\x55\x55\x55\x55"
2276 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2277 .klen = 24,
2278 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2279 .ilen = 8,
2280 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2281 .rlen = 8,
2282 }, {
2283 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2284 "\x86\x02\x87\x66\x59\x08\x21\x98"
2285 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2286 .klen = 24,
2287 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2288 .ilen = 8,
2289 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2290 .rlen = 8,
2291 }, {
2292 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2293 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2294 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2295 .klen = 24,
2296 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2297 .ilen = 8,
2298 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2299 .rlen = 8,
2300 },
2301};
2302
2303static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2304 { /* Generated from openssl */
2305 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2306 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2307 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2308 .klen = 24,
2309 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2310 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2311 "\x53\x20\x63\x65\x65\x72\x73\x74"
2312 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2313 "\x20\x79\x65\x53\x72\x63\x74\x65"
2314 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2315 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2316 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2317 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2318 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2319 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2320 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2321 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2322 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2323 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2324 "\x63\x65\x65\x72\x73\x74\x54\x20"
2325 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2326 .ilen = 128,
2327 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2328 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2329 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2330 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2331 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2332 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2333 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2334 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2335 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2336 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2337 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2338 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2339 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2340 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2341 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2342 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2343 .rlen = 128,
2344 },
2345};
2346
2347static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2348 { /* Generated from openssl */
2349 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2350 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2351 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2352 .klen = 24,
2353 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2354 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2355 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2356 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2357 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2358 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2359 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2360 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2361 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2362 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2363 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2364 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2365 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2366 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2367 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2368 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2369 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2370 .ilen = 128,
2371 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2372 "\x53\x20\x63\x65\x65\x72\x73\x74"
2373 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2374 "\x20\x79\x65\x53\x72\x63\x74\x65"
2375 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2376 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2377 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2378 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2379 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2380 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2381 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2382 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2383 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2384 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2385 "\x63\x65\x65\x72\x73\x74\x54\x20"
2386 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2387 .rlen = 128,
2388 },
2389};
2390
2391/*
2392 * Blowfish test vectors.
2393 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002394#define BF_ENC_TEST_VECTORS 7
2395#define BF_DEC_TEST_VECTORS 7
2396#define BF_CBC_ENC_TEST_VECTORS 2
2397#define BF_CBC_DEC_TEST_VECTORS 2
2398#define BF_CTR_ENC_TEST_VECTORS 2
2399#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08002400
2401static struct cipher_testvec bf_enc_tv_template[] = {
2402 { /* DES test vectors from OpenSSL */
2403 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2404 .klen = 8,
2405 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2406 .ilen = 8,
2407 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2408 .rlen = 8,
2409 }, {
2410 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2411 .klen = 8,
2412 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2413 .ilen = 8,
2414 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2415 .rlen = 8,
2416 }, {
2417 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2418 .klen = 8,
2419 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2420 .ilen = 8,
2421 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2422 .rlen = 8,
2423 }, { /* Vary the keylength... */
2424 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2425 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2426 .klen = 16,
2427 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2428 .ilen = 8,
2429 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2430 .rlen = 8,
2431 }, {
2432 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2433 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2434 "\x00\x11\x22\x33\x44",
2435 .klen = 21,
2436 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2437 .ilen = 8,
2438 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2439 .rlen = 8,
2440 }, { /* Generated with bf488 */
2441 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2442 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2443 "\x00\x11\x22\x33\x44\x55\x66\x77"
2444 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2445 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2446 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2447 "\xff\xff\xff\xff\xff\xff\xff\xff",
2448 .klen = 56,
2449 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2450 .ilen = 8,
2451 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2452 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002453 }, { /* Generated with Crypto++ */
2454 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2455 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2456 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2457 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2458 .klen = 32,
2459 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2460 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2461 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2462 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2463 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2464 .ilen = 40,
2465 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2466 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2467 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2468 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2469 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2470 .rlen = 40,
Herbert Xuda7f0332008-07-31 17:08:25 +08002471 },
2472};
2473
2474static struct cipher_testvec bf_dec_tv_template[] = {
2475 { /* DES test vectors from OpenSSL */
2476 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2477 .klen = 8,
2478 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2479 .ilen = 8,
2480 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2481 .rlen = 8,
2482 }, {
2483 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2484 .klen = 8,
2485 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2486 .ilen = 8,
2487 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2488 .rlen = 8,
2489 }, {
2490 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2491 .klen = 8,
2492 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2493 .ilen = 8,
2494 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2495 .rlen = 8,
2496 }, { /* Vary the keylength... */
2497 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2498 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2499 .klen = 16,
2500 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2501 .ilen = 8,
2502 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2503 .rlen = 8,
2504 }, {
2505 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2506 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2507 "\x00\x11\x22\x33\x44",
2508 .klen = 21,
2509 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2510 .ilen = 8,
2511 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2512 .rlen = 8,
2513 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
2514 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2515 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2516 "\x00\x11\x22\x33\x44\x55\x66\x77"
2517 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2518 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2519 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2520 "\xff\xff\xff\xff\xff\xff\xff\xff",
2521 .klen = 56,
2522 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2523 .ilen = 8,
2524 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2525 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002526 }, { /* Generated with Crypto++ */
2527 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2528 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2529 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2530 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2531 .klen = 32,
2532 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2533 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2534 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2535 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2536 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2537 .ilen = 40,
2538 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2539 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2540 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2541 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2542 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2543 .rlen = 40,
Herbert Xuda7f0332008-07-31 17:08:25 +08002544 },
2545};
2546
2547static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2548 { /* From OpenSSL */
2549 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2550 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2551 .klen = 16,
2552 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2553 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2554 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2555 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2556 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2557 .ilen = 32,
2558 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2559 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2560 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2561 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2562 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002563 }, { /* Generated with Crypto++ */
2564 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2565 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2566 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2567 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2568 .klen = 32,
2569 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2570 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2571 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2572 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2573 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2574 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2575 .ilen = 40,
2576 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2577 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2578 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2579 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2580 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2581 .rlen = 40,
Herbert Xuda7f0332008-07-31 17:08:25 +08002582 },
2583};
2584
2585static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2586 { /* From OpenSSL */
2587 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2588 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2589 .klen = 16,
2590 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2591 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2592 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2593 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2594 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2595 .ilen = 32,
2596 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2597 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2598 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2599 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2600 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002601 }, { /* Generated with Crypto++ */
2602 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2603 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2604 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2605 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2606 .klen = 32,
2607 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2608 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2609 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2610 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2611 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2612 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2613 .ilen = 40,
2614 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2615 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2616 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2617 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2618 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2619 .rlen = 40,
2620 },
2621};
2622
2623static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2624 { /* Generated with Crypto++ */
2625 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2626 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2627 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2628 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2629 .klen = 32,
2630 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2631 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2632 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2633 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2634 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2635 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2636 .ilen = 40,
2637 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2638 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2639 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2640 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2641 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2642 .rlen = 40,
2643 }, { /* Generated with Crypto++ */
2644 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2645 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2646 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2647 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2648 .klen = 32,
2649 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2650 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2651 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2652 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2653 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2654 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2655 "\x6D\x04\x9B",
2656 .ilen = 43,
2657 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2658 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2659 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2660 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2661 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2662 "\x3D\xA7\xE9",
2663 .rlen = 43,
2664 },
2665};
2666
2667static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2668 { /* Generated with Crypto++ */
2669 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2670 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2671 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2672 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2673 .klen = 32,
2674 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2675 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2676 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2677 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2678 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2679 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2680 .ilen = 40,
2681 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2682 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2683 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2684 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2685 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2686 .rlen = 40,
2687 }, { /* Generated with Crypto++ */
2688 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2689 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2690 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2691 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2692 .klen = 32,
2693 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2694 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2695 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2696 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2697 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2698 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2699 "\x3D\xA7\xE9",
2700 .ilen = 43,
2701 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2702 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2703 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2704 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2705 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2706 "\x6D\x04\x9B",
2707 .rlen = 43,
Herbert Xuda7f0332008-07-31 17:08:25 +08002708 },
2709};
2710
2711/*
2712 * Twofish test vectors.
2713 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03002714#define TF_ENC_TEST_VECTORS 4
2715#define TF_DEC_TEST_VECTORS 4
2716#define TF_CBC_ENC_TEST_VECTORS 5
2717#define TF_CBC_DEC_TEST_VECTORS 5
2718#define TF_CTR_ENC_TEST_VECTORS 2
2719#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03002720#define TF_LRW_ENC_TEST_VECTORS 8
2721#define TF_LRW_DEC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +08002722
2723static struct cipher_testvec tf_enc_tv_template[] = {
2724 {
2725 .key = zeroed_string,
2726 .klen = 16,
2727 .input = zeroed_string,
2728 .ilen = 16,
2729 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2730 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2731 .rlen = 16,
2732 }, {
2733 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2734 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2735 "\x00\x11\x22\x33\x44\x55\x66\x77",
2736 .klen = 24,
2737 .input = zeroed_string,
2738 .ilen = 16,
2739 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2740 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2741 .rlen = 16,
2742 }, {
2743 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2744 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2745 "\x00\x11\x22\x33\x44\x55\x66\x77"
2746 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2747 .klen = 32,
2748 .input = zeroed_string,
2749 .ilen = 16,
2750 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2751 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2752 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03002753 }, { /* Generated with Crypto++ */
2754 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2755 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2756 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2757 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2758 .klen = 32,
2759 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2760 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2761 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2762 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2763 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2764 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2765 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2766 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2767 .ilen = 64,
2768 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2769 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2770 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2771 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2772 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2773 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2774 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
2775 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
2776 .rlen = 64,
Herbert Xuda7f0332008-07-31 17:08:25 +08002777 },
2778};
2779
2780static struct cipher_testvec tf_dec_tv_template[] = {
2781 {
2782 .key = zeroed_string,
2783 .klen = 16,
2784 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2785 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2786 .ilen = 16,
2787 .result = zeroed_string,
2788 .rlen = 16,
2789 }, {
2790 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2791 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2792 "\x00\x11\x22\x33\x44\x55\x66\x77",
2793 .klen = 24,
2794 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2795 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2796 .ilen = 16,
2797 .result = zeroed_string,
2798 .rlen = 16,
2799 }, {
2800 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2801 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2802 "\x00\x11\x22\x33\x44\x55\x66\x77"
2803 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2804 .klen = 32,
2805 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2806 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2807 .ilen = 16,
2808 .result = zeroed_string,
2809 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03002810 }, { /* Generated with Crypto++ */
2811 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2812 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2813 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2814 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2815 .klen = 32,
2816 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2817 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2818 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2819 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2820 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2821 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2822 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
2823 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
2824 .ilen = 64,
2825 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2826 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2827 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2828 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2829 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2830 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2831 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2832 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2833 .rlen = 64,
Herbert Xuda7f0332008-07-31 17:08:25 +08002834 },
2835};
2836
2837static struct cipher_testvec tf_cbc_enc_tv_template[] = {
2838 { /* Generated with Nettle */
2839 .key = zeroed_string,
2840 .klen = 16,
2841 .iv = zeroed_string,
2842 .input = zeroed_string,
2843 .ilen = 16,
2844 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2845 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2846 .rlen = 16,
2847 }, {
2848 .key = zeroed_string,
2849 .klen = 16,
2850 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2851 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2852 .input = zeroed_string,
2853 .ilen = 16,
2854 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2855 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2856 .rlen = 16,
2857 }, {
2858 .key = zeroed_string,
2859 .klen = 16,
2860 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2861 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2862 .input = zeroed_string,
2863 .ilen = 16,
2864 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2865 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2866 .rlen = 16,
2867 }, {
2868 .key = zeroed_string,
2869 .klen = 16,
2870 .iv = zeroed_string,
2871 .input = zeroed_string,
2872 .ilen = 48,
2873 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2874 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2875 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2876 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2877 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2878 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2879 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03002880 }, { /* Generated with Crypto++ */
2881 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2882 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2883 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2884 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2885 .klen = 32,
2886 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2887 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2888 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2889 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2890 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2891 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2892 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2893 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2894 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2895 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2896 .ilen = 64,
2897 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
2898 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
2899 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
2900 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
2901 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
2902 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
2903 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
2904 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
2905 .rlen = 64,
Herbert Xuda7f0332008-07-31 17:08:25 +08002906 },
2907};
2908
2909static struct cipher_testvec tf_cbc_dec_tv_template[] = {
2910 { /* Reverse of the first four above */
2911 .key = zeroed_string,
2912 .klen = 16,
2913 .iv = zeroed_string,
2914 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2915 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2916 .ilen = 16,
2917 .result = zeroed_string,
2918 .rlen = 16,
2919 }, {
2920 .key = zeroed_string,
2921 .klen = 16,
2922 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2923 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2924 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2925 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2926 .ilen = 16,
2927 .result = zeroed_string,
2928 .rlen = 16,
2929 }, {
2930 .key = zeroed_string,
2931 .klen = 16,
2932 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2933 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2934 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2935 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2936 .ilen = 16,
2937 .result = zeroed_string,
2938 .rlen = 16,
2939 }, {
2940 .key = zeroed_string,
2941 .klen = 16,
2942 .iv = zeroed_string,
2943 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2944 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2945 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2946 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2947 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2948 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2949 .ilen = 48,
2950 .result = zeroed_string,
2951 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03002952 }, { /* Generated with Crypto++ */
2953 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2954 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2955 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2956 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2957 .klen = 32,
2958 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2959 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2960 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
2961 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
2962 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
2963 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
2964 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
2965 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
2966 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
2967 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
2968 .ilen = 64,
2969 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2970 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2971 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2972 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2973 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2974 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2975 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2976 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2977 .rlen = 64,
2978 },
2979};
2980
2981static struct cipher_testvec tf_ctr_enc_tv_template[] = {
2982 { /* Generated with Crypto++ */
2983 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2984 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2985 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2986 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2987 .klen = 32,
2988 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2989 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2990 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2991 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2992 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2993 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2994 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2995 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2996 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2997 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2998 .ilen = 64,
2999 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3000 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3001 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3002 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3003 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3004 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3005 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3006 "\x01\x41\x21\x12\x38\xAB\x52\x4F",
3007 .rlen = 64,
3008 }, { /* Generated with Crypto++ */
3009 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3010 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3011 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3012 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3013 .klen = 32,
3014 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3015 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3016 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3017 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3018 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3019 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3020 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3021 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3022 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3023 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3024 "\xC3\x37\xCE",
3025 .ilen = 67,
3026 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3027 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3028 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3029 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3030 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3031 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3032 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3033 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3034 "\xA8\x57\x20",
3035 .rlen = 67,
3036 },
3037};
3038
3039static struct cipher_testvec tf_ctr_dec_tv_template[] = {
3040 { /* Generated with Crypto++ */
3041 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3042 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3043 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3044 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3045 .klen = 32,
3046 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3047 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3048 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3049 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3050 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3051 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3052 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3053 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3054 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3055 "\x01\x41\x21\x12\x38\xAB\x52\x4F",
3056 .ilen = 64,
3057 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3058 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3059 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3060 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3061 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3062 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3063 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3064 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
3065 .rlen = 64,
3066 }, { /* Generated with Crypto++ */
3067 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3068 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3069 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3070 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3071 .klen = 32,
3072 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3073 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3074 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3075 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3076 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3077 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3078 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3079 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3080 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3081 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3082 "\xA8\x57\x20",
3083 .ilen = 67,
3084 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3085 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3086 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3087 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3088 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3089 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3090 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3091 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3092 "\xC3\x37\xCE",
3093 .rlen = 67,
Herbert Xuda7f0332008-07-31 17:08:25 +08003094 },
3095};
3096
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03003097static struct cipher_testvec tf_lrw_enc_tv_template[] = {
3098 /* Generated from AES-LRW test vectors */
3099 {
3100 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
3101 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
3102 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
3103 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
3104 .klen = 32,
3105 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3106 "\x00\x00\x00\x00\x00\x00\x00\x01",
3107 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3108 "\x38\x39\x41\x42\x43\x44\x45\x46",
3109 .ilen = 16,
3110 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
3111 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
3112 .rlen = 16,
3113 }, {
3114 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
3115 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
3116 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
3117 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
3118 .klen = 32,
3119 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3120 "\x00\x00\x00\x00\x00\x00\x00\x02",
3121 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3122 "\x38\x39\x41\x42\x43\x44\x45\x46",
3123 .ilen = 16,
3124 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
3125 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
3126 .rlen = 16,
3127 }, {
3128 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
3129 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
3130 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
3131 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
3132 .klen = 32,
3133 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3134 "\x00\x00\x00\x02\x00\x00\x00\x00",
3135 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3136 "\x38\x39\x41\x42\x43\x44\x45\x46",
3137 .ilen = 16,
3138 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
3139 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
3140 .rlen = 16,
3141 }, {
3142 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
3143 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
3144 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
3145 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
3146 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
3147 .klen = 40,
3148 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3149 "\x00\x00\x00\x00\x00\x00\x00\x01",
3150 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3151 "\x38\x39\x41\x42\x43\x44\x45\x46",
3152 .ilen = 16,
3153 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
3154 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
3155 .rlen = 16,
3156 }, {
3157 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
3158 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
3159 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
3160 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
3161 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
3162 .klen = 40,
3163 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3164 "\x00\x00\x00\x02\x00\x00\x00\x00",
3165 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3166 "\x38\x39\x41\x42\x43\x44\x45\x46",
3167 .ilen = 16,
3168 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
3169 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
3170 .rlen = 16,
3171 }, {
3172 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3173 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3174 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3175 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3176 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3177 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3178 .klen = 48,
3179 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3180 "\x00\x00\x00\x00\x00\x00\x00\x01",
3181 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3182 "\x38\x39\x41\x42\x43\x44\x45\x46",
3183 .ilen = 16,
3184 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
3185 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
3186 .rlen = 16,
3187 }, {
3188 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
3189 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
3190 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
3191 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
3192 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
3193 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
3194 .klen = 48,
3195 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3196 "\x00\x00\x00\x02\x00\x00\x00\x00",
3197 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3198 "\x38\x39\x41\x42\x43\x44\x45\x46",
3199 .ilen = 16,
3200 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
3201 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
3202 .rlen = 16,
3203 }, {
3204 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3205 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3206 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3207 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3208 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3209 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3210 .klen = 48,
3211 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3212 "\x00\x00\x00\x00\x00\x00\x00\x01",
3213 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
3214 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
3215 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
3216 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
3217 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
3218 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
3219 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
3220 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
3221 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
3222 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
3223 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
3224 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
3225 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
3226 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
3227 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3228 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3229 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3230 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3231 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3232 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3233 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3234 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3235 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3236 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3237 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3238 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3239 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3240 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3241 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3242 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3243 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3244 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3245 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3246 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3247 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3248 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3249 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3250 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3251 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3252 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3253 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3254 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3255 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3256 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3257 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3258 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3259 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3260 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3261 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3262 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3263 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3264 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3265 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3266 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3267 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3268 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3269 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3270 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3271 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3272 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3273 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3274 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3275 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3276 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
3277 .ilen = 512,
3278 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
3279 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
3280 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
3281 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
3282 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
3283 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
3284 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
3285 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
3286 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
3287 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
3288 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
3289 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
3290 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
3291 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
3292 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
3293 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
3294 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
3295 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
3296 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
3297 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
3298 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
3299 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
3300 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
3301 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
3302 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
3303 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
3304 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
3305 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
3306 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
3307 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
3308 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
3309 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
3310 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
3311 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
3312 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
3313 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
3314 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
3315 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
3316 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
3317 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
3318 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
3319 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
3320 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
3321 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
3322 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
3323 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
3324 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
3325 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
3326 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
3327 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
3328 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
3329 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
3330 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
3331 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
3332 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
3333 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
3334 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
3335 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
3336 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
3337 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
3338 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
3339 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
3340 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
3341 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
3342 .rlen = 512,
3343 },
3344};
3345
3346static struct cipher_testvec tf_lrw_dec_tv_template[] = {
3347 /* Generated from AES-LRW test vectors */
3348 /* same as enc vectors with input and result reversed */
3349 {
3350 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
3351 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
3352 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
3353 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
3354 .klen = 32,
3355 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3356 "\x00\x00\x00\x00\x00\x00\x00\x01",
3357 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
3358 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
3359 .ilen = 16,
3360 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3361 "\x38\x39\x41\x42\x43\x44\x45\x46",
3362 .rlen = 16,
3363 }, {
3364 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
3365 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
3366 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
3367 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
3368 .klen = 32,
3369 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3370 "\x00\x00\x00\x00\x00\x00\x00\x02",
3371 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
3372 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
3373 .ilen = 16,
3374 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3375 "\x38\x39\x41\x42\x43\x44\x45\x46",
3376 .rlen = 16,
3377 }, {
3378 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
3379 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
3380 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
3381 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
3382 .klen = 32,
3383 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3384 "\x00\x00\x00\x02\x00\x00\x00\x00",
3385 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
3386 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
3387 .ilen = 16,
3388 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3389 "\x38\x39\x41\x42\x43\x44\x45\x46",
3390 .rlen = 16,
3391 }, {
3392 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
3393 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
3394 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
3395 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
3396 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
3397 .klen = 40,
3398 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3399 "\x00\x00\x00\x00\x00\x00\x00\x01",
3400 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
3401 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
3402 .ilen = 16,
3403 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3404 "\x38\x39\x41\x42\x43\x44\x45\x46",
3405 .rlen = 16,
3406 }, {
3407 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
3408 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
3409 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
3410 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
3411 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
3412 .klen = 40,
3413 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3414 "\x00\x00\x00\x02\x00\x00\x00\x00",
3415 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
3416 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
3417 .ilen = 16,
3418 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3419 "\x38\x39\x41\x42\x43\x44\x45\x46",
3420 .rlen = 16,
3421 }, {
3422 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3423 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3424 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3425 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3426 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3427 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3428 .klen = 48,
3429 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3430 "\x00\x00\x00\x00\x00\x00\x00\x01",
3431 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
3432 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
3433 .ilen = 16,
3434 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3435 "\x38\x39\x41\x42\x43\x44\x45\x46",
3436 .rlen = 16,
3437 }, {
3438 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
3439 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
3440 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
3441 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
3442 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
3443 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
3444 .klen = 48,
3445 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3446 "\x00\x00\x00\x02\x00\x00\x00\x00",
3447 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
3448 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
3449 .ilen = 16,
3450 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3451 "\x38\x39\x41\x42\x43\x44\x45\x46",
3452 .rlen = 16,
3453 }, {
3454 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3455 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3456 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3457 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3458 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3459 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3460 .klen = 48,
3461 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3462 "\x00\x00\x00\x00\x00\x00\x00\x01",
3463 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
3464 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
3465 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
3466 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
3467 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
3468 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
3469 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
3470 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
3471 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
3472 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
3473 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
3474 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
3475 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
3476 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
3477 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
3478 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
3479 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
3480 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
3481 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
3482 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
3483 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
3484 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
3485 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
3486 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
3487 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
3488 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
3489 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
3490 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
3491 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
3492 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
3493 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
3494 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
3495 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
3496 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
3497 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
3498 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
3499 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
3500 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
3501 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
3502 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
3503 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
3504 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
3505 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
3506 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
3507 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
3508 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
3509 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
3510 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
3511 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
3512 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
3513 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
3514 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
3515 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
3516 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
3517 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
3518 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
3519 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
3520 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
3521 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
3522 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
3523 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
3524 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
3525 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
3526 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
3527 .ilen = 512,
3528 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
3529 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
3530 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
3531 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
3532 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
3533 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
3534 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
3535 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
3536 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
3537 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
3538 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
3539 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
3540 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
3541 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
3542 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3543 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3544 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3545 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3546 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3547 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3548 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3549 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3550 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3551 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3552 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3553 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3554 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3555 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3556 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3557 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3558 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3559 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3560 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3561 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3562 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3563 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3564 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3565 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3566 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3567 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3568 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3569 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3570 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3571 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3572 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3573 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3574 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3575 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3576 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3577 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3578 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3579 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3580 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3581 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3582 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3583 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3584 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3585 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3586 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3587 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3588 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3589 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3590 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3591 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
3592 .rlen = 512,
3593 },
3594};
3595
Herbert Xuda7f0332008-07-31 17:08:25 +08003596/*
3597 * Serpent test vectors. These are backwards because Serpent writes
3598 * octet sequences in right-to-left mode.
3599 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03003600#define SERPENT_ENC_TEST_VECTORS 5
3601#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08003602
3603#define TNEPRES_ENC_TEST_VECTORS 4
3604#define TNEPRES_DEC_TEST_VECTORS 4
3605
Jussi Kivilinna9d259172011-10-18 00:02:53 +03003606#define SERPENT_CBC_ENC_TEST_VECTORS 1
3607#define SERPENT_CBC_DEC_TEST_VECTORS 1
3608
3609#define SERPENT_CTR_ENC_TEST_VECTORS 2
3610#define SERPENT_CTR_DEC_TEST_VECTORS 2
3611
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03003612#define SERPENT_LRW_ENC_TEST_VECTORS 8
3613#define SERPENT_LRW_DEC_TEST_VECTORS 8
3614
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03003615#define SERPENT_XTS_ENC_TEST_VECTORS 5
3616#define SERPENT_XTS_DEC_TEST_VECTORS 5
3617
Herbert Xuda7f0332008-07-31 17:08:25 +08003618static struct cipher_testvec serpent_enc_tv_template[] = {
3619 {
3620 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3621 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3622 .ilen = 16,
3623 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
3624 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
3625 .rlen = 16,
3626 }, {
3627 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3628 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3629 .klen = 16,
3630 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3631 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3632 .ilen = 16,
3633 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
3634 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
3635 .rlen = 16,
3636 }, {
3637 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3638 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3639 "\x10\x11\x12\x13\x14\x15\x16\x17"
3640 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3641 .klen = 32,
3642 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3643 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3644 .ilen = 16,
3645 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
3646 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
3647 .rlen = 16,
3648 }, {
3649 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
3650 .klen = 16,
3651 .input = zeroed_string,
3652 .ilen = 16,
3653 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
3654 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
3655 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03003656 }, { /* Generated with Crypto++ */
3657 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3658 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3659 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3660 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3661 .klen = 32,
3662 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3663 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3664 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3665 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3666 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3667 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3668 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3669 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3670 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3671 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3672 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3673 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3674 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3675 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3676 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3677 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3678 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3679 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
3680 .ilen = 144,
3681 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
3682 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
3683 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
3684 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
3685 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
3686 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
3687 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
3688 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
3689 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
3690 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
3691 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
3692 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
3693 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
3694 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
3695 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
3696 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
3697 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
3698 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
3699 .rlen = 144,
Herbert Xuda7f0332008-07-31 17:08:25 +08003700 },
3701};
3702
3703static struct cipher_testvec tnepres_enc_tv_template[] = {
3704 { /* KeySize=128, PT=0, I=1 */
3705 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
3706 "\x00\x00\x00\x00\x00\x00\x00\x00",
3707 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
3708 "\x00\x00\x00\x00\x00\x00\x00\x00",
3709 .klen = 16,
3710 .ilen = 16,
3711 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
3712 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
3713 .rlen = 16,
3714 }, { /* KeySize=192, PT=0, I=1 */
3715 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
3716 "\x00\x00\x00\x00\x00\x00\x00\x00"
3717 "\x00\x00\x00\x00\x00\x00\x00\x00",
3718 .klen = 24,
3719 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
3720 "\x00\x00\x00\x00\x00\x00\x00\x00",
3721 .ilen = 16,
3722 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
3723 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
3724 .rlen = 16,
3725 }, { /* KeySize=256, PT=0, I=1 */
3726 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
3727 "\x00\x00\x00\x00\x00\x00\x00\x00"
3728 "\x00\x00\x00\x00\x00\x00\x00\x00"
3729 "\x00\x00\x00\x00\x00\x00\x00\x00",
3730 .klen = 32,
3731 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
3732 "\x00\x00\x00\x00\x00\x00\x00\x00",
3733 .ilen = 16,
3734 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
3735 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
3736 .rlen = 16,
3737 }, { /* KeySize=256, I=257 */
3738 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
3739 "\x17\x16\x15\x14\x13\x12\x11\x10"
3740 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
3741 "\x07\x06\x05\x04\x03\x02\x01\x00",
3742 .klen = 32,
3743 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
3744 "\x07\x06\x05\x04\x03\x02\x01\x00",
3745 .ilen = 16,
3746 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
3747 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
3748 .rlen = 16,
3749 },
3750};
3751
3752
3753static struct cipher_testvec serpent_dec_tv_template[] = {
3754 {
3755 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
3756 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
3757 .ilen = 16,
3758 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3759 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3760 .rlen = 16,
3761 }, {
3762 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3763 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3764 .klen = 16,
3765 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
3766 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
3767 .ilen = 16,
3768 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3769 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3770 .rlen = 16,
3771 }, {
3772 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3773 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3774 "\x10\x11\x12\x13\x14\x15\x16\x17"
3775 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3776 .klen = 32,
3777 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
3778 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
3779 .ilen = 16,
3780 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3781 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3782 .rlen = 16,
3783 }, {
3784 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
3785 .klen = 16,
3786 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
3787 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
3788 .ilen = 16,
3789 .result = zeroed_string,
3790 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03003791 }, { /* Generated with Crypto++ */
3792 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3793 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3794 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3795 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3796 .klen = 32,
3797 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
3798 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
3799 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
3800 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
3801 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
3802 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
3803 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
3804 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
3805 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
3806 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
3807 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
3808 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
3809 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
3810 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
3811 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
3812 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
3813 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
3814 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
3815 .ilen = 144,
3816 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3817 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3818 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3819 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3820 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3821 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3822 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3823 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3824 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3825 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3826 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3827 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3828 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3829 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3830 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3831 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3832 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3833 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
3834 .rlen = 144,
Herbert Xuda7f0332008-07-31 17:08:25 +08003835 },
3836};
3837
3838static struct cipher_testvec tnepres_dec_tv_template[] = {
3839 {
3840 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
3841 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
3842 .ilen = 16,
3843 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3844 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3845 .rlen = 16,
3846 }, {
3847 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3848 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3849 .klen = 16,
3850 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
3851 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
3852 .ilen = 16,
3853 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3854 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3855 .rlen = 16,
3856 }, {
3857 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3858 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3859 "\x10\x11\x12\x13\x14\x15\x16\x17"
3860 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3861 .klen = 32,
3862 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
3863 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
3864 .ilen = 16,
3865 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3866 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
3867 .rlen = 16,
3868 }, { /* KeySize=128, I=121 */
3869 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
3870 .klen = 16,
3871 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
3872 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
3873 .ilen = 16,
3874 .result = zeroed_string,
3875 .rlen = 16,
3876 },
3877};
3878
Jussi Kivilinna9d259172011-10-18 00:02:53 +03003879static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
3880 { /* Generated with Crypto++ */
3881 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3882 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3883 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3884 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3885 .klen = 32,
3886 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3887 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3888 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3889 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3890 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3891 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3892 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3893 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3894 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3895 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3896 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3897 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3898 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3899 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3900 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3901 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3902 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3903 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3904 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3905 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
3906 .ilen = 144,
3907 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
3908 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
3909 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
3910 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
3911 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
3912 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
3913 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
3914 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
3915 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
3916 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
3917 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
3918 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
3919 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
3920 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
3921 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
3922 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
3923 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
3924 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
3925 .rlen = 144,
3926 },
3927};
3928
3929static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
3930 { /* Generated with Crypto++ */
3931 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3932 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3933 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3934 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3935 .klen = 32,
3936 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3937 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3938 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
3939 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
3940 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
3941 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
3942 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
3943 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
3944 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
3945 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
3946 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
3947 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
3948 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
3949 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
3950 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
3951 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
3952 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
3953 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
3954 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
3955 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
3956 .ilen = 144,
3957 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3958 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3959 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3960 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3961 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3962 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3963 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3964 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3965 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3966 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3967 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3968 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3969 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3970 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3971 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3972 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3973 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3974 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
3975 .rlen = 144,
3976 },
3977};
3978
3979static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
3980 { /* Generated with Crypto++ */
3981 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3982 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3983 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3984 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3985 .klen = 32,
3986 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3987 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3988 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3989 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3990 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3991 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3992 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3993 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3994 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3995 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3996 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3997 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3998 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3999 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4000 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4001 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4002 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4003 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4004 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4005 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4006 .ilen = 144,
4007 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4008 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4009 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4010 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4011 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4012 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4013 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4014 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4015 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4016 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4017 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4018 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4019 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4020 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4021 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4022 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4023 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4024 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
4025 .rlen = 144,
4026 }, { /* Generated with Crypto++ */
4027 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4028 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4029 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4030 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4031 .klen = 32,
4032 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4033 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4034 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4035 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4036 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4037 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4038 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4039 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4040 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4041 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4042 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4043 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4044 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4045 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4046 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4047 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4048 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4049 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4050 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4051 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4052 "\xF1\x65\xFC",
4053 .ilen = 147,
4054 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4055 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4056 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4057 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4058 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4059 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4060 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4061 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4062 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4063 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4064 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4065 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4066 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4067 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4068 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4069 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4070 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4071 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
4072 "\xE6\xD0\x97",
4073 .rlen = 147,
4074 },
4075};
4076
4077static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
4078 { /* Generated with Crypto++ */
4079 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4080 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4081 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4082 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4083 .klen = 32,
4084 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4085 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4086 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4087 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4088 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4089 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4090 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4091 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4092 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4093 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4094 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4095 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4096 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4097 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4098 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4099 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4100 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4101 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4102 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4103 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
4104 .ilen = 144,
4105 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4106 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4107 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4108 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4109 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4110 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4111 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4112 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4113 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4114 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4115 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4116 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4117 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4118 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4119 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4120 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4121 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4122 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4123 .rlen = 144,
4124 }, { /* Generated with Crypto++ */
4125 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4126 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4127 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4128 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4129 .klen = 32,
4130 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4131 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4132 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4133 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4134 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4135 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4136 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4137 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4138 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4139 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4140 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4141 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4142 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4143 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4144 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4145 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4146 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4147 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4148 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4149 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
4150 "\xE6\xD0\x97",
4151 .ilen = 147,
4152 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4153 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4154 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4155 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4156 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4157 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4158 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4159 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4160 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4161 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4162 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4163 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4164 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4165 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4166 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4167 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4168 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4169 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4170 "\xF1\x65\xFC",
4171 .rlen = 147,
4172 },
4173};
Herbert Xuda7f0332008-07-31 17:08:25 +08004174
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03004175static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
4176 /* Generated from AES-LRW test vectors */
4177 {
4178 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4179 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4180 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4181 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4182 .klen = 32,
4183 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4184 "\x00\x00\x00\x00\x00\x00\x00\x01",
4185 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4186 "\x38\x39\x41\x42\x43\x44\x45\x46",
4187 .ilen = 16,
4188 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
4189 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
4190 .rlen = 16,
4191 }, {
4192 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4193 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4194 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4195 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4196 .klen = 32,
4197 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4198 "\x00\x00\x00\x00\x00\x00\x00\x02",
4199 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4200 "\x38\x39\x41\x42\x43\x44\x45\x46",
4201 .ilen = 16,
4202 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
4203 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
4204 .rlen = 16,
4205 }, {
4206 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4207 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4208 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4209 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4210 .klen = 32,
4211 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4212 "\x00\x00\x00\x02\x00\x00\x00\x00",
4213 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4214 "\x38\x39\x41\x42\x43\x44\x45\x46",
4215 .ilen = 16,
4216 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
4217 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
4218 .rlen = 16,
4219 }, {
4220 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4221 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4222 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4223 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4224 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4225 .klen = 40,
4226 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4227 "\x00\x00\x00\x00\x00\x00\x00\x01",
4228 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4229 "\x38\x39\x41\x42\x43\x44\x45\x46",
4230 .ilen = 16,
4231 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
4232 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
4233 .rlen = 16,
4234 }, {
4235 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4236 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4237 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4238 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4239 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4240 .klen = 40,
4241 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4242 "\x00\x00\x00\x02\x00\x00\x00\x00",
4243 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4244 "\x38\x39\x41\x42\x43\x44\x45\x46",
4245 .ilen = 16,
4246 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
4247 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
4248 .rlen = 16,
4249 }, {
4250 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4251 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4252 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4253 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4254 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4255 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4256 .klen = 48,
4257 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4258 "\x00\x00\x00\x00\x00\x00\x00\x01",
4259 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4260 "\x38\x39\x41\x42\x43\x44\x45\x46",
4261 .ilen = 16,
4262 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
4263 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
4264 .rlen = 16,
4265 }, {
4266 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4267 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4268 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4269 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4270 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4271 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4272 .klen = 48,
4273 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4274 "\x00\x00\x00\x02\x00\x00\x00\x00",
4275 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4276 "\x38\x39\x41\x42\x43\x44\x45\x46",
4277 .ilen = 16,
4278 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
4279 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
4280 .rlen = 16,
4281 }, {
4282 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4283 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4284 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4285 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4286 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4287 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4288 .klen = 48,
4289 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4290 "\x00\x00\x00\x00\x00\x00\x00\x01",
4291 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4292 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4293 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4294 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4295 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4296 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4297 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4298 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4299 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4300 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4301 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4302 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4303 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4304 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4305 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4306 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4307 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4308 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4309 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4310 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4311 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4312 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4313 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4314 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4315 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4316 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4317 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4318 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4319 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4320 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4321 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4322 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4323 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4324 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4325 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4326 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4327 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4328 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4329 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4330 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4331 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4332 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4333 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4334 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4335 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4336 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4337 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4338 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4339 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4340 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4341 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4342 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4343 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4344 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4345 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4346 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4347 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4348 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4349 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4350 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4351 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4352 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4353 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4354 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4355 .ilen = 512,
4356 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
4357 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
4358 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
4359 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
4360 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
4361 "\xce\xab\xda\x33\x30\x20\x12\xfa"
4362 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
4363 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
4364 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
4365 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
4366 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
4367 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
4368 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
4369 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
4370 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
4371 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
4372 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
4373 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
4374 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
4375 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
4376 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
4377 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
4378 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
4379 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
4380 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
4381 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
4382 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
4383 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
4384 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
4385 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
4386 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
4387 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
4388 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
4389 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
4390 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
4391 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
4392 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
4393 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
4394 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
4395 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
4396 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
4397 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
4398 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
4399 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
4400 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
4401 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
4402 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
4403 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
4404 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
4405 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
4406 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
4407 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
4408 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
4409 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
4410 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
4411 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
4412 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
4413 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
4414 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
4415 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
4416 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
4417 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
4418 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
4419 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
4420 .rlen = 512,
4421 },
4422};
4423
4424static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
4425 /* Generated from AES-LRW test vectors */
4426 /* same as enc vectors with input and result reversed */
4427 {
4428 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4429 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4430 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4431 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4432 .klen = 32,
4433 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4434 "\x00\x00\x00\x00\x00\x00\x00\x01",
4435 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
4436 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
4437 .ilen = 16,
4438 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4439 "\x38\x39\x41\x42\x43\x44\x45\x46",
4440 .rlen = 16,
4441 }, {
4442 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4443 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4444 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4445 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4446 .klen = 32,
4447 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4448 "\x00\x00\x00\x00\x00\x00\x00\x02",
4449 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
4450 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
4451 .ilen = 16,
4452 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4453 "\x38\x39\x41\x42\x43\x44\x45\x46",
4454 .rlen = 16,
4455 }, {
4456 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4457 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4458 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4459 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4460 .klen = 32,
4461 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4462 "\x00\x00\x00\x02\x00\x00\x00\x00",
4463 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
4464 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
4465 .ilen = 16,
4466 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4467 "\x38\x39\x41\x42\x43\x44\x45\x46",
4468 .rlen = 16,
4469 }, {
4470 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4471 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4472 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4473 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4474 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4475 .klen = 40,
4476 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4477 "\x00\x00\x00\x00\x00\x00\x00\x01",
4478 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
4479 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
4480 .ilen = 16,
4481 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4482 "\x38\x39\x41\x42\x43\x44\x45\x46",
4483 .rlen = 16,
4484 }, {
4485 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4486 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4487 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4488 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4489 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4490 .klen = 40,
4491 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4492 "\x00\x00\x00\x02\x00\x00\x00\x00",
4493 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
4494 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
4495 .ilen = 16,
4496 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4497 "\x38\x39\x41\x42\x43\x44\x45\x46",
4498 .rlen = 16,
4499 }, {
4500 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4501 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4502 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4503 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4504 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4505 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4506 .klen = 48,
4507 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4508 "\x00\x00\x00\x00\x00\x00\x00\x01",
4509 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
4510 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
4511 .ilen = 16,
4512 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4513 "\x38\x39\x41\x42\x43\x44\x45\x46",
4514 .rlen = 16,
4515 }, {
4516 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4517 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4518 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4519 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4520 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4521 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4522 .klen = 48,
4523 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4524 "\x00\x00\x00\x02\x00\x00\x00\x00",
4525 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
4526 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
4527 .ilen = 16,
4528 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4529 "\x38\x39\x41\x42\x43\x44\x45\x46",
4530 .rlen = 16,
4531 }, {
4532 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4533 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4534 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4535 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4536 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4537 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4538 .klen = 48,
4539 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4540 "\x00\x00\x00\x00\x00\x00\x00\x01",
4541 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
4542 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
4543 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
4544 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
4545 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
4546 "\xce\xab\xda\x33\x30\x20\x12\xfa"
4547 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
4548 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
4549 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
4550 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
4551 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
4552 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
4553 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
4554 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
4555 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
4556 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
4557 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
4558 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
4559 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
4560 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
4561 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
4562 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
4563 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
4564 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
4565 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
4566 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
4567 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
4568 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
4569 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
4570 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
4571 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
4572 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
4573 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
4574 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
4575 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
4576 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
4577 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
4578 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
4579 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
4580 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
4581 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
4582 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
4583 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
4584 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
4585 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
4586 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
4587 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
4588 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
4589 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
4590 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
4591 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
4592 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
4593 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
4594 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
4595 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
4596 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
4597 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
4598 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
4599 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
4600 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
4601 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
4602 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
4603 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
4604 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
4605 .ilen = 512,
4606 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4607 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4608 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4609 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4610 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4611 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4612 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4613 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4614 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4615 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4616 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4617 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4618 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4619 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4620 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4621 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4622 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4623 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4624 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4625 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4626 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4627 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4628 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4629 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4630 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4631 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4632 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4633 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4634 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4635 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4636 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4637 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4638 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4639 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4640 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4641 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4642 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4643 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4644 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4645 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4646 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4647 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4648 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4649 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4650 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4651 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4652 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4653 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4654 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4655 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4656 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4657 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4658 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4659 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4660 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4661 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4662 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4663 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4664 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4665 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4666 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4667 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4668 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4669 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4670 .rlen = 512,
4671 },
4672};
4673
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03004674static struct cipher_testvec serpent_xts_enc_tv_template[] = {
4675 /* Generated from AES-XTS test vectors */
4676 {
4677 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
4678 "\x00\x00\x00\x00\x00\x00\x00\x00"
4679 "\x00\x00\x00\x00\x00\x00\x00\x00"
4680 "\x00\x00\x00\x00\x00\x00\x00\x00",
4681 .klen = 32,
4682 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4683 "\x00\x00\x00\x00\x00\x00\x00\x00",
4684 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
4685 "\x00\x00\x00\x00\x00\x00\x00\x00"
4686 "\x00\x00\x00\x00\x00\x00\x00\x00"
4687 "\x00\x00\x00\x00\x00\x00\x00\x00",
4688 .ilen = 32,
4689 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
4690 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
4691 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
4692 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
4693 .rlen = 32,
4694 }, {
4695 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
4696 "\x11\x11\x11\x11\x11\x11\x11\x11"
4697 "\x22\x22\x22\x22\x22\x22\x22\x22"
4698 "\x22\x22\x22\x22\x22\x22\x22\x22",
4699 .klen = 32,
4700 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4701 "\x00\x00\x00\x00\x00\x00\x00\x00",
4702 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
4703 "\x44\x44\x44\x44\x44\x44\x44\x44"
4704 "\x44\x44\x44\x44\x44\x44\x44\x44"
4705 "\x44\x44\x44\x44\x44\x44\x44\x44",
4706 .ilen = 32,
4707 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
4708 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
4709 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
4710 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
4711 .rlen = 32,
4712 }, {
4713 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
4714 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
4715 "\x22\x22\x22\x22\x22\x22\x22\x22"
4716 "\x22\x22\x22\x22\x22\x22\x22\x22",
4717 .klen = 32,
4718 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
4719 "\x00\x00\x00\x00\x00\x00\x00\x00",
4720 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
4721 "\x44\x44\x44\x44\x44\x44\x44\x44"
4722 "\x44\x44\x44\x44\x44\x44\x44\x44"
4723 "\x44\x44\x44\x44\x44\x44\x44\x44",
4724 .ilen = 32,
4725 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
4726 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
4727 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
4728 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
4729 .rlen = 32,
4730 }, {
4731 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4732 "\x23\x53\x60\x28\x74\x71\x35\x26"
4733 "\x31\x41\x59\x26\x53\x58\x97\x93"
4734 "\x23\x84\x62\x64\x33\x83\x27\x95",
4735 .klen = 32,
4736 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4737 "\x00\x00\x00\x00\x00\x00\x00\x00",
4738 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4739 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4740 "\x10\x11\x12\x13\x14\x15\x16\x17"
4741 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4742 "\x20\x21\x22\x23\x24\x25\x26\x27"
4743 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4744 "\x30\x31\x32\x33\x34\x35\x36\x37"
4745 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4746 "\x40\x41\x42\x43\x44\x45\x46\x47"
4747 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4748 "\x50\x51\x52\x53\x54\x55\x56\x57"
4749 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4750 "\x60\x61\x62\x63\x64\x65\x66\x67"
4751 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4752 "\x70\x71\x72\x73\x74\x75\x76\x77"
4753 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4754 "\x80\x81\x82\x83\x84\x85\x86\x87"
4755 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4756 "\x90\x91\x92\x93\x94\x95\x96\x97"
4757 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4758 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4759 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4760 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4761 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4762 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4763 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4764 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4765 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4766 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4767 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4768 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4769 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4770 "\x00\x01\x02\x03\x04\x05\x06\x07"
4771 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4772 "\x10\x11\x12\x13\x14\x15\x16\x17"
4773 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4774 "\x20\x21\x22\x23\x24\x25\x26\x27"
4775 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4776 "\x30\x31\x32\x33\x34\x35\x36\x37"
4777 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4778 "\x40\x41\x42\x43\x44\x45\x46\x47"
4779 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4780 "\x50\x51\x52\x53\x54\x55\x56\x57"
4781 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4782 "\x60\x61\x62\x63\x64\x65\x66\x67"
4783 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4784 "\x70\x71\x72\x73\x74\x75\x76\x77"
4785 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4786 "\x80\x81\x82\x83\x84\x85\x86\x87"
4787 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4788 "\x90\x91\x92\x93\x94\x95\x96\x97"
4789 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4790 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4791 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4792 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4793 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4794 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4795 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4796 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4797 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4798 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4799 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4800 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4801 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4802 .ilen = 512,
4803 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
4804 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
4805 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
4806 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
4807 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
4808 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
4809 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
4810 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
4811 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
4812 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
4813 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
4814 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
4815 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
4816 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
4817 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
4818 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
4819 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
4820 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
4821 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
4822 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
4823 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
4824 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
4825 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
4826 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
4827 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
4828 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
4829 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
4830 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
4831 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
4832 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
4833 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
4834 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
4835 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
4836 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
4837 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
4838 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
4839 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
4840 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
4841 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
4842 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
4843 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
4844 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
4845 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
4846 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
4847 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
4848 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
4849 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
4850 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
4851 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
4852 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
4853 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
4854 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
4855 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
4856 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
4857 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
4858 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
4859 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
4860 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
4861 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
4862 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
4863 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
4864 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
4865 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
4866 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
4867 .rlen = 512,
4868 }, {
4869 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4870 "\x23\x53\x60\x28\x74\x71\x35\x26"
4871 "\x62\x49\x77\x57\x24\x70\x93\x69"
4872 "\x99\x59\x57\x49\x66\x96\x76\x27"
4873 "\x31\x41\x59\x26\x53\x58\x97\x93"
4874 "\x23\x84\x62\x64\x33\x83\x27\x95"
4875 "\x02\x88\x41\x97\x16\x93\x99\x37"
4876 "\x51\x05\x82\x09\x74\x94\x45\x92",
4877 .klen = 64,
4878 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
4879 "\x00\x00\x00\x00\x00\x00\x00\x00",
4880 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4881 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4882 "\x10\x11\x12\x13\x14\x15\x16\x17"
4883 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4884 "\x20\x21\x22\x23\x24\x25\x26\x27"
4885 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4886 "\x30\x31\x32\x33\x34\x35\x36\x37"
4887 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4888 "\x40\x41\x42\x43\x44\x45\x46\x47"
4889 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4890 "\x50\x51\x52\x53\x54\x55\x56\x57"
4891 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4892 "\x60\x61\x62\x63\x64\x65\x66\x67"
4893 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4894 "\x70\x71\x72\x73\x74\x75\x76\x77"
4895 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4896 "\x80\x81\x82\x83\x84\x85\x86\x87"
4897 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4898 "\x90\x91\x92\x93\x94\x95\x96\x97"
4899 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4900 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4901 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4902 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4903 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4904 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4905 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4906 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4907 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4908 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4909 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4910 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4911 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4912 "\x00\x01\x02\x03\x04\x05\x06\x07"
4913 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4914 "\x10\x11\x12\x13\x14\x15\x16\x17"
4915 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4916 "\x20\x21\x22\x23\x24\x25\x26\x27"
4917 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4918 "\x30\x31\x32\x33\x34\x35\x36\x37"
4919 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4920 "\x40\x41\x42\x43\x44\x45\x46\x47"
4921 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4922 "\x50\x51\x52\x53\x54\x55\x56\x57"
4923 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4924 "\x60\x61\x62\x63\x64\x65\x66\x67"
4925 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4926 "\x70\x71\x72\x73\x74\x75\x76\x77"
4927 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4928 "\x80\x81\x82\x83\x84\x85\x86\x87"
4929 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4930 "\x90\x91\x92\x93\x94\x95\x96\x97"
4931 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4932 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4933 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4934 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4935 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4936 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4937 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4938 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4939 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4940 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4941 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4942 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4943 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4944 .ilen = 512,
4945 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
4946 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
4947 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
4948 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
4949 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
4950 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
4951 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
4952 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
4953 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
4954 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
4955 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
4956 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
4957 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
4958 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
4959 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
4960 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
4961 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
4962 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
4963 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
4964 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
4965 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
4966 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
4967 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
4968 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
4969 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
4970 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
4971 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
4972 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
4973 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
4974 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
4975 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
4976 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
4977 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
4978 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
4979 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
4980 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
4981 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
4982 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
4983 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
4984 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
4985 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
4986 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
4987 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
4988 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
4989 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
4990 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
4991 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
4992 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
4993 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
4994 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
4995 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
4996 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
4997 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
4998 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
4999 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
5000 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
5001 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
5002 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
5003 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
5004 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
5005 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
5006 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
5007 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
5008 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
5009 .rlen = 512,
5010 },
5011};
5012
5013static struct cipher_testvec serpent_xts_dec_tv_template[] = {
5014 /* Generated from AES-XTS test vectors */
5015 /* same as enc vectors with input and result reversed */
5016 {
5017 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
5018 "\x00\x00\x00\x00\x00\x00\x00\x00"
5019 "\x00\x00\x00\x00\x00\x00\x00\x00"
5020 "\x00\x00\x00\x00\x00\x00\x00\x00",
5021 .klen = 32,
5022 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5023 "\x00\x00\x00\x00\x00\x00\x00\x00",
5024 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
5025 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
5026 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
5027 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
5028 .ilen = 32,
5029 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5030 "\x00\x00\x00\x00\x00\x00\x00\x00"
5031 "\x00\x00\x00\x00\x00\x00\x00\x00"
5032 "\x00\x00\x00\x00\x00\x00\x00\x00",
5033 .rlen = 32,
5034 }, {
5035 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
5036 "\x11\x11\x11\x11\x11\x11\x11\x11"
5037 "\x22\x22\x22\x22\x22\x22\x22\x22"
5038 "\x22\x22\x22\x22\x22\x22\x22\x22",
5039 .klen = 32,
5040 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5041 "\x00\x00\x00\x00\x00\x00\x00\x00",
5042 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
5043 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
5044 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
5045 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
5046 .ilen = 32,
5047 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5048 "\x44\x44\x44\x44\x44\x44\x44\x44"
5049 "\x44\x44\x44\x44\x44\x44\x44\x44"
5050 "\x44\x44\x44\x44\x44\x44\x44\x44",
5051 .rlen = 32,
5052 }, {
5053 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5054 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5055 "\x22\x22\x22\x22\x22\x22\x22\x22"
5056 "\x22\x22\x22\x22\x22\x22\x22\x22",
5057 .klen = 32,
5058 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5059 "\x00\x00\x00\x00\x00\x00\x00\x00",
5060 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
5061 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
5062 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
5063 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
5064 .ilen = 32,
5065 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5066 "\x44\x44\x44\x44\x44\x44\x44\x44"
5067 "\x44\x44\x44\x44\x44\x44\x44\x44"
5068 "\x44\x44\x44\x44\x44\x44\x44\x44",
5069 .rlen = 32,
5070 }, {
5071 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5072 "\x23\x53\x60\x28\x74\x71\x35\x26"
5073 "\x31\x41\x59\x26\x53\x58\x97\x93"
5074 "\x23\x84\x62\x64\x33\x83\x27\x95",
5075 .klen = 32,
5076 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5077 "\x00\x00\x00\x00\x00\x00\x00\x00",
5078 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
5079 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
5080 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
5081 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
5082 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
5083 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
5084 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
5085 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
5086 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
5087 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
5088 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
5089 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
5090 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
5091 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
5092 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
5093 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
5094 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
5095 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
5096 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
5097 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
5098 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
5099 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
5100 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
5101 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
5102 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
5103 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
5104 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
5105 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
5106 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
5107 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
5108 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
5109 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
5110 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
5111 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
5112 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
5113 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
5114 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
5115 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
5116 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
5117 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
5118 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
5119 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
5120 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
5121 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
5122 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
5123 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
5124 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
5125 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
5126 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
5127 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
5128 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
5129 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
5130 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
5131 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
5132 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
5133 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
5134 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
5135 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
5136 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
5137 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
5138 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
5139 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
5140 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
5141 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
5142 .ilen = 512,
5143 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5144 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5145 "\x10\x11\x12\x13\x14\x15\x16\x17"
5146 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5147 "\x20\x21\x22\x23\x24\x25\x26\x27"
5148 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5149 "\x30\x31\x32\x33\x34\x35\x36\x37"
5150 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5151 "\x40\x41\x42\x43\x44\x45\x46\x47"
5152 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5153 "\x50\x51\x52\x53\x54\x55\x56\x57"
5154 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5155 "\x60\x61\x62\x63\x64\x65\x66\x67"
5156 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5157 "\x70\x71\x72\x73\x74\x75\x76\x77"
5158 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5159 "\x80\x81\x82\x83\x84\x85\x86\x87"
5160 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5161 "\x90\x91\x92\x93\x94\x95\x96\x97"
5162 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5163 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5164 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5165 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5166 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5167 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5168 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5169 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5170 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5171 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5172 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5173 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5174 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5175 "\x00\x01\x02\x03\x04\x05\x06\x07"
5176 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5177 "\x10\x11\x12\x13\x14\x15\x16\x17"
5178 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5179 "\x20\x21\x22\x23\x24\x25\x26\x27"
5180 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5181 "\x30\x31\x32\x33\x34\x35\x36\x37"
5182 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5183 "\x40\x41\x42\x43\x44\x45\x46\x47"
5184 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5185 "\x50\x51\x52\x53\x54\x55\x56\x57"
5186 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5187 "\x60\x61\x62\x63\x64\x65\x66\x67"
5188 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5189 "\x70\x71\x72\x73\x74\x75\x76\x77"
5190 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5191 "\x80\x81\x82\x83\x84\x85\x86\x87"
5192 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5193 "\x90\x91\x92\x93\x94\x95\x96\x97"
5194 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5195 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5196 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5197 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5198 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5199 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5200 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5201 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5202 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5203 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5204 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5205 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5206 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5207 .rlen = 512,
5208 }, {
5209 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5210 "\x23\x53\x60\x28\x74\x71\x35\x26"
5211 "\x62\x49\x77\x57\x24\x70\x93\x69"
5212 "\x99\x59\x57\x49\x66\x96\x76\x27"
5213 "\x31\x41\x59\x26\x53\x58\x97\x93"
5214 "\x23\x84\x62\x64\x33\x83\x27\x95"
5215 "\x02\x88\x41\x97\x16\x93\x99\x37"
5216 "\x51\x05\x82\x09\x74\x94\x45\x92",
5217 .klen = 64,
5218 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
5219 "\x00\x00\x00\x00\x00\x00\x00\x00",
5220 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
5221 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
5222 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
5223 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
5224 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
5225 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
5226 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
5227 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
5228 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
5229 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
5230 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
5231 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
5232 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
5233 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
5234 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
5235 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
5236 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
5237 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
5238 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
5239 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
5240 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
5241 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
5242 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
5243 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
5244 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
5245 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
5246 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
5247 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
5248 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
5249 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
5250 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
5251 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
5252 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
5253 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
5254 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
5255 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
5256 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
5257 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
5258 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
5259 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
5260 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
5261 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
5262 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
5263 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
5264 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
5265 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
5266 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
5267 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
5268 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
5269 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
5270 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
5271 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
5272 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
5273 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
5274 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
5275 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
5276 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
5277 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
5278 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
5279 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
5280 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
5281 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
5282 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
5283 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
5284 .ilen = 512,
5285 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5286 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5287 "\x10\x11\x12\x13\x14\x15\x16\x17"
5288 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5289 "\x20\x21\x22\x23\x24\x25\x26\x27"
5290 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5291 "\x30\x31\x32\x33\x34\x35\x36\x37"
5292 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5293 "\x40\x41\x42\x43\x44\x45\x46\x47"
5294 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5295 "\x50\x51\x52\x53\x54\x55\x56\x57"
5296 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5297 "\x60\x61\x62\x63\x64\x65\x66\x67"
5298 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5299 "\x70\x71\x72\x73\x74\x75\x76\x77"
5300 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5301 "\x80\x81\x82\x83\x84\x85\x86\x87"
5302 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5303 "\x90\x91\x92\x93\x94\x95\x96\x97"
5304 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5305 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5306 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5307 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5308 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5309 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5310 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5311 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5312 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5313 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5314 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5315 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5316 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5317 "\x00\x01\x02\x03\x04\x05\x06\x07"
5318 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5319 "\x10\x11\x12\x13\x14\x15\x16\x17"
5320 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5321 "\x20\x21\x22\x23\x24\x25\x26\x27"
5322 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5323 "\x30\x31\x32\x33\x34\x35\x36\x37"
5324 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5325 "\x40\x41\x42\x43\x44\x45\x46\x47"
5326 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5327 "\x50\x51\x52\x53\x54\x55\x56\x57"
5328 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5329 "\x60\x61\x62\x63\x64\x65\x66\x67"
5330 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5331 "\x70\x71\x72\x73\x74\x75\x76\x77"
5332 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5333 "\x80\x81\x82\x83\x84\x85\x86\x87"
5334 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5335 "\x90\x91\x92\x93\x94\x95\x96\x97"
5336 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5337 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5338 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5339 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5340 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5341 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5342 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5343 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5344 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5345 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5346 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5347 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5348 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5349 .rlen = 512,
5350 },
5351};
5352
Herbert Xuda7f0332008-07-31 17:08:25 +08005353/* Cast6 test vectors from RFC 2612 */
5354#define CAST6_ENC_TEST_VECTORS 3
5355#define CAST6_DEC_TEST_VECTORS 3
5356
5357static struct cipher_testvec cast6_enc_tv_template[] = {
5358 {
5359 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5360 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
5361 .klen = 16,
5362 .input = zeroed_string,
5363 .ilen = 16,
5364 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
5365 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
5366 .rlen = 16,
5367 }, {
5368 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5369 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
5370 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
5371 .klen = 24,
5372 .input = zeroed_string,
5373 .ilen = 16,
5374 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
5375 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
5376 .rlen = 16,
5377 }, {
5378 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5379 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
5380 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
5381 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
5382 .klen = 32,
5383 .input = zeroed_string,
5384 .ilen = 16,
5385 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
5386 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
5387 .rlen = 16,
5388 },
5389};
5390
5391static struct cipher_testvec cast6_dec_tv_template[] = {
5392 {
5393 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5394 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
5395 .klen = 16,
5396 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
5397 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
5398 .ilen = 16,
5399 .result = zeroed_string,
5400 .rlen = 16,
5401 }, {
5402 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5403 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
5404 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
5405 .klen = 24,
5406 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
5407 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
5408 .ilen = 16,
5409 .result = zeroed_string,
5410 .rlen = 16,
5411 }, {
5412 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
5413 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
5414 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
5415 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
5416 .klen = 32,
5417 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
5418 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
5419 .ilen = 16,
5420 .result = zeroed_string,
5421 .rlen = 16,
5422 },
5423};
5424
5425
5426/*
5427 * AES test vectors.
5428 */
5429#define AES_ENC_TEST_VECTORS 3
5430#define AES_DEC_TEST_VECTORS 3
5431#define AES_CBC_ENC_TEST_VECTORS 4
5432#define AES_CBC_DEC_TEST_VECTORS 4
5433#define AES_LRW_ENC_TEST_VECTORS 8
5434#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +10005435#define AES_XTS_ENC_TEST_VECTORS 5
5436#define AES_XTS_DEC_TEST_VECTORS 5
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08005437#define AES_CTR_ENC_TEST_VECTORS 3
5438#define AES_CTR_DEC_TEST_VECTORS 3
Puneet Saxenaba0e14a2011-05-04 15:04:10 +10005439#define AES_OFB_ENC_TEST_VECTORS 1
5440#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08005441#define AES_CTR_3686_ENC_TEST_VECTORS 7
5442#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08005443#define AES_GCM_ENC_TEST_VECTORS 9
5444#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -04005445#define AES_GCM_4106_ENC_TEST_VECTORS 7
5446#define AES_GCM_4106_DEC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +08005447#define AES_CCM_ENC_TEST_VECTORS 7
5448#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +08005449#define AES_CCM_4309_ENC_TEST_VECTORS 7
5450#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +08005451
5452static struct cipher_testvec aes_enc_tv_template[] = {
5453 { /* From FIPS-197 */
5454 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5455 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5456 .klen = 16,
5457 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
5458 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5459 .ilen = 16,
5460 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
5461 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
5462 .rlen = 16,
5463 }, {
5464 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5465 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5466 "\x10\x11\x12\x13\x14\x15\x16\x17",
5467 .klen = 24,
5468 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
5469 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5470 .ilen = 16,
5471 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
5472 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
5473 .rlen = 16,
5474 }, {
5475 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5476 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5477 "\x10\x11\x12\x13\x14\x15\x16\x17"
5478 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5479 .klen = 32,
5480 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
5481 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5482 .ilen = 16,
5483 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
5484 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
5485 .rlen = 16,
5486 },
5487};
5488
5489static struct cipher_testvec aes_dec_tv_template[] = {
5490 { /* From FIPS-197 */
5491 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5492 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5493 .klen = 16,
5494 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
5495 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
5496 .ilen = 16,
5497 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
5498 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5499 .rlen = 16,
5500 }, {
5501 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5502 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5503 "\x10\x11\x12\x13\x14\x15\x16\x17",
5504 .klen = 24,
5505 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
5506 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
5507 .ilen = 16,
5508 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
5509 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5510 .rlen = 16,
5511 }, {
5512 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5513 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5514 "\x10\x11\x12\x13\x14\x15\x16\x17"
5515 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5516 .klen = 32,
5517 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
5518 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
5519 .ilen = 16,
5520 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
5521 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5522 .rlen = 16,
5523 },
5524};
5525
5526static struct cipher_testvec aes_cbc_enc_tv_template[] = {
5527 { /* From RFC 3602 */
5528 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
5529 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
5530 .klen = 16,
5531 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
5532 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
5533 .input = "Single block msg",
5534 .ilen = 16,
5535 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
5536 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
5537 .rlen = 16,
5538 }, {
5539 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
5540 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
5541 .klen = 16,
5542 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
5543 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
5544 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5545 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5546 "\x10\x11\x12\x13\x14\x15\x16\x17"
5547 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5548 .ilen = 32,
5549 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
5550 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
5551 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
5552 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
5553 .rlen = 32,
5554 }, { /* From NIST SP800-38A */
5555 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
5556 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
5557 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
5558 .klen = 24,
5559 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
5560 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5561 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5562 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5563 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5564 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5565 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5566 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5567 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5568 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5569 .ilen = 64,
5570 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
5571 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
5572 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
5573 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
5574 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
5575 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
5576 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
5577 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
5578 .rlen = 64,
5579 }, {
5580 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
5581 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
5582 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
5583 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
5584 .klen = 32,
5585 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
5586 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5587 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5588 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5589 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5590 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5591 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5592 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5593 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5594 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5595 .ilen = 64,
5596 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
5597 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
5598 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
5599 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
5600 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
5601 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
5602 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
5603 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
5604 .rlen = 64,
5605 },
5606};
5607
5608static struct cipher_testvec aes_cbc_dec_tv_template[] = {
5609 { /* From RFC 3602 */
5610 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
5611 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
5612 .klen = 16,
5613 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
5614 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
5615 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
5616 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
5617 .ilen = 16,
5618 .result = "Single block msg",
5619 .rlen = 16,
5620 }, {
5621 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
5622 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
5623 .klen = 16,
5624 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
5625 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
5626 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
5627 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
5628 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
5629 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
5630 .ilen = 32,
5631 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5632 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5633 "\x10\x11\x12\x13\x14\x15\x16\x17"
5634 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5635 .rlen = 32,
5636 }, { /* From NIST SP800-38A */
5637 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
5638 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
5639 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
5640 .klen = 24,
5641 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
5642 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5643 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
5644 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
5645 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
5646 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
5647 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
5648 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
5649 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
5650 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
5651 .ilen = 64,
5652 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5653 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5654 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5655 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5656 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5657 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5658 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5659 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5660 .rlen = 64,
5661 }, {
5662 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
5663 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
5664 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
5665 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
5666 .klen = 32,
5667 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
5668 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5669 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
5670 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
5671 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
5672 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
5673 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
5674 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
5675 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
5676 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
5677 .ilen = 64,
5678 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5679 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5680 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5681 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5682 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5683 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5684 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5685 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5686 .rlen = 64,
5687 },
5688};
5689
5690static struct cipher_testvec aes_lrw_enc_tv_template[] = {
5691 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
5692 { /* LRW-32-AES 1 */
5693 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5694 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5695 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5696 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5697 .klen = 32,
5698 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5699 "\x00\x00\x00\x00\x00\x00\x00\x01",
5700 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5701 "\x38\x39\x41\x42\x43\x44\x45\x46",
5702 .ilen = 16,
5703 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
5704 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
5705 .rlen = 16,
5706 }, { /* LRW-32-AES 2 */
5707 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5708 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5709 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5710 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5711 .klen = 32,
5712 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5713 "\x00\x00\x00\x00\x00\x00\x00\x02",
5714 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5715 "\x38\x39\x41\x42\x43\x44\x45\x46",
5716 .ilen = 16,
5717 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
5718 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
5719 .rlen = 16,
5720 }, { /* LRW-32-AES 3 */
5721 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5722 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5723 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5724 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5725 .klen = 32,
5726 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5727 "\x00\x00\x00\x02\x00\x00\x00\x00",
5728 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5729 "\x38\x39\x41\x42\x43\x44\x45\x46",
5730 .ilen = 16,
5731 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
5732 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
5733 .rlen = 16,
5734 }, { /* LRW-32-AES 4 */
5735 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5736 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5737 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5738 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5739 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5740 .klen = 40,
5741 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5742 "\x00\x00\x00\x00\x00\x00\x00\x01",
5743 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5744 "\x38\x39\x41\x42\x43\x44\x45\x46",
5745 .ilen = 16,
5746 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
5747 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
5748 .rlen = 16,
5749 }, { /* LRW-32-AES 5 */
5750 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
5751 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
5752 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
5753 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
5754 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
5755 .klen = 40,
5756 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5757 "\x00\x00\x00\x02\x00\x00\x00\x00",
5758 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5759 "\x38\x39\x41\x42\x43\x44\x45\x46",
5760 .ilen = 16,
5761 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
5762 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
5763 .rlen = 16,
5764 }, { /* LRW-32-AES 6 */
5765 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5766 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5767 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5768 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5769 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5770 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5771 .klen = 48,
5772 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5773 "\x00\x00\x00\x00\x00\x00\x00\x01",
5774 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5775 "\x38\x39\x41\x42\x43\x44\x45\x46",
5776 .ilen = 16,
5777 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
5778 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
5779 .rlen = 16,
5780 }, { /* LRW-32-AES 7 */
5781 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
5782 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
5783 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
5784 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
5785 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
5786 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
5787 .klen = 48,
5788 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5789 "\x00\x00\x00\x02\x00\x00\x00\x00",
5790 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5791 "\x38\x39\x41\x42\x43\x44\x45\x46",
5792 .ilen = 16,
5793 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
5794 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
5795 .rlen = 16,
5796 }, {
5797/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
5798 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5799 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5800 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5801 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5802 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5803 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5804 .klen = 48,
5805 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5806 "\x00\x00\x00\x00\x00\x00\x00\x01",
5807 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5808 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5809 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5810 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5811 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5812 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5813 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5814 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5815 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5816 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5817 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5818 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5819 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5820 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5821 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5822 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5823 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5824 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5825 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5826 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5827 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5828 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5829 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5830 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5831 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5832 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5833 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5834 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5835 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5836 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5837 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5838 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5839 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5840 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5841 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5842 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5843 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5844 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5845 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5846 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5847 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5848 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5849 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5850 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5851 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5852 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5853 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5854 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5855 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5856 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5857 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5858 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5859 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5860 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5861 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5862 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5863 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5864 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5865 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5866 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5867 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5868 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5869 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5870 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5871 .ilen = 512,
5872 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
5873 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
5874 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
5875 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
5876 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
5877 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
5878 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
5879 "\xe8\x58\x46\x97\x39\x51\x07\xde"
5880 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
5881 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
5882 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
5883 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
5884 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
5885 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
5886 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
5887 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
5888 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
5889 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
5890 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
5891 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
5892 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
5893 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
5894 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
5895 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
5896 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
5897 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
5898 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
5899 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
5900 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
5901 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
5902 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
5903 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
5904 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
5905 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
5906 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
5907 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
5908 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
5909 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
5910 "\xb8\x79\x78\x97\x94\xff\x72\x13"
5911 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
5912 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
5913 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
5914 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
5915 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
5916 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
5917 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
5918 "\x1e\x86\x53\x11\x53\x94\x00\xee"
5919 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
5920 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
5921 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
5922 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
5923 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
5924 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
5925 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
5926 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
5927 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
5928 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
5929 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
5930 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
5931 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
5932 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
5933 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
5934 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
5935 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
5936 .rlen = 512,
5937 }
5938};
5939
5940static struct cipher_testvec aes_lrw_dec_tv_template[] = {
5941 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
5942 /* same as enc vectors with input and result reversed */
5943 { /* LRW-32-AES 1 */
5944 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5945 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5946 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5947 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5948 .klen = 32,
5949 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5950 "\x00\x00\x00\x00\x00\x00\x00\x01",
5951 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
5952 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
5953 .ilen = 16,
5954 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5955 "\x38\x39\x41\x42\x43\x44\x45\x46",
5956 .rlen = 16,
5957 }, { /* LRW-32-AES 2 */
5958 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5959 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5960 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5961 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5962 .klen = 32,
5963 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5964 "\x00\x00\x00\x00\x00\x00\x00\x02",
5965 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
5966 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
5967 .ilen = 16,
5968 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5969 "\x38\x39\x41\x42\x43\x44\x45\x46",
5970 .rlen = 16,
5971 }, { /* LRW-32-AES 3 */
5972 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5973 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5974 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5975 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5976 .klen = 32,
5977 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5978 "\x00\x00\x00\x02\x00\x00\x00\x00",
5979 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
5980 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
5981 .ilen = 16,
5982 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5983 "\x38\x39\x41\x42\x43\x44\x45\x46",
5984 .rlen = 16,
5985 }, { /* LRW-32-AES 4 */
5986 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5987 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5988 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5989 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5990 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5991 .klen = 40,
5992 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5993 "\x00\x00\x00\x00\x00\x00\x00\x01",
5994 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
5995 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
5996 .ilen = 16,
5997 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5998 "\x38\x39\x41\x42\x43\x44\x45\x46",
5999 .rlen = 16,
6000 }, { /* LRW-32-AES 5 */
6001 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6002 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6003 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6004 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6005 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6006 .klen = 40,
6007 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6008 "\x00\x00\x00\x02\x00\x00\x00\x00",
6009 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
6010 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
6011 .ilen = 16,
6012 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6013 "\x38\x39\x41\x42\x43\x44\x45\x46",
6014 .rlen = 16,
6015 }, { /* LRW-32-AES 6 */
6016 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6017 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6018 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6019 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6020 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6021 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6022 .klen = 48,
6023 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6024 "\x00\x00\x00\x00\x00\x00\x00\x01",
6025 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
6026 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
6027 .ilen = 16,
6028 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6029 "\x38\x39\x41\x42\x43\x44\x45\x46",
6030 .rlen = 16,
6031 }, { /* LRW-32-AES 7 */
6032 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6033 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6034 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6035 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6036 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6037 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6038 .klen = 48,
6039 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6040 "\x00\x00\x00\x02\x00\x00\x00\x00",
6041 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
6042 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
6043 .ilen = 16,
6044 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6045 "\x38\x39\x41\x42\x43\x44\x45\x46",
6046 .rlen = 16,
6047 }, {
6048/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
6049 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6050 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6051 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6052 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6053 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6054 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6055 .klen = 48,
6056 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6057 "\x00\x00\x00\x00\x00\x00\x00\x01",
6058 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
6059 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
6060 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
6061 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
6062 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
6063 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
6064 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
6065 "\xe8\x58\x46\x97\x39\x51\x07\xde"
6066 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
6067 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
6068 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
6069 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
6070 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
6071 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
6072 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
6073 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
6074 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
6075 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
6076 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
6077 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
6078 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
6079 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
6080 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
6081 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
6082 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
6083 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
6084 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
6085 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
6086 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
6087 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
6088 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
6089 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
6090 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
6091 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
6092 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
6093 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
6094 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
6095 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
6096 "\xb8\x79\x78\x97\x94\xff\x72\x13"
6097 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
6098 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
6099 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
6100 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
6101 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
6102 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
6103 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
6104 "\x1e\x86\x53\x11\x53\x94\x00\xee"
6105 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
6106 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
6107 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
6108 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
6109 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
6110 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
6111 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
6112 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
6113 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
6114 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
6115 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
6116 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
6117 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
6118 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
6119 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
6120 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
6121 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
6122 .ilen = 512,
6123 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6124 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6125 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6126 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6127 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6128 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6129 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6130 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6131 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6132 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6133 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6134 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6135 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6136 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6137 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6138 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6139 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6140 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6141 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6142 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6143 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6144 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6145 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6146 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6147 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6148 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6149 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6150 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6151 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6152 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6153 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6154 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6155 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6156 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6157 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6158 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6159 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6160 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6161 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6162 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6163 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6164 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6165 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6166 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6167 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6168 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6169 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6170 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6171 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6172 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6173 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6174 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6175 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6176 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6177 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6178 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6179 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6180 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6181 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6182 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6183 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6184 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6185 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6186 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6187 .rlen = 512,
6188 }
6189};
6190
6191static struct cipher_testvec aes_xts_enc_tv_template[] = {
6192 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
6193 { /* XTS-AES 1 */
6194 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6195 "\x00\x00\x00\x00\x00\x00\x00\x00"
6196 "\x00\x00\x00\x00\x00\x00\x00\x00"
6197 "\x00\x00\x00\x00\x00\x00\x00\x00",
6198 .klen = 32,
6199 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6200 "\x00\x00\x00\x00\x00\x00\x00\x00",
6201 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6202 "\x00\x00\x00\x00\x00\x00\x00\x00"
6203 "\x00\x00\x00\x00\x00\x00\x00\x00"
6204 "\x00\x00\x00\x00\x00\x00\x00\x00",
6205 .ilen = 32,
6206 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
6207 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
6208 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
6209 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
6210 .rlen = 32,
6211 }, { /* XTS-AES 2 */
6212 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6213 "\x11\x11\x11\x11\x11\x11\x11\x11"
6214 "\x22\x22\x22\x22\x22\x22\x22\x22"
6215 "\x22\x22\x22\x22\x22\x22\x22\x22",
6216 .klen = 32,
6217 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6218 "\x00\x00\x00\x00\x00\x00\x00\x00",
6219 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6220 "\x44\x44\x44\x44\x44\x44\x44\x44"
6221 "\x44\x44\x44\x44\x44\x44\x44\x44"
6222 "\x44\x44\x44\x44\x44\x44\x44\x44",
6223 .ilen = 32,
6224 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
6225 "\x39\x33\x40\x38\xac\xef\x83\x8b"
6226 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
6227 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
6228 .rlen = 32,
6229 }, { /* XTS-AES 3 */
6230 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6231 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6232 "\x22\x22\x22\x22\x22\x22\x22\x22"
6233 "\x22\x22\x22\x22\x22\x22\x22\x22",
6234 .klen = 32,
6235 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6236 "\x00\x00\x00\x00\x00\x00\x00\x00",
6237 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6238 "\x44\x44\x44\x44\x44\x44\x44\x44"
6239 "\x44\x44\x44\x44\x44\x44\x44\x44"
6240 "\x44\x44\x44\x44\x44\x44\x44\x44",
6241 .ilen = 32,
6242 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
6243 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
6244 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
6245 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
6246 .rlen = 32,
6247 }, { /* XTS-AES 4 */
6248 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6249 "\x23\x53\x60\x28\x74\x71\x35\x26"
6250 "\x31\x41\x59\x26\x53\x58\x97\x93"
6251 "\x23\x84\x62\x64\x33\x83\x27\x95",
6252 .klen = 32,
6253 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6254 "\x00\x00\x00\x00\x00\x00\x00\x00",
6255 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6256 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6257 "\x10\x11\x12\x13\x14\x15\x16\x17"
6258 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6259 "\x20\x21\x22\x23\x24\x25\x26\x27"
6260 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6261 "\x30\x31\x32\x33\x34\x35\x36\x37"
6262 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6263 "\x40\x41\x42\x43\x44\x45\x46\x47"
6264 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6265 "\x50\x51\x52\x53\x54\x55\x56\x57"
6266 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6267 "\x60\x61\x62\x63\x64\x65\x66\x67"
6268 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6269 "\x70\x71\x72\x73\x74\x75\x76\x77"
6270 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6271 "\x80\x81\x82\x83\x84\x85\x86\x87"
6272 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6273 "\x90\x91\x92\x93\x94\x95\x96\x97"
6274 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6275 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6276 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6277 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6278 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6279 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6280 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6281 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6282 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6283 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6284 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6285 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6286 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6287 "\x00\x01\x02\x03\x04\x05\x06\x07"
6288 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6289 "\x10\x11\x12\x13\x14\x15\x16\x17"
6290 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6291 "\x20\x21\x22\x23\x24\x25\x26\x27"
6292 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6293 "\x30\x31\x32\x33\x34\x35\x36\x37"
6294 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6295 "\x40\x41\x42\x43\x44\x45\x46\x47"
6296 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6297 "\x50\x51\x52\x53\x54\x55\x56\x57"
6298 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6299 "\x60\x61\x62\x63\x64\x65\x66\x67"
6300 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6301 "\x70\x71\x72\x73\x74\x75\x76\x77"
6302 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6303 "\x80\x81\x82\x83\x84\x85\x86\x87"
6304 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6305 "\x90\x91\x92\x93\x94\x95\x96\x97"
6306 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6307 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6308 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6309 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6310 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6311 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6312 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6313 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6314 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6315 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6316 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6317 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6318 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6319 .ilen = 512,
6320 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
6321 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
6322 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
6323 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
6324 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
6325 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
6326 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
6327 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
6328 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
6329 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
6330 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
6331 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
6332 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
6333 "\x22\x97\x61\x46\xae\x20\xce\x84"
6334 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
6335 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
6336 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
6337 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
6338 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
6339 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
6340 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
6341 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
6342 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
6343 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
6344 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
6345 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
6346 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
6347 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
6348 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
6349 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
6350 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
6351 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
6352 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
6353 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
6354 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
6355 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
6356 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
6357 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
6358 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
6359 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
6360 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
6361 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
6362 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
6363 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
6364 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
6365 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
6366 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
6367 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
6368 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
6369 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
6370 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
6371 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
6372 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
6373 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
6374 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
6375 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
6376 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
6377 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
6378 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
6379 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
6380 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
6381 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
6382 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
6383 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
6384 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +10006385 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
6386 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6387 "\x23\x53\x60\x28\x74\x71\x35\x26"
6388 "\x62\x49\x77\x57\x24\x70\x93\x69"
6389 "\x99\x59\x57\x49\x66\x96\x76\x27"
6390 "\x31\x41\x59\x26\x53\x58\x97\x93"
6391 "\x23\x84\x62\x64\x33\x83\x27\x95"
6392 "\x02\x88\x41\x97\x16\x93\x99\x37"
6393 "\x51\x05\x82\x09\x74\x94\x45\x92",
6394 .klen = 64,
6395 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6396 "\x00\x00\x00\x00\x00\x00\x00\x00",
6397 "\x00\x00\x00\x00\x00\x00\x00\x00",
6398 "\x00\x00\x00\x00\x00\x00\x00\x00",
6399 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6400 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6401 "\x10\x11\x12\x13\x14\x15\x16\x17"
6402 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6403 "\x20\x21\x22\x23\x24\x25\x26\x27"
6404 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6405 "\x30\x31\x32\x33\x34\x35\x36\x37"
6406 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6407 "\x40\x41\x42\x43\x44\x45\x46\x47"
6408 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6409 "\x50\x51\x52\x53\x54\x55\x56\x57"
6410 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6411 "\x60\x61\x62\x63\x64\x65\x66\x67"
6412 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6413 "\x70\x71\x72\x73\x74\x75\x76\x77"
6414 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6415 "\x80\x81\x82\x83\x84\x85\x86\x87"
6416 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6417 "\x90\x91\x92\x93\x94\x95\x96\x97"
6418 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6419 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6420 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6421 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6422 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6423 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6424 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6425 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6426 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6427 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6428 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6429 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6430 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6431 "\x00\x01\x02\x03\x04\x05\x06\x07"
6432 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6433 "\x10\x11\x12\x13\x14\x15\x16\x17"
6434 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6435 "\x20\x21\x22\x23\x24\x25\x26\x27"
6436 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6437 "\x30\x31\x32\x33\x34\x35\x36\x37"
6438 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6439 "\x40\x41\x42\x43\x44\x45\x46\x47"
6440 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6441 "\x50\x51\x52\x53\x54\x55\x56\x57"
6442 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6443 "\x60\x61\x62\x63\x64\x65\x66\x67"
6444 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6445 "\x70\x71\x72\x73\x74\x75\x76\x77"
6446 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6447 "\x80\x81\x82\x83\x84\x85\x86\x87"
6448 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6449 "\x90\x91\x92\x93\x94\x95\x96\x97"
6450 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6451 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6452 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6453 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6454 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6455 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6456 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6457 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6458 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6459 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6460 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6461 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6462 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6463 .ilen = 512,
6464 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
6465 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
6466 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
6467 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
6468 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
6469 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
6470 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
6471 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
6472 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
6473 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
6474 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
6475 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
6476 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
6477 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
6478 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
6479 "\x00\x02\x08\x87\x89\x14\x29\xca"
6480 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
6481 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
6482 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
6483 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
6484 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
6485 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
6486 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
6487 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
6488 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
6489 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
6490 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
6491 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
6492 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
6493 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
6494 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
6495 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
6496 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
6497 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
6498 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
6499 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
6500 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
6501 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
6502 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
6503 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
6504 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
6505 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
6506 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
6507 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
6508 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
6509 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
6510 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
6511 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
6512 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
6513 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
6514 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
6515 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
6516 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
6517 "\x94\x30\x54\xff\x84\x01\x14\x93"
6518 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
6519 "\x53\x76\x44\x1a\x77\xed\x43\x85"
6520 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
6521 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
6522 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
6523 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
6524 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
6525 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
6526 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
6527 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
6528 .rlen = 512,
Herbert Xuda7f0332008-07-31 17:08:25 +08006529 }
6530};
6531
6532static struct cipher_testvec aes_xts_dec_tv_template[] = {
6533 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
6534 { /* XTS-AES 1 */
6535 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6536 "\x00\x00\x00\x00\x00\x00\x00\x00"
6537 "\x00\x00\x00\x00\x00\x00\x00\x00"
6538 "\x00\x00\x00\x00\x00\x00\x00\x00",
6539 .klen = 32,
6540 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6541 "\x00\x00\x00\x00\x00\x00\x00\x00",
6542 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
6543 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
6544 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
6545 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
6546 .ilen = 32,
6547 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
6548 "\x00\x00\x00\x00\x00\x00\x00\x00"
6549 "\x00\x00\x00\x00\x00\x00\x00\x00"
6550 "\x00\x00\x00\x00\x00\x00\x00\x00",
6551 .rlen = 32,
6552 }, { /* XTS-AES 2 */
6553 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6554 "\x11\x11\x11\x11\x11\x11\x11\x11"
6555 "\x22\x22\x22\x22\x22\x22\x22\x22"
6556 "\x22\x22\x22\x22\x22\x22\x22\x22",
6557 .klen = 32,
6558 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6559 "\x00\x00\x00\x00\x00\x00\x00\x00",
6560 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
6561 "\x39\x33\x40\x38\xac\xef\x83\x8b"
6562 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
6563 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
6564 .ilen = 32,
6565 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6566 "\x44\x44\x44\x44\x44\x44\x44\x44"
6567 "\x44\x44\x44\x44\x44\x44\x44\x44"
6568 "\x44\x44\x44\x44\x44\x44\x44\x44",
6569 .rlen = 32,
6570 }, { /* XTS-AES 3 */
6571 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6572 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6573 "\x22\x22\x22\x22\x22\x22\x22\x22"
6574 "\x22\x22\x22\x22\x22\x22\x22\x22",
6575 .klen = 32,
6576 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6577 "\x00\x00\x00\x00\x00\x00\x00\x00",
6578 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
6579 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
6580 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
6581 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
6582 .ilen = 32,
6583 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6584 "\x44\x44\x44\x44\x44\x44\x44\x44"
6585 "\x44\x44\x44\x44\x44\x44\x44\x44"
6586 "\x44\x44\x44\x44\x44\x44\x44\x44",
6587 .rlen = 32,
6588 }, { /* XTS-AES 4 */
6589 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6590 "\x23\x53\x60\x28\x74\x71\x35\x26"
6591 "\x31\x41\x59\x26\x53\x58\x97\x93"
6592 "\x23\x84\x62\x64\x33\x83\x27\x95",
6593 .klen = 32,
6594 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6595 "\x00\x00\x00\x00\x00\x00\x00\x00",
6596 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
6597 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
6598 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
6599 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
6600 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
6601 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
6602 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
6603 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
6604 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
6605 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
6606 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
6607 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
6608 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
6609 "\x22\x97\x61\x46\xae\x20\xce\x84"
6610 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
6611 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
6612 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
6613 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
6614 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
6615 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
6616 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
6617 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
6618 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
6619 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
6620 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
6621 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
6622 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
6623 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
6624 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
6625 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
6626 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
6627 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
6628 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
6629 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
6630 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
6631 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
6632 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
6633 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
6634 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
6635 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
6636 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
6637 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
6638 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
6639 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
6640 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
6641 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
6642 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
6643 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
6644 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
6645 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
6646 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
6647 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
6648 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
6649 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
6650 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
6651 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
6652 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
6653 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
6654 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
6655 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
6656 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
6657 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
6658 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
6659 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
6660 .ilen = 512,
6661 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6663 "\x10\x11\x12\x13\x14\x15\x16\x17"
6664 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6665 "\x20\x21\x22\x23\x24\x25\x26\x27"
6666 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6667 "\x30\x31\x32\x33\x34\x35\x36\x37"
6668 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6669 "\x40\x41\x42\x43\x44\x45\x46\x47"
6670 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6671 "\x50\x51\x52\x53\x54\x55\x56\x57"
6672 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6673 "\x60\x61\x62\x63\x64\x65\x66\x67"
6674 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6675 "\x70\x71\x72\x73\x74\x75\x76\x77"
6676 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6677 "\x80\x81\x82\x83\x84\x85\x86\x87"
6678 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6679 "\x90\x91\x92\x93\x94\x95\x96\x97"
6680 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6681 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6682 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6683 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6684 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6685 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6686 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6687 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6688 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6689 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6690 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6691 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6692 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6693 "\x00\x01\x02\x03\x04\x05\x06\x07"
6694 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6695 "\x10\x11\x12\x13\x14\x15\x16\x17"
6696 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6697 "\x20\x21\x22\x23\x24\x25\x26\x27"
6698 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6699 "\x30\x31\x32\x33\x34\x35\x36\x37"
6700 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6701 "\x40\x41\x42\x43\x44\x45\x46\x47"
6702 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6703 "\x50\x51\x52\x53\x54\x55\x56\x57"
6704 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6705 "\x60\x61\x62\x63\x64\x65\x66\x67"
6706 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6707 "\x70\x71\x72\x73\x74\x75\x76\x77"
6708 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6709 "\x80\x81\x82\x83\x84\x85\x86\x87"
6710 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6711 "\x90\x91\x92\x93\x94\x95\x96\x97"
6712 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6713 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6714 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6715 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6716 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6717 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6718 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6719 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6720 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6721 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6722 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6723 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6724 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6725 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +10006726 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
6727 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6728 "\x23\x53\x60\x28\x74\x71\x35\x26"
6729 "\x62\x49\x77\x57\x24\x70\x93\x69"
6730 "\x99\x59\x57\x49\x66\x96\x76\x27"
6731 "\x31\x41\x59\x26\x53\x58\x97\x93"
6732 "\x23\x84\x62\x64\x33\x83\x27\x95"
6733 "\x02\x88\x41\x97\x16\x93\x99\x37"
6734 "\x51\x05\x82\x09\x74\x94\x45\x92",
6735 .klen = 64,
6736 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6737 "\x00\x00\x00\x00\x00\x00\x00\x00",
6738 "\x00\x00\x00\x00\x00\x00\x00\x00",
6739 "\x00\x00\x00\x00\x00\x00\x00\x00",
6740 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
6741 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
6742 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
6743 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
6744 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
6745 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
6746 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
6747 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
6748 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
6749 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
6750 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
6751 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
6752 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
6753 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
6754 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
6755 "\x00\x02\x08\x87\x89\x14\x29\xca"
6756 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
6757 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
6758 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
6759 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
6760 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
6761 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
6762 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
6763 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
6764 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
6765 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
6766 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
6767 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
6768 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
6769 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
6770 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
6771 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
6772 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
6773 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
6774 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
6775 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
6776 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
6777 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
6778 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
6779 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
6780 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
6781 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
6782 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
6783 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
6784 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
6785 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
6786 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
6787 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
6788 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
6789 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
6790 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
6791 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
6792 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
6793 "\x94\x30\x54\xff\x84\x01\x14\x93"
6794 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
6795 "\x53\x76\x44\x1a\x77\xed\x43\x85"
6796 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
6797 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
6798 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
6799 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
6800 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
6801 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
6802 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
6803 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
6804 .ilen = 512,
6805 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6806 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6807 "\x10\x11\x12\x13\x14\x15\x16\x17"
6808 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6809 "\x20\x21\x22\x23\x24\x25\x26\x27"
6810 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6811 "\x30\x31\x32\x33\x34\x35\x36\x37"
6812 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6813 "\x40\x41\x42\x43\x44\x45\x46\x47"
6814 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6815 "\x50\x51\x52\x53\x54\x55\x56\x57"
6816 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6817 "\x60\x61\x62\x63\x64\x65\x66\x67"
6818 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6819 "\x70\x71\x72\x73\x74\x75\x76\x77"
6820 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6821 "\x80\x81\x82\x83\x84\x85\x86\x87"
6822 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6823 "\x90\x91\x92\x93\x94\x95\x96\x97"
6824 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6825 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6826 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6827 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6828 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6829 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6830 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6831 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6832 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6833 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6834 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6835 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6836 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6837 "\x00\x01\x02\x03\x04\x05\x06\x07"
6838 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6839 "\x10\x11\x12\x13\x14\x15\x16\x17"
6840 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6841 "\x20\x21\x22\x23\x24\x25\x26\x27"
6842 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6843 "\x30\x31\x32\x33\x34\x35\x36\x37"
6844 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6845 "\x40\x41\x42\x43\x44\x45\x46\x47"
6846 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6847 "\x50\x51\x52\x53\x54\x55\x56\x57"
6848 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6849 "\x60\x61\x62\x63\x64\x65\x66\x67"
6850 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6851 "\x70\x71\x72\x73\x74\x75\x76\x77"
6852 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6853 "\x80\x81\x82\x83\x84\x85\x86\x87"
6854 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6855 "\x90\x91\x92\x93\x94\x95\x96\x97"
6856 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6857 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6858 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6859 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6860 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6861 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6862 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6863 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6864 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6865 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6866 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6867 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6868 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6869 .rlen = 512,
6870
Herbert Xuda7f0332008-07-31 17:08:25 +08006871 }
6872};
6873
6874
6875static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08006876 { /* From NIST Special Publication 800-38A, Appendix F.5 */
6877 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
6878 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
6879 .klen = 16,
6880 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6881 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6882 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6883 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6884 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6885 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6886 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6887 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6888 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6889 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6890 .ilen = 64,
6891 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
6892 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
6893 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
6894 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
6895 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
6896 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
6897 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
6898 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
6899 .rlen = 64,
6900 }, {
6901 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
6902 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
6903 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
6904 .klen = 24,
6905 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6906 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6907 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6908 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6909 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6910 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6911 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6912 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6913 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6914 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6915 .ilen = 64,
6916 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
6917 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
6918 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
6919 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
6920 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
6921 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
6922 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
6923 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
6924 .rlen = 64,
6925 }, {
6926 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
6927 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
6928 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
6929 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
6930 .klen = 32,
6931 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6932 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6933 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6934 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6935 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6936 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6937 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6938 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6939 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6940 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6941 .ilen = 64,
6942 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
6943 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
6944 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
6945 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
6946 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
6947 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
6948 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
6949 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
6950 .rlen = 64,
6951 }
6952};
6953
6954static struct cipher_testvec aes_ctr_dec_tv_template[] = {
6955 { /* From NIST Special Publication 800-38A, Appendix F.5 */
6956 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
6957 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
6958 .klen = 16,
6959 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6960 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6961 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
6962 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
6963 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
6964 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
6965 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
6966 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
6967 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
6968 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
6969 .ilen = 64,
6970 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6971 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6972 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6973 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6974 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6975 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6976 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6977 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6978 .rlen = 64,
6979 }, {
6980 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
6981 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
6982 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
6983 .klen = 24,
6984 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6985 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6986 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
6987 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
6988 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
6989 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
6990 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
6991 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
6992 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
6993 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
6994 .ilen = 64,
6995 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6996 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6997 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6998 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6999 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7000 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7001 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7002 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7003 .rlen = 64,
7004 }, {
7005 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
7006 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
7007 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
7008 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
7009 .klen = 32,
7010 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7011 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7012 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
7013 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
7014 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
7015 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
7016 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
7017 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
7018 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
7019 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
7020 .ilen = 64,
7021 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7022 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7023 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7024 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7025 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7026 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7027 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7028 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7029 .rlen = 64,
7030 }
7031};
7032
7033static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +08007034 { /* From RFC 3686 */
7035 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
7036 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
7037 "\x00\x00\x00\x30",
7038 .klen = 20,
7039 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
7040 .input = "Single block msg",
7041 .ilen = 16,
7042 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
7043 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
7044 .rlen = 16,
7045 }, {
7046 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
7047 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
7048 "\x00\x6c\xb6\xdb",
7049 .klen = 20,
7050 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
7051 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7052 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7053 "\x10\x11\x12\x13\x14\x15\x16\x17"
7054 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7055 .ilen = 32,
7056 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
7057 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
7058 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
7059 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
7060 .rlen = 32,
7061 }, {
7062 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
7063 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
7064 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
7065 "\x00\x00\x00\x48",
7066 .klen = 28,
7067 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
7068 .input = "Single block msg",
7069 .ilen = 16,
7070 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
7071 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
7072 .rlen = 16,
7073 }, {
7074 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
7075 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
7076 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
7077 "\x00\x96\xb0\x3b",
7078 .klen = 28,
7079 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
7080 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7081 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7082 "\x10\x11\x12\x13\x14\x15\x16\x17"
7083 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7084 .ilen = 32,
7085 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
7086 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
7087 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
7088 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
7089 .rlen = 32,
7090 }, {
7091 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
7092 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
7093 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
7094 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
7095 "\x00\x00\x00\x60",
7096 .klen = 36,
7097 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
7098 .input = "Single block msg",
7099 .ilen = 16,
7100 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
7101 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
7102 .rlen = 16,
7103 }, {
7104 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
7105 "\x07\x96\x36\x58\x79\xef\xf8\x86"
7106 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
7107 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
7108 "\x00\xfa\xac\x24",
7109 .klen = 36,
7110 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
7111 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7112 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7113 "\x10\x11\x12\x13\x14\x15\x16\x17"
7114 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7115 .ilen = 32,
7116 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
7117 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
7118 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
7119 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
7120 .rlen = 32,
7121 }, {
7122 // generated using Crypto++
7123 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
7124 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7125 "\x10\x11\x12\x13\x14\x15\x16\x17"
7126 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7127 "\x00\x00\x00\x00",
7128 .klen = 32 + 4,
7129 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
7130 .input =
7131 "\x00\x01\x02\x03\x04\x05\x06\x07"
7132 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7133 "\x10\x11\x12\x13\x14\x15\x16\x17"
7134 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7135 "\x20\x21\x22\x23\x24\x25\x26\x27"
7136 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7137 "\x30\x31\x32\x33\x34\x35\x36\x37"
7138 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7139 "\x40\x41\x42\x43\x44\x45\x46\x47"
7140 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7141 "\x50\x51\x52\x53\x54\x55\x56\x57"
7142 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7143 "\x60\x61\x62\x63\x64\x65\x66\x67"
7144 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7145 "\x70\x71\x72\x73\x74\x75\x76\x77"
7146 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7147 "\x80\x81\x82\x83\x84\x85\x86\x87"
7148 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7149 "\x90\x91\x92\x93\x94\x95\x96\x97"
7150 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7151 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7152 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7153 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7154 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7155 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7156 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7157 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7158 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7159 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7160 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7161 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7162 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7163 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
7164 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
7165 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
7166 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
7167 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
7168 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
7169 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
7170 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
7171 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
7172 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
7173 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
7174 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
7175 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
7176 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
7177 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
7178 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
7179 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
7180 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
7181 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
7182 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
7183 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
7184 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
7185 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
7186 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
7187 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
7188 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
7189 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
7190 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
7191 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
7192 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
7193 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
7194 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
7195 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
7196 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
7197 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
7198 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
7199 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
7200 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
7201 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
7202 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
7203 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
7204 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
7205 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
7206 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
7207 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
7208 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
7209 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
7210 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
7211 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
7212 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
7213 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
7214 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
7215 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
7216 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
7217 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
7218 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
7219 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
7220 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
7221 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
7222 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
7223 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
7224 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
7225 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
7226 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
7227 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
7228 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
7229 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
7230 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
7231 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
7232 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
7233 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
7234 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
7235 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
7236 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
7237 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
7238 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
7239 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
7240 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
7241 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
7242 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
7243 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
7244 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
7245 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
7246 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
7247 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
7248 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
7249 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
7250 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
7251 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
7252 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
7253 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
7254 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
7255 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
7256 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
7257 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
7258 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
7259 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
7260 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
7261 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
7262 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
7263 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
7264 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
7265 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
7266 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
7267 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
7268 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
7269 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
7270 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
7271 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
7272 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
7273 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
7274 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
7275 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
7276 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
7277 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
7278 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
7279 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
7280 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
7281 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
7282 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
7283 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
7284 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
7285 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
7286 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
7287 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
7288 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
7289 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
7290 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
7291 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
7292 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
7293 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
7294 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
7295 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
7296 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
7297 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
7298 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
7299 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
7300 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
7301 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
7302 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
7303 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
7304 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
7305 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
7306 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
7307 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
7308 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
7309 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
7310 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
7311 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
7312 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
7313 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
7314 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
7315 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
7316 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
7317 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
7318 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
7319 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
7320 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
7321 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
7322 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
7323 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
7324 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
7325 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
7326 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
7327 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
7328 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
7329 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
7330 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
7331 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
7332 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
7333 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
7334 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
7335 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
7336 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
7337 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
7338 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
7339 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
7340 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
7341 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
7342 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
7343 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
7344 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
7345 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
7346 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
7347 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
7348 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
7349 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
7350 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
7351 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
7352 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
7353 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
7354 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
7355 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
7356 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
7357 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
7358 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
7359 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
7360 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
7361 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
7362 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
7363 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
7364 "\x38\x47\x56\x65\x74\x83\x92\xa1"
7365 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
7366 "\x28\x37\x46\x55\x64\x73\x82\x91"
7367 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
7368 "\x18\x27\x36\x45\x54\x63\x72\x81"
7369 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
7370 "\x08\x17\x26\x35\x44\x53\x62\x71"
7371 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
7372 "\xf8\x07\x16\x25\x34\x43\x52\x61"
7373 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
7374 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
7375 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
7376 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
7377 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
7378 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
7379 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
7380 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
7381 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
7382 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
7383 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
7384 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
7385 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
7386 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
7387 "\x00\x11\x22\x33\x44\x55\x66\x77"
7388 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
7389 "\x10\x21\x32\x43\x54\x65\x76\x87"
7390 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
7391 "\x20\x31\x42\x53\x64\x75\x86\x97"
7392 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
7393 "\x30\x41\x52\x63\x74\x85\x96\xa7"
7394 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
7395 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
7396 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
7397 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
7398 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
7399 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
7400 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
7401 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
7402 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
7403 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
7404 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
7405 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
7406 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
7407 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
7408 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
7409 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
7410 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
7411 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
7412 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
7413 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
7414 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
7415 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
7416 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
7417 "\xf0\x01\x12\x23\x34\x45\x56\x67"
7418 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
7419 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
7420 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
7421 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
7422 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
7423 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
7424 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
7425 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
7426 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
7427 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
7428 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
7429 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
7430 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
7431 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
7432 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
7433 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
7434 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
7435 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
7436 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
7437 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
7438 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
7439 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
7440 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
7441 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
7442 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
7443 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
7444 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
7445 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
7446 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
7447 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
7448 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
7449 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
7450 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
7451 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
7452 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
7453 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
7454 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
7455 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
7456 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
7457 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
7458 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
7459 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
7460 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
7461 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
7462 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
7463 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
7464 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
7465 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
7466 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
7467 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
7468 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
7469 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
7470 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
7471 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
7472 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
7473 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
7474 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
7475 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
7476 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
7477 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
7478 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
7479 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
7480 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
7481 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
7482 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
7483 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
7484 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
7485 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
7486 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
7487 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
7488 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
7489 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
7490 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
7491 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
7492 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
7493 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
7494 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
7495 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
7496 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
7497 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
7498 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
7499 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
7500 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
7501 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
7502 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
7503 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
7504 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
7505 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
7506 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
7507 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
7508 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
7509 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
7510 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
7511 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
7512 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
7513 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
7514 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
7515 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
7516 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
7517 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
7518 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
7519 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
7520 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
7521 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
7522 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
7523 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
7524 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
7525 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
7526 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
7527 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
7528 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
7529 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
7530 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
7531 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
7532 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
7533 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
7534 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
7535 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
7536 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
7537 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
7538 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
7539 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
7540 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
7541 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
7542 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
7543 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
7544 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
7545 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
7546 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
7547 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
7548 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
7549 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
7550 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
7551 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
7552 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
7553 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
7554 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
7555 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
7556 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
7557 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
7558 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
7559 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
7560 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
7561 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
7562 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
7563 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
7564 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
7565 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
7566 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
7567 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
7568 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
7569 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
7570 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
7571 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
7572 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
7573 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
7574 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
7575 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
7576 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
7577 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
7578 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
7579 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
7580 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
7581 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
7582 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
7583 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
7584 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
7585 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
7586 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
7587 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
7588 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
7589 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
7590 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
7591 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
7592 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
7593 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
7594 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
7595 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
7596 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
7597 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
7598 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
7599 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
7600 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
7601 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
7602 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
7603 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
7604 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
7605 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
7606 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
7607 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
7608 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
7609 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
7610 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
7611 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
7612 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
7613 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
7614 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
7615 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
7616 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
7617 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
7618 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
7619 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
7620 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
7621 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
7622 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
7623 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
7624 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
7625 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
7626 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
7627 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
7628 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
7629 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
7630 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
7631 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
7632 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
7633 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
7634 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
7635 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
7636 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
7637 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
7638 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
7639 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
7640 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
7641 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
7642 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
7643 "\x00\x21\x42\x63",
7644 .ilen = 4100,
7645 .result =
7646 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
7647 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
7648 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
7649 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
7650 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
7651 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
7652 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
7653 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
7654 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
7655 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
7656 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
7657 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
7658 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
7659 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
7660 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
7661 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
7662 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
7663 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
7664 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
7665 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
7666 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
7667 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
7668 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
7669 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
7670 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
7671 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
7672 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
7673 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
7674 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
7675 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
7676 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
7677 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
7678 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
7679 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
7680 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
7681 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
7682 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
7683 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
7684 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
7685 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
7686 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
7687 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
7688 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
7689 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
7690 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
7691 "\x04\x02\xef\xd3\x44\xde\x76\x31"
7692 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
7693 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
7694 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
7695 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
7696 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
7697 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
7698 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
7699 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
7700 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
7701 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
7702 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
7703 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
7704 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
7705 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
7706 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
7707 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
7708 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
7709 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
7710 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
7711 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
7712 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
7713 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
7714 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
7715 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
7716 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
7717 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
7718 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
7719 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
7720 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
7721 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
7722 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
7723 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
7724 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
7725 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
7726 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
7727 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
7728 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
7729 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
7730 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
7731 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
7732 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
7733 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
7734 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
7735 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
7736 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
7737 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
7738 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
7739 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
7740 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
7741 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
7742 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
7743 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
7744 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
7745 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
7746 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
7747 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
7748 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
7749 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
7750 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
7751 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
7752 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
7753 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
7754 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
7755 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
7756 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
7757 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
7758 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
7759 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
7760 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
7761 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
7762 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
7763 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
7764 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
7765 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
7766 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
7767 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
7768 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
7769 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
7770 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
7771 "\x26\x39\x83\x94\xef\x27\xd8\x53"
7772 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
7773 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
7774 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
7775 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
7776 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
7777 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
7778 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
7779 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
7780 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
7781 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
7782 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
7783 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
7784 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
7785 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
7786 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
7787 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
7788 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
7789 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
7790 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
7791 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
7792 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
7793 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
7794 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
7795 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
7796 "\x35\x12\xe3\x36\x28\x27\x36\x58"
7797 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
7798 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
7799 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
7800 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
7801 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
7802 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
7803 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
7804 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
7805 "\x89\xf3\x78\x35\x44\x62\x78\x72"
7806 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
7807 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
7808 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
7809 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
7810 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
7811 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
7812 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
7813 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
7814 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
7815 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
7816 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
7817 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
7818 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
7819 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
7820 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
7821 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
7822 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
7823 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
7824 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
7825 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
7826 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
7827 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
7828 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
7829 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
7830 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
7831 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
7832 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
7833 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
7834 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
7835 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
7836 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
7837 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
7838 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
7839 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
7840 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
7841 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
7842 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
7843 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
7844 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
7845 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
7846 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
7847 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
7848 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
7849 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
7850 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
7851 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
7852 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
7853 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
7854 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
7855 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
7856 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
7857 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
7858 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
7859 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
7860 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
7861 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
7862 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
7863 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
7864 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
7865 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
7866 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
7867 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
7868 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
7869 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
7870 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
7871 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
7872 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
7873 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
7874 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
7875 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
7876 "\x29\x90\x46\x30\x92\x69\x7d\x13"
7877 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
7878 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
7879 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
7880 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
7881 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
7882 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
7883 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
7884 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
7885 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
7886 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
7887 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
7888 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
7889 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
7890 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
7891 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
7892 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
7893 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
7894 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
7895 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
7896 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
7897 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
7898 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
7899 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
7900 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
7901 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
7902 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
7903 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
7904 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
7905 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
7906 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
7907 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
7908 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
7909 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
7910 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
7911 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
7912 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
7913 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
7914 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
7915 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
7916 "\x73\x02\x3b\x78\x21\x72\x43\x00"
7917 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
7918 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
7919 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
7920 "\x11\x94\x13\x69\x51\x09\x28\xde"
7921 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
7922 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
7923 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
7924 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
7925 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
7926 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
7927 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
7928 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
7929 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
7930 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
7931 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
7932 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
7933 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
7934 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
7935 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
7936 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
7937 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
7938 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
7939 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
7940 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
7941 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
7942 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
7943 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
7944 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
7945 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
7946 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
7947 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
7948 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
7949 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
7950 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
7951 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
7952 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
7953 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
7954 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
7955 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
7956 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
7957 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
7958 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
7959 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
7960 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
7961 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
7962 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
7963 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
7964 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
7965 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
7966 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
7967 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
7968 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
7969 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
7970 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
7971 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
7972 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
7973 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
7974 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
7975 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
7976 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
7977 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
7978 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
7979 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
7980 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
7981 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
7982 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
7983 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
7984 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
7985 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
7986 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
7987 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
7988 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
7989 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
7990 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
7991 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
7992 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
7993 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
7994 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
7995 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
7996 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
7997 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
7998 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
7999 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
8000 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
8001 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
8002 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
8003 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
8004 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
8005 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
8006 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
8007 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
8008 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
8009 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
8010 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
8011 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
8012 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
8013 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
8014 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
8015 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
8016 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
8017 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
8018 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
8019 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
8020 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
8021 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
8022 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
8023 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
8024 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
8025 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
8026 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
8027 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
8028 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
8029 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
8030 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
8031 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
8032 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
8033 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
8034 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
8035 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
8036 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
8037 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
8038 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
8039 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
8040 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
8041 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
8042 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
8043 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
8044 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
8045 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
8046 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
8047 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
8048 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
8049 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
8050 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
8051 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
8052 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
8053 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
8054 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
8055 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
8056 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
8057 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
8058 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
8059 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
8060 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
8061 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
8062 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
8063 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
8064 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
8065 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
8066 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
8067 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
8068 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
8069 "\xae\xed\x39\x88\x42\x11\x3c\xed"
8070 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
8071 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
8072 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
8073 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
8074 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
8075 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
8076 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
8077 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
8078 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
8079 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
8080 "\x34\x17\xde\xba\x47\xf1\x06\x18"
8081 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
8082 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
8083 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
8084 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
8085 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
8086 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
8087 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
8088 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
8089 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
8090 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
8091 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
8092 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
8093 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
8094 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
8095 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
8096 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
8097 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
8098 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
8099 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
8100 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
8101 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
8102 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
8103 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
8104 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
8105 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
8106 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
8107 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
8108 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
8109 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
8110 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
8111 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
8112 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
8113 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
8114 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
8115 "\x74\x56\x58\x40\x02\x37\x52\x2c"
8116 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
8117 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
8118 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
8119 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
8120 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
8121 "\xed\x38\x80\x36\x72\x43\x27\x49"
8122 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
8123 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
8124 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
8125 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
8126 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
8127 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
8128 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
8129 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
8130 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
8131 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
8132 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
8133 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
8134 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
8135 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
8136 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
8137 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
8138 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
8139 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
8140 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
8141 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
8142 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
8143 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
8144 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
8145 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
8146 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
8147 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
8148 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
8149 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
8150 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
8151 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
8152 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
8153 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
8154 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
8155 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
8156 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
8157 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
8158 "\x21\xed\xda\x86",
8159 .rlen = 4100,
8160 .np = 2,
8161 .tap = { 4064, 36 },
8162 },
8163};
8164
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08008165static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +08008166 { /* From RFC 3686 */
8167 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
8168 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
8169 "\x00\x00\x00\x30",
8170 .klen = 20,
8171 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
8172 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
8173 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
8174 .ilen = 16,
8175 .result = "Single block msg",
8176 .rlen = 16,
8177 }, {
8178 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
8179 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
8180 "\x00\x6c\xb6\xdb",
8181 .klen = 20,
8182 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
8183 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
8184 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
8185 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
8186 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
8187 .ilen = 32,
8188 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8189 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8190 "\x10\x11\x12\x13\x14\x15\x16\x17"
8191 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8192 .rlen = 32,
8193 }, {
8194 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
8195 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
8196 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
8197 "\x00\x00\x00\x48",
8198 .klen = 28,
8199 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
8200 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
8201 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
8202 .ilen = 16,
8203 .result = "Single block msg",
8204 .rlen = 16,
8205 }, {
8206 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
8207 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
8208 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
8209 "\x00\x96\xb0\x3b",
8210 .klen = 28,
8211 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
8212 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
8213 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
8214 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
8215 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
8216 .ilen = 32,
8217 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8218 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8219 "\x10\x11\x12\x13\x14\x15\x16\x17"
8220 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8221 .rlen = 32,
8222 }, {
8223 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
8224 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
8225 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
8226 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
8227 "\x00\x00\x00\x60",
8228 .klen = 36,
8229 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
8230 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
8231 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
8232 .ilen = 16,
8233 .result = "Single block msg",
8234 .rlen = 16,
8235 }, {
8236 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
8237 "\x07\x96\x36\x58\x79\xef\xf8\x86"
8238 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
8239 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
8240 "\x00\xfa\xac\x24",
8241 .klen = 36,
8242 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
8243 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
8244 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
8245 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
8246 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
8247 .ilen = 32,
8248 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8249 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8250 "\x10\x11\x12\x13\x14\x15\x16\x17"
8251 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8252 .rlen = 32,
8253 },
8254};
8255
Puneet Saxenaba0e14a2011-05-04 15:04:10 +10008256static struct cipher_testvec aes_ofb_enc_tv_template[] = {
8257 /* From NIST Special Publication 800-38A, Appendix F.5 */
8258 {
8259 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
8260 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
8261 .klen = 16,
8262 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
8263 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8264 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8265 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8266 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8267 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8268 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8269 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8270 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8271 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8272 .ilen = 64,
8273 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
8274 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
8275 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
8276 "\x3c\x52\xda\xc5\x4e\xd8\x25"
8277 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
8278 "\x44\xf7\xa8\x22\x60\xed\xcc"
8279 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
8280 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
8281 .rlen = 64,
8282 }
8283};
8284
8285static struct cipher_testvec aes_ofb_dec_tv_template[] = {
8286 /* From NIST Special Publication 800-38A, Appendix F.5 */
8287 {
8288 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
8289 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
8290 .klen = 16,
8291 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
8292 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8293 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
8294 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
8295 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
8296 "\x3c\x52\xda\xc5\x4e\xd8\x25"
8297 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
8298 "\x44\xf7\xa8\x22\x60\xed\xcc"
8299 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
8300 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
8301 .ilen = 64,
8302 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8303 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8304 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8305 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8306 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8307 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8308 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8309 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8310 .rlen = 64,
8311 }
8312};
8313
Herbert Xuda7f0332008-07-31 17:08:25 +08008314static struct aead_testvec aes_gcm_enc_tv_template[] = {
8315 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
8316 .key = zeroed_string,
8317 .klen = 16,
8318 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
8319 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
8320 .rlen = 16,
8321 }, {
8322 .key = zeroed_string,
8323 .klen = 16,
8324 .input = zeroed_string,
8325 .ilen = 16,
8326 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
8327 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
8328 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
8329 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
8330 .rlen = 32,
8331 }, {
8332 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8333 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8334 .klen = 16,
8335 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8336 "\xde\xca\xf8\x88",
8337 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8338 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8339 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8340 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8341 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8342 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8343 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8344 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
8345 .ilen = 64,
8346 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
8347 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
8348 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
8349 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
8350 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
8351 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
8352 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
8353 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
8354 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
8355 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
8356 .rlen = 80,
8357 }, {
8358 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8359 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8360 .klen = 16,
8361 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8362 "\xde\xca\xf8\x88",
8363 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8364 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8365 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8366 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8367 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8368 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8369 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8370 "\xba\x63\x7b\x39",
8371 .ilen = 60,
8372 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8373 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8374 "\xab\xad\xda\xd2",
8375 .alen = 20,
8376 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
8377 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
8378 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
8379 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
8380 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
8381 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
8382 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
8383 "\x3d\x58\xe0\x91"
8384 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
8385 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
8386 .rlen = 76,
8387 }, {
8388 .key = zeroed_string,
8389 .klen = 24,
8390 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
8391 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
8392 .rlen = 16,
8393 }, {
8394 .key = zeroed_string,
8395 .klen = 24,
8396 .input = zeroed_string,
8397 .ilen = 16,
8398 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
8399 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
8400 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
8401 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
8402 .rlen = 32,
8403 }, {
8404 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8405 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8406 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
8407 .klen = 24,
8408 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8409 "\xde\xca\xf8\x88",
8410 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8411 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8412 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8413 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8414 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8415 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8416 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8417 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
8418 .ilen = 64,
8419 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
8420 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
8421 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
8422 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
8423 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
8424 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
8425 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
8426 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
8427 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
8428 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
8429 .rlen = 80,
8430 }, {
8431 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8432 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8433 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
8434 .klen = 24,
8435 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8436 "\xde\xca\xf8\x88",
8437 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8438 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8439 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8440 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8441 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8442 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8443 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8444 "\xba\x63\x7b\x39",
8445 .ilen = 60,
8446 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8447 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8448 "\xab\xad\xda\xd2",
8449 .alen = 20,
8450 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
8451 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
8452 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
8453 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
8454 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
8455 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
8456 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
8457 "\xcc\xda\x27\x10"
8458 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
8459 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
8460 .rlen = 76,
8461 .np = 2,
8462 .tap = { 32, 28 },
8463 .anp = 2,
8464 .atap = { 8, 12 }
8465 }, {
8466 .key = zeroed_string,
8467 .klen = 32,
8468 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
8469 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
8470 .rlen = 16,
8471 }
8472};
8473
8474static struct aead_testvec aes_gcm_dec_tv_template[] = {
8475 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
8476 .key = zeroed_string,
8477 .klen = 32,
8478 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
8479 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
8480 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
8481 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
8482 .ilen = 32,
8483 .result = zeroed_string,
8484 .rlen = 16,
8485 }, {
8486 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8487 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8488 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8489 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8490 .klen = 32,
8491 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8492 "\xde\xca\xf8\x88",
8493 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
8494 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
8495 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
8496 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
8497 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
8498 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
8499 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
8500 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
8501 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
8502 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
8503 .ilen = 80,
8504 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8505 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8506 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8507 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8508 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8509 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8510 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8511 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
8512 .rlen = 64,
8513 }, {
8514 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8515 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8516 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8517 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8518 .klen = 32,
8519 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8520 "\xde\xca\xf8\x88",
8521 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
8522 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
8523 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
8524 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
8525 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
8526 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
8527 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
8528 "\xbc\xc9\xf6\x62"
8529 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
8530 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
8531 .ilen = 76,
8532 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8533 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8534 "\xab\xad\xda\xd2",
8535 .alen = 20,
8536 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8537 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8538 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8539 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8540 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8541 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8542 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8543 "\xba\x63\x7b\x39",
8544 .rlen = 60,
8545 .np = 2,
8546 .tap = { 48, 28 },
8547 .anp = 3,
8548 .atap = { 8, 8, 4 }
8549 }, {
8550 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8551 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8552 .klen = 16,
8553 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8554 "\xde\xca\xf8\x88",
8555 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
8556 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
8557 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
8558 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
8559 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
8560 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
8561 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
8562 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
8563 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
8564 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
8565 .ilen = 80,
8566 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8567 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8568 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8569 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8570 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8571 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8572 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8573 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
8574 .rlen = 64,
8575 }, {
8576 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8577 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
8578 .klen = 16,
8579 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8580 "\xde\xca\xf8\x88",
8581 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
8582 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
8583 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
8584 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
8585 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
8586 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
8587 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
8588 "\x3d\x58\xe0\x91"
8589 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
8590 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
8591 .ilen = 76,
8592 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8593 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8594 "\xab\xad\xda\xd2",
8595 .alen = 20,
8596 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8597 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8598 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8599 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8600 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8601 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8602 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8603 "\xba\x63\x7b\x39",
8604 .rlen = 60,
8605 }, {
8606 .key = zeroed_string,
8607 .klen = 24,
8608 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
8609 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
8610 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
8611 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
8612 .ilen = 32,
8613 .result = zeroed_string,
8614 .rlen = 16,
8615 }, {
8616 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8617 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8618 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
8619 .klen = 24,
8620 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8621 "\xde\xca\xf8\x88",
8622 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
8623 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
8624 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
8625 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
8626 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
8627 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
8628 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
8629 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
8630 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
8631 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
8632 .ilen = 80,
8633 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8634 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8635 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8636 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8637 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8638 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8639 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8640 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
8641 .rlen = 64,
8642 }, {
8643 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8644 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8645 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
8646 .klen = 24,
8647 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
8648 "\xde\xca\xf8\x88",
8649 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
8650 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
8651 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
8652 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
8653 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
8654 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
8655 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
8656 "\xcc\xda\x27\x10"
8657 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
8658 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
8659 .ilen = 76,
8660 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8661 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
8662 "\xab\xad\xda\xd2",
8663 .alen = 20,
8664 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
8665 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
8666 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
8667 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
8668 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
8669 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
8670 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
8671 "\xba\x63\x7b\x39",
8672 .rlen = 60,
8673 }
8674};
8675
Adrian Hoban69435b92010-11-04 15:02:04 -04008676static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
8677 { /* Generated using Crypto++ */
8678 .key = zeroed_string,
8679 .klen = 20,
8680 .iv = zeroed_string,
8681 .input = zeroed_string,
8682 .ilen = 16,
8683 .assoc = zeroed_string,
8684 .alen = 8,
8685 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
8686 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
8687 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
8688 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
8689 .rlen = 32,
8690 },{
8691 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8692 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8693 "\x00\x00\x00\x00",
8694 .klen = 20,
8695 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8696 "\x00\x00\x00\x00",
8697 .input = zeroed_string,
8698 .ilen = 16,
8699 .assoc = zeroed_string,
8700 .alen = 8,
8701 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
8702 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
8703 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
8704 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
8705 .rlen = 32,
8706
8707 }, {
8708 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8709 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8710 "\x00\x00\x00\x00",
8711 .klen = 20,
8712 .iv = zeroed_string,
8713 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
8714 "\x01\x01\x01\x01\x01\x01\x01\x01",
8715 .ilen = 16,
8716 .assoc = zeroed_string,
8717 .alen = 8,
8718 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
8719 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
8720 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
8721 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
8722 .rlen = 32,
8723 }, {
8724 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8725 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8726 "\x00\x00\x00\x00",
8727 .klen = 20,
8728 .iv = zeroed_string,
8729 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
8730 "\x01\x01\x01\x01\x01\x01\x01\x01",
8731 .ilen = 16,
8732 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8733 .alen = 8,
8734 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
8735 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
8736 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
8737 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
8738 .rlen = 32,
8739 }, {
8740 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8741 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8742 "\x00\x00\x00\x00",
8743 .klen = 20,
8744 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8745 "\x00\x00\x00\x00",
8746 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
8747 "\x01\x01\x01\x01\x01\x01\x01\x01",
8748 .ilen = 16,
8749 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8750 .alen = 8,
8751 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
8752 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
8753 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
8754 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
8755 .rlen = 32,
8756 }, {
8757 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8758 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8759 "\x00\x00\x00\x00",
8760 .klen = 20,
8761 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8762 "\x00\x00\x00\x00",
8763 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
8764 "\x01\x01\x01\x01\x01\x01\x01\x01"
8765 "\x01\x01\x01\x01\x01\x01\x01\x01"
8766 "\x01\x01\x01\x01\x01\x01\x01\x01"
8767 "\x01\x01\x01\x01\x01\x01\x01\x01"
8768 "\x01\x01\x01\x01\x01\x01\x01\x01"
8769 "\x01\x01\x01\x01\x01\x01\x01\x01"
8770 "\x01\x01\x01\x01\x01\x01\x01\x01",
8771 .ilen = 64,
8772 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8773 .alen = 8,
8774 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
8775 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
8776 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
8777 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
8778 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
8779 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
8780 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
8781 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
8782 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
8783 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
8784 .rlen = 80,
8785 }, {
8786 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8787 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8788 "\x00\x00\x00\x00",
8789 .klen = 20,
8790 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
8791 "\x00\x00\x00\x00",
8792 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
8793 "\xff\xff\xff\xff\xff\xff\xff\xff"
8794 "\xff\xff\xff\xff\xff\xff\xff\xff"
8795 "\xff\xff\xff\xff\xff\xff\xff\xff"
8796 "\xff\xff\xff\xff\xff\xff\xff\xff"
8797 "\xff\xff\xff\xff\xff\xff\xff\xff"
8798 "\xff\xff\xff\xff\xff\xff\xff\xff"
8799 "\xff\xff\xff\xff\xff\xff\xff\xff"
8800 "\xff\xff\xff\xff\xff\xff\xff\xff"
8801 "\xff\xff\xff\xff\xff\xff\xff\xff"
8802 "\xff\xff\xff\xff\xff\xff\xff\xff"
8803 "\xff\xff\xff\xff\xff\xff\xff\xff"
8804 "\xff\xff\xff\xff\xff\xff\xff\xff"
8805 "\xff\xff\xff\xff\xff\xff\xff\xff"
8806 "\xff\xff\xff\xff\xff\xff\xff\xff"
8807 "\xff\xff\xff\xff\xff\xff\xff\xff"
8808 "\xff\xff\xff\xff\xff\xff\xff\xff"
8809 "\xff\xff\xff\xff\xff\xff\xff\xff"
8810 "\xff\xff\xff\xff\xff\xff\xff\xff"
8811 "\xff\xff\xff\xff\xff\xff\xff\xff"
8812 "\xff\xff\xff\xff\xff\xff\xff\xff"
8813 "\xff\xff\xff\xff\xff\xff\xff\xff"
8814 "\xff\xff\xff\xff\xff\xff\xff\xff"
8815 "\xff\xff\xff\xff\xff\xff\xff\xff",
8816 .ilen = 192,
8817 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
8818 "\xaa\xaa\xaa\xaa",
8819 .alen = 12,
8820 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
8821 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
8822 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
8823 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
8824 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
8825 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
8826 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
8827 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
8828 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
8829 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
8830 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
8831 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
8832 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
8833 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
8834 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
8835 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
8836 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
8837 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
8838 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
8839 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
8840 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
8841 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
8842 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
8843 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
8844 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
8845 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
8846 .rlen = 208,
8847 }
8848};
8849
8850static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
8851 { /* Generated using Crypto++ */
8852 .key = zeroed_string,
8853 .klen = 20,
8854 .iv = zeroed_string,
8855 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
8856 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
8857 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
8858 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
8859 .ilen = 32,
8860 .assoc = zeroed_string,
8861 .alen = 8,
8862 .result = zeroed_string,
8863 .rlen = 16,
8864
8865 },{
8866 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8867 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8868 "\x00\x00\x00\x00",
8869 .klen = 20,
8870 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8871 "\x00\x00\x00\x00",
8872 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
8873 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
8874 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
8875 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
8876 .ilen = 32,
8877 .assoc = zeroed_string,
8878 .alen = 8,
8879 .result = zeroed_string,
8880 .rlen = 16,
8881 }, {
8882 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8883 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8884 "\x00\x00\x00\x00",
8885 .klen = 20,
8886 .iv = zeroed_string,
8887 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
8888 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
8889 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
8890 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
8891 .ilen = 32,
8892 .assoc = zeroed_string,
8893 .alen = 8,
8894 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
8895 "\x01\x01\x01\x01\x01\x01\x01\x01",
8896 .rlen = 16,
8897 }, {
8898 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8899 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8900 "\x00\x00\x00\x00",
8901 .klen = 20,
8902 .iv = zeroed_string,
8903 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
8904 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
8905 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
8906 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
8907 .ilen = 32,
8908 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8909 .alen = 8,
8910 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
8911 "\x01\x01\x01\x01\x01\x01\x01\x01",
8912 .rlen = 16,
8913
8914 }, {
8915 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8916 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8917 "\x00\x00\x00\x00",
8918 .klen = 20,
8919 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8920 "\x00\x00\x00\x00",
8921 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
8922 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
8923 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
8924 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
8925 .ilen = 32,
8926 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8927 .alen = 8,
8928 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
8929 "\x01\x01\x01\x01\x01\x01\x01\x01",
8930 .rlen = 16,
8931 }, {
8932 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
8933 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
8934 "\x00\x00\x00\x00",
8935 .klen = 20,
8936 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
8937 "\x00\x00\x00\x00",
8938 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
8939 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
8940 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
8941 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
8942 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
8943 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
8944 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
8945 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
8946 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
8947 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
8948 .ilen = 80,
8949 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
8950 .alen = 8,
8951 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
8952 "\x01\x01\x01\x01\x01\x01\x01\x01"
8953 "\x01\x01\x01\x01\x01\x01\x01\x01"
8954 "\x01\x01\x01\x01\x01\x01\x01\x01"
8955 "\x01\x01\x01\x01\x01\x01\x01\x01"
8956 "\x01\x01\x01\x01\x01\x01\x01\x01"
8957 "\x01\x01\x01\x01\x01\x01\x01\x01"
8958 "\x01\x01\x01\x01\x01\x01\x01\x01",
8959 .rlen = 64,
8960 }, {
8961 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8962 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8963 "\x00\x00\x00\x00",
8964 .klen = 20,
8965 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
8966 "\x00\x00\x00\x00",
8967 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
8968 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
8969 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
8970 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
8971 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
8972 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
8973 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
8974 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
8975 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
8976 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
8977 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
8978 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
8979 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
8980 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
8981 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
8982 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
8983 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
8984 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
8985 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
8986 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
8987 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
8988 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
8989 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
8990 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
8991 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
8992 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
8993 .ilen = 208,
8994 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
8995 "\xaa\xaa\xaa\xaa",
8996 .alen = 12,
8997 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
8998 "\xff\xff\xff\xff\xff\xff\xff\xff"
8999 "\xff\xff\xff\xff\xff\xff\xff\xff"
9000 "\xff\xff\xff\xff\xff\xff\xff\xff"
9001 "\xff\xff\xff\xff\xff\xff\xff\xff"
9002 "\xff\xff\xff\xff\xff\xff\xff\xff"
9003 "\xff\xff\xff\xff\xff\xff\xff\xff"
9004 "\xff\xff\xff\xff\xff\xff\xff\xff"
9005 "\xff\xff\xff\xff\xff\xff\xff\xff"
9006 "\xff\xff\xff\xff\xff\xff\xff\xff"
9007 "\xff\xff\xff\xff\xff\xff\xff\xff"
9008 "\xff\xff\xff\xff\xff\xff\xff\xff"
9009 "\xff\xff\xff\xff\xff\xff\xff\xff"
9010 "\xff\xff\xff\xff\xff\xff\xff\xff"
9011 "\xff\xff\xff\xff\xff\xff\xff\xff"
9012 "\xff\xff\xff\xff\xff\xff\xff\xff"
9013 "\xff\xff\xff\xff\xff\xff\xff\xff"
9014 "\xff\xff\xff\xff\xff\xff\xff\xff"
9015 "\xff\xff\xff\xff\xff\xff\xff\xff"
9016 "\xff\xff\xff\xff\xff\xff\xff\xff"
9017 "\xff\xff\xff\xff\xff\xff\xff\xff"
9018 "\xff\xff\xff\xff\xff\xff\xff\xff"
9019 "\xff\xff\xff\xff\xff\xff\xff\xff"
9020 "\xff\xff\xff\xff\xff\xff\xff\xff",
9021 .rlen = 192,
9022
9023 }
9024};
9025
Herbert Xuda7f0332008-07-31 17:08:25 +08009026static struct aead_testvec aes_ccm_enc_tv_template[] = {
9027 { /* From RFC 3610 */
9028 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9029 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9030 .klen = 16,
9031 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
9032 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9033 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
9034 .alen = 8,
9035 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9036 "\x10\x11\x12\x13\x14\x15\x16\x17"
9037 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
9038 .ilen = 23,
9039 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
9040 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
9041 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
9042 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
9043 .rlen = 31,
9044 }, {
9045 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9046 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9047 .klen = 16,
9048 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
9049 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9050 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
9051 "\x08\x09\x0a\x0b",
9052 .alen = 12,
9053 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9054 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9055 "\x1c\x1d\x1e\x1f",
9056 .ilen = 20,
9057 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
9058 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
9059 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
9060 "\x7d\x9c\x2d\x93",
9061 .rlen = 28,
9062 }, {
9063 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9064 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9065 .klen = 16,
9066 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
9067 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9068 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
9069 .alen = 8,
9070 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9071 "\x10\x11\x12\x13\x14\x15\x16\x17"
9072 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9073 "\x20",
9074 .ilen = 25,
9075 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
9076 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
9077 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
9078 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
9079 "\x7e\x5f\x4e",
9080 .rlen = 35,
9081 }, {
9082 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9083 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9084 .klen = 16,
9085 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
9086 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9087 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
9088 "\x08\x09\x0a\x0b",
9089 .alen = 12,
9090 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9091 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9092 "\x1c\x1d\x1e",
9093 .ilen = 19,
9094 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
9095 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
9096 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
9097 "\x4d\x99\x99\x88\xdd",
9098 .rlen = 29,
9099 }, {
9100 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9101 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9102 .klen = 16,
9103 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
9104 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9105 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
9106 .alen = 8,
9107 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
9108 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
9109 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
9110 .ilen = 24,
9111 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
9112 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
9113 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
9114 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
9115 .rlen = 32,
9116 }, {
9117 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9118 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9119 .klen = 16,
9120 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
9121 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9122 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
9123 "\x20\xea\x60\xc0",
9124 .alen = 12,
9125 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
9126 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
9127 "\x3a\x80\x3b\xa8\x7f",
9128 .ilen = 21,
9129 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
9130 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
9131 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
9132 "\x5a\xe0\x70\x45\x51",
9133 .rlen = 29,
9134 }, {
9135 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9136 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9137 .klen = 16,
9138 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
9139 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9140 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
9141 .alen = 8,
9142 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
9143 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
9144 "\x98\x09\xd6\x7d\xbe\xdd\x18",
9145 .ilen = 23,
9146 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
9147 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
9148 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
9149 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
9150 "\xba",
9151 .rlen = 33,
9152 },
9153};
9154
9155static struct aead_testvec aes_ccm_dec_tv_template[] = {
9156 { /* From RFC 3610 */
9157 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9158 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9159 .klen = 16,
9160 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
9161 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9162 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
9163 .alen = 8,
9164 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
9165 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
9166 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
9167 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
9168 .ilen = 31,
9169 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9170 "\x10\x11\x12\x13\x14\x15\x16\x17"
9171 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
9172 .rlen = 23,
9173 }, {
9174 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9175 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9176 .klen = 16,
9177 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
9178 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9179 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
9180 "\x08\x09\x0a\x0b",
9181 .alen = 12,
9182 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
9183 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
9184 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
9185 "\x7d\x9c\x2d\x93",
9186 .ilen = 28,
9187 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9188 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9189 "\x1c\x1d\x1e\x1f",
9190 .rlen = 20,
9191 }, {
9192 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9193 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9194 .klen = 16,
9195 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
9196 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9197 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
9198 .alen = 8,
9199 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
9200 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
9201 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
9202 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
9203 "\x7e\x5f\x4e",
9204 .ilen = 35,
9205 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9206 "\x10\x11\x12\x13\x14\x15\x16\x17"
9207 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9208 "\x20",
9209 .rlen = 25,
9210 }, {
9211 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9212 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9213 .klen = 16,
9214 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
9215 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9216 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
9217 "\x08\x09\x0a\x0b",
9218 .alen = 12,
9219 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
9220 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
9221 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
9222 "\x4d\x99\x99\x88\xdd",
9223 .ilen = 29,
9224 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9225 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9226 "\x1c\x1d\x1e",
9227 .rlen = 19,
9228 }, {
9229 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9230 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9231 .klen = 16,
9232 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
9233 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9234 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
9235 .alen = 8,
9236 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
9237 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
9238 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
9239 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
9240 .ilen = 32,
9241 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
9242 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
9243 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
9244 .rlen = 24,
9245 }, {
9246 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9247 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9248 .klen = 16,
9249 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
9250 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9251 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
9252 "\x20\xea\x60\xc0",
9253 .alen = 12,
9254 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
9255 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
9256 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
9257 "\x5a\xe0\x70\x45\x51",
9258 .ilen = 29,
9259 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
9260 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
9261 "\x3a\x80\x3b\xa8\x7f",
9262 .rlen = 21,
9263 }, {
9264 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9265 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9266 .klen = 16,
9267 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
9268 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9269 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
9270 .alen = 8,
9271 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
9272 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
9273 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
9274 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
9275 "\xba",
9276 .ilen = 33,
9277 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
9278 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
9279 "\x98\x09\xd6\x7d\xbe\xdd\x18",
9280 .rlen = 23,
9281 },
9282};
9283
Jarod Wilson5d667322009-05-04 19:23:40 +08009284/*
9285 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
9286 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
9287 * Special Publication 800-38C's test vectors also use nonce lengths our
9288 * implementation doesn't support. The following are taken from fips cavs
9289 * fax files on hand at Red Hat.
9290 *
9291 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
9292 * part of the nonce which combine w/the iv, but need to be input this way.
9293 */
9294static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
9295 {
9296 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
9297 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
9298 "\x96\xac\x59",
9299 .klen = 19,
9300 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
9301 .alen = 0,
9302 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
9303 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
9304 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
9305 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
9306 .ilen = 32,
9307 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
9308 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
9309 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
9310 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
9311 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
9312 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
9313 .rlen = 48,
9314 }, {
9315 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
9316 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
9317 "\x4f\xa3\x19",
9318 .klen = 19,
9319 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
9320 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
9321 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
9322 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
9323 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
9324 .alen = 32,
9325 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
9326 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
9327 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
9328 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
9329 .ilen = 32,
9330 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
9331 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
9332 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
9333 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
9334 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
9335 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
9336 .rlen = 48,
9337 }, {
9338 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
9339 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
9340 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
9341 "\xa0\x20\x35",
9342 .klen = 27,
9343 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
9344 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
9345 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
9346 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
9347 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
9348 .alen = 32,
9349 .ilen = 0,
9350 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
9351 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
9352 .rlen = 16,
9353 }, {
9354 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
9355 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
9356 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
9357 "\xd6\x3c\x8c",
9358 .klen = 27,
9359 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
9360 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
9361 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
9362 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
9363 "\xe3\x00\x73\x69\x84\x69\x87\x79",
9364 .alen = 32,
9365 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
9366 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
9367 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
9368 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
9369 .ilen = 32,
9370 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
9371 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
9372 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
9373 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
9374 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
9375 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
9376 .rlen = 48,
9377 }, {
9378 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
9379 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
9380 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
9381 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
9382 "\x1e\x29\x91",
9383 .klen = 35,
9384 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
9385 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
9386 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
9387 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
9388 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
9389 .alen = 32,
9390 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
9391 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
9392 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
9393 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
9394 .ilen = 32,
9395 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
9396 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
9397 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
9398 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
9399 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
9400 .rlen = 40,
9401 }, {
9402 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
9403 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
9404 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
9405 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
9406 "\xf9\xd9\x4e",
9407 .klen = 35,
9408 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
9409 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
9410 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
9411 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
9412 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
9413 .alen = 32,
9414 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
9415 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
9416 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
9417 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
9418 .ilen = 32,
9419 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
9420 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
9421 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
9422 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
9423 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
9424 "\x7b\x72\x8a\xf7",
9425 .rlen = 44,
9426 }, {
9427 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
9428 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
9429 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
9430 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
9431 "\x24\xa7\x8b",
9432 .klen = 35,
9433 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
9434 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
9435 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
9436 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
9437 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
9438 .alen = 32,
9439 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
9440 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
9441 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
9442 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
9443 .ilen = 32,
9444 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
9445 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
9446 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
9447 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
9448 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
9449 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
9450 .rlen = 48,
9451 },
9452};
9453
9454static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
9455 {
9456 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
9457 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
9458 "\xc6\xfb\x7d",
9459 .klen = 19,
9460 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
9461 .alen = 0,
9462 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
9463 .ilen = 8,
9464 .result = "\x00",
9465 .rlen = 0,
9466 .novrfy = 1,
9467 }, {
9468 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
9469 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
9470 "\xaf\x94\x87",
9471 .klen = 19,
9472 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
9473 .alen = 0,
9474 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
9475 .ilen = 8,
9476 .result = "\x00",
9477 .rlen = 0,
9478 }, {
9479 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
9480 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
9481 "\xc6\xfb\x7d",
9482 .klen = 19,
9483 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
9484 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
9485 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
9486 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
9487 "\xd8\x94\x99\x91\x81\x54\x62\x57",
9488 .alen = 32,
9489 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
9490 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
9491 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
9492 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
9493 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
9494 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
9495 .ilen = 48,
9496 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
9497 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
9498 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
9499 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
9500 .rlen = 32,
9501 .novrfy = 1,
9502 }, {
9503 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
9504 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
9505 "\x05\xe0\xc9",
9506 .klen = 19,
9507 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
9508 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
9509 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
9510 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
9511 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
9512 .alen = 32,
9513 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
9514 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
9515 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
9516 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
9517 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
9518 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
9519 .ilen = 48,
9520 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
9521 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
9522 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
9523 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
9524 .rlen = 32,
9525 }, {
9526 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
9527 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
9528 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
9529 "\xee\x49\x83",
9530 .klen = 27,
9531 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
9532 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
9533 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
9534 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
9535 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
9536 .alen = 32,
9537 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
9538 .ilen = 8,
9539 .result = "\x00",
9540 .rlen = 0,
9541 }, {
9542 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
9543 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
9544 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
9545 "\xee\x49\x83",
9546 .klen = 27,
9547 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
9548 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
9549 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
9550 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
9551 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
9552 .alen = 32,
9553 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
9554 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
9555 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
9556 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
9557 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
9558 .ilen = 40,
9559 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
9560 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
9561 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
9562 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
9563 .rlen = 32,
9564 }, {
9565 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
9566 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
9567 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
9568 "\xd1\xfc\x57",
9569 .klen = 27,
9570 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
9571 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
9572 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
9573 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
9574 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
9575 .alen = 32,
9576 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
9577 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
9578 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
9579 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
9580 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
9581 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
9582 .ilen = 48,
9583 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
9584 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
9585 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
9586 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
9587 .rlen = 32,
9588 .novrfy = 1,
9589 }, {
9590 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
9591 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
9592 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
9593 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
9594 "\xee\x49\x83",
9595 .klen = 35,
9596 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
9597 .alen = 0,
9598 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
9599 .ilen = 8,
9600 .result = "\x00",
9601 .rlen = 0,
9602 }, {
9603 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
9604 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
9605 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
9606 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
9607 "\x85\x34\x66",
9608 .klen = 35,
9609 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
9610 .alen = 0,
9611 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
9612 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
9613 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
9614 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
9615 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
9616 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
9617 .ilen = 48,
9618 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
9619 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
9620 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
9621 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
9622 .rlen = 32,
9623 .novrfy = 1,
9624 }, {
9625 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
9626 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
9627 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
9628 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
9629 "\xcf\x76\x3f",
9630 .klen = 35,
9631 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
9632 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
9633 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
9634 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
9635 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
9636 .alen = 32,
9637 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
9638 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
9639 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
9640 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
9641 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
9642 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
9643 .ilen = 48,
9644 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
9645 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
9646 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
9647 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
9648 .rlen = 32,
9649 },
9650};
9651
Jarod Wilsone08ca2d2009-05-04 19:46:29 +08009652/*
9653 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
9654 * test vectors, taken from Appendix B.2.9 and B.2.10:
9655 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
9656 * Only AES-128 is supported at this time.
9657 */
9658#define ANSI_CPRNG_AES_TEST_VECTORS 6
9659
9660static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
9661 {
9662 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
9663 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
9664 .klen = 16,
9665 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
9666 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
9667 .dtlen = 16,
9668 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
9669 "\x00\x00\x00\x00\x00\x00\x00\x00",
9670 .vlen = 16,
9671 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
9672 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
9673 .rlen = 16,
9674 .loops = 1,
9675 }, {
9676 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
9677 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
9678 .klen = 16,
9679 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
9680 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
9681 .dtlen = 16,
9682 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
9683 "\x00\x00\x00\x00\x00\x00\x00\x00",
9684 .vlen = 16,
9685 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
9686 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
9687 .rlen = 16,
9688 .loops = 1,
9689 }, {
9690 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
9691 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
9692 .klen = 16,
9693 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
9694 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
9695 .dtlen = 16,
9696 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
9697 "\x00\x00\x00\x00\x00\x00\x00\x00",
9698 .vlen = 16,
9699 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
9700 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
9701 .rlen = 16,
9702 .loops = 1,
9703 }, {
9704 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
9705 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
9706 .klen = 16,
9707 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
9708 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
9709 .dtlen = 16,
9710 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
9711 "\x00\x00\x00\x00\x00\x00\x00\x00",
9712 .vlen = 16,
9713 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
9714 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
9715 .rlen = 16,
9716 .loops = 1,
9717 }, {
9718 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
9719 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
9720 .klen = 16,
9721 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
9722 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
9723 .dtlen = 16,
9724 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
9725 "\x00\x00\x00\x00\x00\x00\x00\x00",
9726 .vlen = 16,
9727 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
9728 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
9729 .rlen = 16,
9730 .loops = 1,
9731 }, { /* Monte Carlo Test */
9732 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
9733 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
9734 .klen = 16,
9735 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
9736 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
9737 .dtlen = 16,
9738 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
9739 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
9740 .vlen = 16,
9741 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
9742 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
9743 .rlen = 16,
9744 .loops = 10000,
9745 },
9746};
9747
Herbert Xuda7f0332008-07-31 17:08:25 +08009748/* Cast5 test vectors from RFC 2144 */
9749#define CAST5_ENC_TEST_VECTORS 3
9750#define CAST5_DEC_TEST_VECTORS 3
9751
9752static struct cipher_testvec cast5_enc_tv_template[] = {
9753 {
9754 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
9755 "\x23\x45\x67\x89\x34\x56\x78\x9a",
9756 .klen = 16,
9757 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9758 .ilen = 8,
9759 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
9760 .rlen = 8,
9761 }, {
9762 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
9763 "\x23\x45",
9764 .klen = 10,
9765 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9766 .ilen = 8,
9767 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
9768 .rlen = 8,
9769 }, {
9770 .key = "\x01\x23\x45\x67\x12",
9771 .klen = 5,
9772 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9773 .ilen = 8,
9774 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
9775 .rlen = 8,
9776 },
9777};
9778
9779static struct cipher_testvec cast5_dec_tv_template[] = {
9780 {
9781 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
9782 "\x23\x45\x67\x89\x34\x56\x78\x9a",
9783 .klen = 16,
9784 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
9785 .ilen = 8,
9786 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9787 .rlen = 8,
9788 }, {
9789 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
9790 "\x23\x45",
9791 .klen = 10,
9792 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
9793 .ilen = 8,
9794 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9795 .rlen = 8,
9796 }, {
9797 .key = "\x01\x23\x45\x67\x12",
9798 .klen = 5,
9799 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
9800 .ilen = 8,
9801 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9802 .rlen = 8,
9803 },
9804};
9805
9806/*
9807 * ARC4 test vectors from OpenSSL
9808 */
9809#define ARC4_ENC_TEST_VECTORS 7
9810#define ARC4_DEC_TEST_VECTORS 7
9811
9812static struct cipher_testvec arc4_enc_tv_template[] = {
9813 {
9814 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9815 .klen = 8,
9816 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9817 .ilen = 8,
9818 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
9819 .rlen = 8,
9820 }, {
9821 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9822 .klen = 8,
9823 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
9824 .ilen = 8,
9825 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
9826 .rlen = 8,
9827 }, {
9828 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
9829 .klen = 8,
9830 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
9831 .ilen = 8,
9832 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
9833 .rlen = 8,
9834 }, {
9835 .key = "\xef\x01\x23\x45",
9836 .klen = 4,
9837 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9838 "\x00\x00\x00\x00\x00\x00\x00\x00"
9839 "\x00\x00\x00\x00",
9840 .ilen = 20,
9841 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
9842 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
9843 "\x36\xb6\x78\x58",
9844 .rlen = 20,
9845 }, {
9846 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9847 .klen = 8,
9848 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9849 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9850 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9851 "\x12\x34\x56\x78",
9852 .ilen = 28,
9853 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
9854 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
9855 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
9856 "\x40\x01\x1e\xcf",
9857 .rlen = 28,
9858 }, {
9859 .key = "\xef\x01\x23\x45",
9860 .klen = 4,
9861 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9862 "\x00\x00",
9863 .ilen = 10,
9864 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
9865 "\xbd\x61",
9866 .rlen = 10,
9867 }, {
9868 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
9869 "\x00\x00\x00\x00\x00\x00\x00\x00",
9870 .klen = 16,
9871 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
9872 .ilen = 8,
9873 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
9874 .rlen = 8,
9875 },
9876};
9877
9878static struct cipher_testvec arc4_dec_tv_template[] = {
9879 {
9880 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9881 .klen = 8,
9882 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
9883 .ilen = 8,
9884 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9885 .rlen = 8,
9886 }, {
9887 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9888 .klen = 8,
9889 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
9890 .ilen = 8,
9891 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
9892 .rlen = 8,
9893 }, {
9894 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
9895 .klen = 8,
9896 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
9897 .ilen = 8,
9898 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
9899 .rlen = 8,
9900 }, {
9901 .key = "\xef\x01\x23\x45",
9902 .klen = 4,
9903 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
9904 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
9905 "\x36\xb6\x78\x58",
9906 .ilen = 20,
9907 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9908 "\x00\x00\x00\x00\x00\x00\x00\x00"
9909 "\x00\x00\x00\x00",
9910 .rlen = 20,
9911 }, {
9912 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
9913 .klen = 8,
9914 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
9915 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
9916 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
9917 "\x40\x01\x1e\xcf",
9918 .ilen = 28,
9919 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9920 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9921 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
9922 "\x12\x34\x56\x78",
9923 .rlen = 28,
9924 }, {
9925 .key = "\xef\x01\x23\x45",
9926 .klen = 4,
9927 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
9928 "\xbd\x61",
9929 .ilen = 10,
9930 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9931 "\x00\x00",
9932 .rlen = 10,
9933 }, {
9934 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
9935 "\x00\x00\x00\x00\x00\x00\x00\x00",
9936 .klen = 16,
9937 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
9938 .ilen = 8,
9939 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
9940 .rlen = 8,
9941 },
9942};
9943
9944/*
9945 * TEA test vectors
9946 */
9947#define TEA_ENC_TEST_VECTORS 4
9948#define TEA_DEC_TEST_VECTORS 4
9949
9950static struct cipher_testvec tea_enc_tv_template[] = {
9951 {
9952 .key = zeroed_string,
9953 .klen = 16,
9954 .input = zeroed_string,
9955 .ilen = 8,
9956 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
9957 .rlen = 8,
9958 }, {
9959 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
9960 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
9961 .klen = 16,
9962 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
9963 .ilen = 8,
9964 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
9965 .rlen = 8,
9966 }, {
9967 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
9968 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
9969 .klen = 16,
9970 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
9971 "\x65\x73\x74\x5f\x76\x65\x63\x74",
9972 .ilen = 16,
9973 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
9974 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
9975 .rlen = 16,
9976 }, {
9977 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
9978 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
9979 .klen = 16,
9980 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
9981 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
9982 "\x79\x6f\x75\x21\x21\x21\x20\x72"
9983 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
9984 .ilen = 32,
9985 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
9986 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
9987 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
9988 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
9989 .rlen = 32,
9990 }
9991};
9992
9993static struct cipher_testvec tea_dec_tv_template[] = {
9994 {
9995 .key = zeroed_string,
9996 .klen = 16,
9997 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
9998 .ilen = 8,
9999 .result = zeroed_string,
10000 .rlen = 8,
10001 }, {
10002 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10003 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10004 .klen = 16,
10005 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
10006 .ilen = 8,
10007 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10008 .rlen = 8,
10009 }, {
10010 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
10011 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10012 .klen = 16,
10013 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
10014 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
10015 .ilen = 16,
10016 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10017 "\x65\x73\x74\x5f\x76\x65\x63\x74",
10018 .rlen = 16,
10019 }, {
10020 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10021 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10022 .klen = 16,
10023 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
10024 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
10025 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
10026 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
10027 .ilen = 32,
10028 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
10029 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10030 "\x79\x6f\x75\x21\x21\x21\x20\x72"
10031 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10032 .rlen = 32,
10033 }
10034};
10035
10036/*
10037 * XTEA test vectors
10038 */
10039#define XTEA_ENC_TEST_VECTORS 4
10040#define XTEA_DEC_TEST_VECTORS 4
10041
10042static struct cipher_testvec xtea_enc_tv_template[] = {
10043 {
10044 .key = zeroed_string,
10045 .klen = 16,
10046 .input = zeroed_string,
10047 .ilen = 8,
10048 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
10049 .rlen = 8,
10050 }, {
10051 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10052 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10053 .klen = 16,
10054 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10055 .ilen = 8,
10056 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
10057 .rlen = 8,
10058 }, {
10059 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
10060 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10061 .klen = 16,
10062 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10063 "\x65\x73\x74\x5f\x76\x65\x63\x74",
10064 .ilen = 16,
10065 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
10066 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
10067 .rlen = 16,
10068 }, {
10069 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10070 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10071 .klen = 16,
10072 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
10073 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10074 "\x79\x6f\x75\x21\x21\x21\x20\x72"
10075 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10076 .ilen = 32,
10077 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
10078 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
10079 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
10080 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
10081 .rlen = 32,
10082 }
10083};
10084
10085static struct cipher_testvec xtea_dec_tv_template[] = {
10086 {
10087 .key = zeroed_string,
10088 .klen = 16,
10089 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
10090 .ilen = 8,
10091 .result = zeroed_string,
10092 .rlen = 8,
10093 }, {
10094 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10095 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10096 .klen = 16,
10097 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
10098 .ilen = 8,
10099 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10100 .rlen = 8,
10101 }, {
10102 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
10103 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10104 .klen = 16,
10105 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
10106 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
10107 .ilen = 16,
10108 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10109 "\x65\x73\x74\x5f\x76\x65\x63\x74",
10110 .rlen = 16,
10111 }, {
10112 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10113 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10114 .klen = 16,
10115 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
10116 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
10117 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
10118 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
10119 .ilen = 32,
10120 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
10121 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10122 "\x79\x6f\x75\x21\x21\x21\x20\x72"
10123 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10124 .rlen = 32,
10125 }
10126};
10127
10128/*
10129 * KHAZAD test vectors.
10130 */
10131#define KHAZAD_ENC_TEST_VECTORS 5
10132#define KHAZAD_DEC_TEST_VECTORS 5
10133
10134static struct cipher_testvec khazad_enc_tv_template[] = {
10135 {
10136 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10137 "\x00\x00\x00\x00\x00\x00\x00\x00",
10138 .klen = 16,
10139 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
10140 .ilen = 8,
10141 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
10142 .rlen = 8,
10143 }, {
10144 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
10145 "\x38\x38\x38\x38\x38\x38\x38\x38",
10146 .klen = 16,
10147 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
10148 .ilen = 8,
10149 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
10150 .rlen = 8,
10151 }, {
10152 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
10153 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10154 .klen = 16,
10155 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10156 .ilen = 8,
10157 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
10158 .rlen = 8,
10159 }, {
10160 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10161 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10162 .klen = 16,
10163 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10164 .ilen = 8,
10165 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10166 .rlen = 8,
10167 }, {
10168 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10169 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10170 .klen = 16,
10171 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10172 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10173 .ilen = 16,
10174 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
10175 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10176 .rlen = 16,
10177 },
10178};
10179
10180static struct cipher_testvec khazad_dec_tv_template[] = {
10181 {
10182 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
10183 "\x00\x00\x00\x00\x00\x00\x00\x00",
10184 .klen = 16,
10185 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
10186 .ilen = 8,
10187 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
10188 .rlen = 8,
10189 }, {
10190 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
10191 "\x38\x38\x38\x38\x38\x38\x38\x38",
10192 .klen = 16,
10193 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
10194 .ilen = 8,
10195 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
10196 .rlen = 8,
10197 }, {
10198 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
10199 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10200 .klen = 16,
10201 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
10202 .ilen = 8,
10203 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10204 .rlen = 8,
10205 }, {
10206 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10207 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10208 .klen = 16,
10209 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10210 .ilen = 8,
10211 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10212 .rlen = 8,
10213 }, {
10214 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10215 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10216 .klen = 16,
10217 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
10218 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10219 .ilen = 16,
10220 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10221 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10222 .rlen = 16,
10223 },
10224};
10225
10226/*
10227 * Anubis test vectors.
10228 */
10229
10230#define ANUBIS_ENC_TEST_VECTORS 5
10231#define ANUBIS_DEC_TEST_VECTORS 5
10232#define ANUBIS_CBC_ENC_TEST_VECTORS 2
10233#define ANUBIS_CBC_DEC_TEST_VECTORS 2
10234
10235static struct cipher_testvec anubis_enc_tv_template[] = {
10236 {
10237 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10238 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10239 .klen = 16,
10240 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10241 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10242 .ilen = 16,
10243 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10244 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
10245 .rlen = 16,
10246 }, {
10247
10248 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
10249 "\x03\x03\x03\x03\x03\x03\x03\x03"
10250 "\x03\x03\x03\x03",
10251 .klen = 20,
10252 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
10253 "\x03\x03\x03\x03\x03\x03\x03\x03",
10254 .ilen = 16,
10255 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
10256 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
10257 .rlen = 16,
10258 }, {
10259 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
10260 "\x24\x24\x24\x24\x24\x24\x24\x24"
10261 "\x24\x24\x24\x24\x24\x24\x24\x24"
10262 "\x24\x24\x24\x24",
10263 .klen = 28,
10264 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
10265 "\x24\x24\x24\x24\x24\x24\x24\x24",
10266 .ilen = 16,
10267 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
10268 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
10269 .rlen = 16,
10270 }, {
10271 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
10272 "\x25\x25\x25\x25\x25\x25\x25\x25"
10273 "\x25\x25\x25\x25\x25\x25\x25\x25"
10274 "\x25\x25\x25\x25\x25\x25\x25\x25",
10275 .klen = 32,
10276 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
10277 "\x25\x25\x25\x25\x25\x25\x25\x25",
10278 .ilen = 16,
10279 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
10280 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
10281 .rlen = 16,
10282 }, {
10283 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
10284 "\x35\x35\x35\x35\x35\x35\x35\x35"
10285 "\x35\x35\x35\x35\x35\x35\x35\x35"
10286 "\x35\x35\x35\x35\x35\x35\x35\x35"
10287 "\x35\x35\x35\x35\x35\x35\x35\x35",
10288 .klen = 40,
10289 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
10290 "\x35\x35\x35\x35\x35\x35\x35\x35",
10291 .ilen = 16,
10292 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
10293 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
10294 .rlen = 16,
10295 },
10296};
10297
10298static struct cipher_testvec anubis_dec_tv_template[] = {
10299 {
10300 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10301 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10302 .klen = 16,
10303 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10304 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
10305 .ilen = 16,
10306 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10307 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10308 .rlen = 16,
10309 }, {
10310
10311 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
10312 "\x03\x03\x03\x03\x03\x03\x03\x03"
10313 "\x03\x03\x03\x03",
10314 .klen = 20,
10315 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
10316 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
10317 .ilen = 16,
10318 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
10319 "\x03\x03\x03\x03\x03\x03\x03\x03",
10320 .rlen = 16,
10321 }, {
10322 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
10323 "\x24\x24\x24\x24\x24\x24\x24\x24"
10324 "\x24\x24\x24\x24\x24\x24\x24\x24"
10325 "\x24\x24\x24\x24",
10326 .klen = 28,
10327 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
10328 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
10329 .ilen = 16,
10330 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
10331 "\x24\x24\x24\x24\x24\x24\x24\x24",
10332 .rlen = 16,
10333 }, {
10334 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
10335 "\x25\x25\x25\x25\x25\x25\x25\x25"
10336 "\x25\x25\x25\x25\x25\x25\x25\x25"
10337 "\x25\x25\x25\x25\x25\x25\x25\x25",
10338 .klen = 32,
10339 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
10340 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
10341 .ilen = 16,
10342 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
10343 "\x25\x25\x25\x25\x25\x25\x25\x25",
10344 .rlen = 16,
10345 }, {
10346 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
10347 "\x35\x35\x35\x35\x35\x35\x35\x35"
10348 "\x35\x35\x35\x35\x35\x35\x35\x35"
10349 "\x35\x35\x35\x35\x35\x35\x35\x35"
10350 "\x35\x35\x35\x35\x35\x35\x35\x35",
10351 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
10352 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
10353 .klen = 40,
10354 .ilen = 16,
10355 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
10356 "\x35\x35\x35\x35\x35\x35\x35\x35",
10357 .rlen = 16,
10358 },
10359};
10360
10361static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
10362 {
10363 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10364 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10365 .klen = 16,
10366 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10367 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10368 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10369 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10370 .ilen = 32,
10371 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10372 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
10373 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
10374 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
10375 .rlen = 32,
10376 }, {
10377 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
10378 "\x35\x35\x35\x35\x35\x35\x35\x35"
10379 "\x35\x35\x35\x35\x35\x35\x35\x35"
10380 "\x35\x35\x35\x35\x35\x35\x35\x35"
10381 "\x35\x35\x35\x35\x35\x35\x35\x35",
10382 .klen = 40,
10383 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
10384 "\x35\x35\x35\x35\x35\x35\x35\x35"
10385 "\x35\x35\x35\x35\x35\x35\x35\x35"
10386 "\x35\x35\x35\x35\x35\x35\x35\x35",
10387 .ilen = 32,
10388 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
10389 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
10390 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
10391 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
10392 .rlen = 32,
10393 },
10394};
10395
10396static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
10397 {
10398 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10399 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10400 .klen = 16,
10401 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10402 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
10403 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
10404 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
10405 .ilen = 32,
10406 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10407 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10408 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10409 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10410 .rlen = 32,
10411 }, {
10412 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
10413 "\x35\x35\x35\x35\x35\x35\x35\x35"
10414 "\x35\x35\x35\x35\x35\x35\x35\x35"
10415 "\x35\x35\x35\x35\x35\x35\x35\x35"
10416 "\x35\x35\x35\x35\x35\x35\x35\x35",
10417 .klen = 40,
10418 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
10419 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
10420 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
10421 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
10422 .ilen = 32,
10423 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
10424 "\x35\x35\x35\x35\x35\x35\x35\x35"
10425 "\x35\x35\x35\x35\x35\x35\x35\x35"
10426 "\x35\x35\x35\x35\x35\x35\x35\x35",
10427 .rlen = 32,
10428 },
10429};
10430
10431/*
10432 * XETA test vectors
10433 */
10434#define XETA_ENC_TEST_VECTORS 4
10435#define XETA_DEC_TEST_VECTORS 4
10436
10437static struct cipher_testvec xeta_enc_tv_template[] = {
10438 {
10439 .key = zeroed_string,
10440 .klen = 16,
10441 .input = zeroed_string,
10442 .ilen = 8,
10443 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
10444 .rlen = 8,
10445 }, {
10446 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10447 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10448 .klen = 16,
10449 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10450 .ilen = 8,
10451 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
10452 .rlen = 8,
10453 }, {
10454 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
10455 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10456 .klen = 16,
10457 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10458 "\x65\x73\x74\x5f\x76\x65\x63\x74",
10459 .ilen = 16,
10460 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
10461 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
10462 .rlen = 16,
10463 }, {
10464 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10465 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10466 .klen = 16,
10467 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
10468 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10469 "\x79\x6f\x75\x21\x21\x21\x20\x72"
10470 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10471 .ilen = 32,
10472 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
10473 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
10474 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
10475 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
10476 .rlen = 32,
10477 }
10478};
10479
10480static struct cipher_testvec xeta_dec_tv_template[] = {
10481 {
10482 .key = zeroed_string,
10483 .klen = 16,
10484 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
10485 .ilen = 8,
10486 .result = zeroed_string,
10487 .rlen = 8,
10488 }, {
10489 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10490 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10491 .klen = 16,
10492 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
10493 .ilen = 8,
10494 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10495 .rlen = 8,
10496 }, {
10497 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
10498 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10499 .klen = 16,
10500 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
10501 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
10502 .ilen = 16,
10503 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10504 "\x65\x73\x74\x5f\x76\x65\x63\x74",
10505 .rlen = 16,
10506 }, {
10507 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10508 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10509 .klen = 16,
10510 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
10511 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
10512 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
10513 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
10514 .ilen = 32,
10515 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
10516 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10517 "\x79\x6f\x75\x21\x21\x21\x20\x72"
10518 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10519 .rlen = 32,
10520 }
10521};
10522
10523/*
10524 * FCrypt test vectors
10525 */
10526#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
10527#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
10528
10529static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
10530 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
10531 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
10532 .klen = 8,
10533 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10534 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
10535 .ilen = 8,
10536 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
10537 .rlen = 8,
10538 }, {
10539 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
10540 .klen = 8,
10541 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10542 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
10543 .ilen = 8,
10544 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
10545 .rlen = 8,
10546 }, { /* From Arla */
10547 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10548 .klen = 8,
10549 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10550 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
10551 .ilen = 48,
10552 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
10553 "\xee\xac\x98\x62\x44\x51\xe4\x84"
10554 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
10555 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
10556 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
10557 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
10558 .rlen = 48,
10559 }, {
10560 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10561 .klen = 8,
10562 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10563 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
10564 .ilen = 48,
10565 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
10566 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
10567 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
10568 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
10569 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
10570 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
10571 .rlen = 48,
10572 }, { /* split-page version */
10573 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10574 .klen = 8,
10575 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10576 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
10577 .ilen = 48,
10578 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
10579 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
10580 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
10581 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
10582 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
10583 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
10584 .rlen = 48,
10585 .np = 2,
10586 .tap = { 20, 28 },
10587 }
10588};
10589
10590static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
10591 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
10592 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
10593 .klen = 8,
10594 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10595 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
10596 .ilen = 8,
10597 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
10598 .rlen = 8,
10599 }, {
10600 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
10601 .klen = 8,
10602 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10603 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
10604 .ilen = 8,
10605 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
10606 .rlen = 8,
10607 }, { /* From Arla */
10608 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10609 .klen = 8,
10610 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10611 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
10612 "\xee\xac\x98\x62\x44\x51\xe4\x84"
10613 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
10614 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
10615 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
10616 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
10617 .ilen = 48,
10618 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
10619 .rlen = 48,
10620 }, {
10621 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10622 .klen = 8,
10623 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10624 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
10625 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
10626 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
10627 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
10628 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
10629 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
10630 .ilen = 48,
10631 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
10632 .rlen = 48,
10633 }, { /* split-page version */
10634 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10635 .klen = 8,
10636 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
10637 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
10638 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
10639 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
10640 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
10641 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
10642 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
10643 .ilen = 48,
10644 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
10645 .rlen = 48,
10646 .np = 2,
10647 .tap = { 20, 28 },
10648 }
10649};
10650
10651/*
10652 * CAMELLIA test vectors.
10653 */
10654#define CAMELLIA_ENC_TEST_VECTORS 3
10655#define CAMELLIA_DEC_TEST_VECTORS 3
10656#define CAMELLIA_CBC_ENC_TEST_VECTORS 2
10657#define CAMELLIA_CBC_DEC_TEST_VECTORS 2
10658
10659static struct cipher_testvec camellia_enc_tv_template[] = {
10660 {
10661 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10662 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10663 .klen = 16,
10664 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10665 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10666 .ilen = 16,
10667 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
10668 "\x08\x57\x06\x56\x48\xea\xbe\x43",
10669 .rlen = 16,
10670 }, {
10671 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10672 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
10673 "\x00\x11\x22\x33\x44\x55\x66\x77",
10674 .klen = 24,
10675 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10676 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10677 .ilen = 16,
10678 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
10679 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
10680 .rlen = 16,
10681 }, {
10682 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10683 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
10684 "\x00\x11\x22\x33\x44\x55\x66\x77"
10685 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10686 .klen = 32,
10687 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10688 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10689 .ilen = 16,
10690 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
10691 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
10692 .rlen = 16,
10693 },
10694};
10695
10696static struct cipher_testvec camellia_dec_tv_template[] = {
10697 {
10698 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10699 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10700 .klen = 16,
10701 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
10702 "\x08\x57\x06\x56\x48\xea\xbe\x43",
10703 .ilen = 16,
10704 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10705 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10706 .rlen = 16,
10707 }, {
10708 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10709 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
10710 "\x00\x11\x22\x33\x44\x55\x66\x77",
10711 .klen = 24,
10712 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
10713 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
10714 .ilen = 16,
10715 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10716 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10717 .rlen = 16,
10718 }, {
10719 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10720 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
10721 "\x00\x11\x22\x33\x44\x55\x66\x77"
10722 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10723 .klen = 32,
10724 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
10725 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
10726 .ilen = 16,
10727 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
10728 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
10729 .rlen = 16,
10730 },
10731};
10732
10733static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
10734 {
10735 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10736 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10737 .klen = 16,
10738 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10739 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10740 .input = "Single block msg",
10741 .ilen = 16,
10742 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
10743 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
10744 .rlen = 16,
10745 }, {
10746 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10747 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10748 .klen = 16,
10749 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10750 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10751 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10752 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10753 "\x10\x11\x12\x13\x14\x15\x16\x17"
10754 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10755 .ilen = 32,
10756 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
10757 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
10758 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
10759 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
10760 .rlen = 32,
10761 },
10762};
10763
10764static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
10765 {
10766 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10767 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10768 .klen = 16,
10769 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10770 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10771 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
10772 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
10773 .ilen = 16,
10774 .result = "Single block msg",
10775 .rlen = 16,
10776 }, {
10777 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10778 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10779 .klen = 16,
10780 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10781 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10782 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
10783 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
10784 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
10785 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
10786 .ilen = 32,
10787 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10788 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10789 "\x10\x11\x12\x13\x14\x15\x16\x17"
10790 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10791 .rlen = 32,
10792 },
10793};
10794
10795/*
10796 * SEED test vectors
10797 */
10798#define SEED_ENC_TEST_VECTORS 4
10799#define SEED_DEC_TEST_VECTORS 4
10800
10801static struct cipher_testvec seed_enc_tv_template[] = {
10802 {
10803 .key = zeroed_string,
10804 .klen = 16,
10805 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10806 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10807 .ilen = 16,
10808 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
10809 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
10810 .rlen = 16,
10811 }, {
10812 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10813 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10814 .klen = 16,
10815 .input = zeroed_string,
10816 .ilen = 16,
10817 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
10818 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
10819 .rlen = 16,
10820 }, {
10821 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
10822 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
10823 .klen = 16,
10824 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
10825 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
10826 .ilen = 16,
10827 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
10828 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
10829 .rlen = 16,
10830 }, {
10831 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
10832 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
10833 .klen = 16,
10834 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
10835 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
10836 .ilen = 16,
10837 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
10838 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
10839 .rlen = 16,
10840 }
10841};
10842
10843static struct cipher_testvec seed_dec_tv_template[] = {
10844 {
10845 .key = zeroed_string,
10846 .klen = 16,
10847 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
10848 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
10849 .ilen = 16,
10850 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10851 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10852 .rlen = 16,
10853 }, {
10854 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10855 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10856 .klen = 16,
10857 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
10858 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
10859 .ilen = 16,
10860 .result = zeroed_string,
10861 .rlen = 16,
10862 }, {
10863 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
10864 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
10865 .klen = 16,
10866 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
10867 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
10868 .ilen = 16,
10869 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
10870 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
10871 .rlen = 16,
10872 }, {
10873 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
10874 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
10875 .klen = 16,
10876 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
10877 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
10878 .ilen = 16,
10879 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
10880 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
10881 .rlen = 16,
10882 }
10883};
10884
10885#define SALSA20_STREAM_ENC_TEST_VECTORS 5
10886static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
10887 /*
10888 * Testvectors from verified.test-vectors submitted to ECRYPT.
10889 * They are truncated to size 39, 64, 111, 129 to test a variety
10890 * of input length.
10891 */
10892 { /* Set 3, vector 0 */
10893 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10894 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
10895 .klen = 16,
10896 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10897 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10898 "\x00\x00\x00\x00\x00\x00\x00\x00"
10899 "\x00\x00\x00\x00\x00\x00\x00\x00"
10900 "\x00\x00\x00\x00\x00\x00\x00\x00"
10901 "\x00\x00\x00\x00\x00\x00\x00",
10902 .ilen = 39,
10903 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
10904 "\x68\x02\x41\x0C\x68\x86\x88\x89"
10905 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
10906 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
10907 "\x58\x3F\x52\x79\x70\xEB\xC1",
10908 .rlen = 39,
10909 }, { /* Set 5, vector 0 */
10910 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10911 "\x00\x00\x00\x00\x00\x00\x00\x00",
10912 .klen = 16,
10913 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
10914 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10915 "\x00\x00\x00\x00\x00\x00\x00\x00"
10916 "\x00\x00\x00\x00\x00\x00\x00\x00"
10917 "\x00\x00\x00\x00\x00\x00\x00\x00"
10918 "\x00\x00\x00\x00\x00\x00\x00\x00"
10919 "\x00\x00\x00\x00\x00\x00\x00\x00"
10920 "\x00\x00\x00\x00\x00\x00\x00\x00"
10921 "\x00\x00\x00\x00\x00\x00\x00\x00",
10922 .ilen = 64,
10923 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
10924 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
10925 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
10926 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
10927 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
10928 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
10929 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
10930 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
10931 .rlen = 64,
10932 }, { /* Set 3, vector 27 */
10933 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
10934 "\x23\x24\x25\x26\x27\x28\x29\x2A"
10935 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
10936 "\x33\x34\x35\x36\x37\x38\x39\x3A",
10937 .klen = 32,
10938 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
10939 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10940 "\x00\x00\x00\x00\x00\x00\x00\x00"
10941 "\x00\x00\x00\x00\x00\x00\x00\x00"
10942 "\x00\x00\x00\x00\x00\x00\x00\x00"
10943 "\x00\x00\x00\x00\x00\x00\x00\x00"
10944 "\x00\x00\x00\x00\x00\x00\x00\x00"
10945 "\x00\x00\x00\x00\x00\x00\x00\x00"
10946 "\x00\x00\x00\x00\x00\x00\x00\x00"
10947 "\x00\x00\x00\x00\x00\x00\x00\x00"
10948 "\x00\x00\x00\x00\x00\x00\x00\x00"
10949 "\x00\x00\x00\x00\x00\x00\x00\x00"
10950 "\x00\x00\x00\x00\x00\x00\x00\x00"
10951 "\x00\x00\x00\x00\x00\x00\x00\x00"
10952 "\x00\x00\x00\x00\x00\x00\x00",
10953 .ilen = 111,
10954 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
10955 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
10956 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
10957 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
10958 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
10959 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
10960 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
10961 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
10962 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
10963 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
10964 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
10965 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
10966 "\x95\x46\x45\x54\xE9\x75\x03\x08"
10967 "\x44\xAF\xE5\x8A\x81\x12\x09",
10968 .rlen = 111,
10969 }, { /* Set 5, vector 27 */
10970 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10971 "\x00\x00\x00\x00\x00\x00\x00\x00"
10972 "\x00\x00\x00\x00\x00\x00\x00\x00"
10973 "\x00\x00\x00\x00\x00\x00\x00\x00",
10974 .klen = 32,
10975 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
10976 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10977 "\x00\x00\x00\x00\x00\x00\x00\x00"
10978 "\x00\x00\x00\x00\x00\x00\x00\x00"
10979 "\x00\x00\x00\x00\x00\x00\x00\x00"
10980 "\x00\x00\x00\x00\x00\x00\x00\x00"
10981 "\x00\x00\x00\x00\x00\x00\x00\x00"
10982 "\x00\x00\x00\x00\x00\x00\x00\x00"
10983 "\x00\x00\x00\x00\x00\x00\x00\x00"
10984 "\x00\x00\x00\x00\x00\x00\x00\x00"
10985 "\x00\x00\x00\x00\x00\x00\x00\x00"
10986 "\x00\x00\x00\x00\x00\x00\x00\x00"
10987 "\x00\x00\x00\x00\x00\x00\x00\x00"
10988 "\x00\x00\x00\x00\x00\x00\x00\x00"
10989 "\x00\x00\x00\x00\x00\x00\x00\x00"
10990 "\x00\x00\x00\x00\x00\x00\x00\x00"
10991 "\x00\x00\x00\x00\x00\x00\x00\x00"
10992 "\x00",
10993 .ilen = 129,
10994 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
10995 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
10996 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
10997 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
10998 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
10999 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
11000 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
11001 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
11002 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
11003 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
11004 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
11005 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
11006 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
11007 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
11008 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
11009 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
11010 "\x5A",
11011 .rlen = 129,
11012 }, { /* large test vector generated using Crypto++ */
11013 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
11014 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11015 "\x10\x11\x12\x13\x14\x15\x16\x17"
11016 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11017 .klen = 32,
11018 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11019 "\x00\x00\x00\x00\x00\x00\x00\x00",
11020 .input =
11021 "\x00\x01\x02\x03\x04\x05\x06\x07"
11022 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11023 "\x10\x11\x12\x13\x14\x15\x16\x17"
11024 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11025 "\x20\x21\x22\x23\x24\x25\x26\x27"
11026 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11027 "\x30\x31\x32\x33\x34\x35\x36\x37"
11028 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11029 "\x40\x41\x42\x43\x44\x45\x46\x47"
11030 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11031 "\x50\x51\x52\x53\x54\x55\x56\x57"
11032 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11033 "\x60\x61\x62\x63\x64\x65\x66\x67"
11034 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11035 "\x70\x71\x72\x73\x74\x75\x76\x77"
11036 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11037 "\x80\x81\x82\x83\x84\x85\x86\x87"
11038 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11039 "\x90\x91\x92\x93\x94\x95\x96\x97"
11040 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11041 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11042 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11043 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11044 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11045 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11046 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11047 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11048 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11049 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11050 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11051 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11052 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11053 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
11054 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
11055 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
11056 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
11057 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
11058 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
11059 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
11060 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
11061 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
11062 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
11063 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
11064 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
11065 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
11066 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
11067 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
11068 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
11069 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
11070 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
11071 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
11072 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
11073 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
11074 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
11075 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
11076 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
11077 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
11078 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
11079 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
11080 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
11081 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
11082 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
11083 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
11084 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
11085 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
11086 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
11087 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
11088 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
11089 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
11090 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
11091 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
11092 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
11093 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
11094 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
11095 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
11096 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
11097 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
11098 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
11099 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
11100 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
11101 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
11102 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
11103 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
11104 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
11105 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
11106 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
11107 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
11108 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
11109 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
11110 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
11111 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
11112 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
11113 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
11114 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
11115 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
11116 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
11117 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
11118 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
11119 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
11120 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
11121 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
11122 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
11123 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
11124 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
11125 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
11126 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
11127 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
11128 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
11129 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
11130 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
11131 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
11132 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
11133 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
11134 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
11135 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
11136 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
11137 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
11138 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
11139 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
11140 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
11141 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
11142 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
11143 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
11144 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
11145 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
11146 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
11147 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
11148 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
11149 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
11150 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
11151 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
11152 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
11153 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
11154 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
11155 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
11156 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
11157 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
11158 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
11159 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
11160 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
11161 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
11162 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
11163 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
11164 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
11165 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
11166 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
11167 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
11168 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
11169 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
11170 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
11171 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
11172 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
11173 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
11174 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
11175 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
11176 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
11177 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
11178 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
11179 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
11180 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
11181 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
11182 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
11183 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
11184 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
11185 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
11186 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
11187 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
11188 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
11189 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
11190 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
11191 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
11192 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
11193 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
11194 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
11195 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
11196 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
11197 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
11198 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
11199 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
11200 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
11201 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
11202 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
11203 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
11204 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
11205 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
11206 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
11207 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
11208 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
11209 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
11210 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
11211 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
11212 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
11213 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
11214 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
11215 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
11216 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
11217 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
11218 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
11219 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
11220 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
11221 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
11222 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
11223 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
11224 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
11225 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
11226 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
11227 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
11228 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
11229 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
11230 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
11231 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
11232 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
11233 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
11234 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
11235 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
11236 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
11237 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
11238 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
11239 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
11240 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
11241 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
11242 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
11243 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
11244 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
11245 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
11246 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
11247 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
11248 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
11249 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
11250 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
11251 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
11252 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
11253 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
11254 "\x38\x47\x56\x65\x74\x83\x92\xa1"
11255 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
11256 "\x28\x37\x46\x55\x64\x73\x82\x91"
11257 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
11258 "\x18\x27\x36\x45\x54\x63\x72\x81"
11259 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
11260 "\x08\x17\x26\x35\x44\x53\x62\x71"
11261 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
11262 "\xf8\x07\x16\x25\x34\x43\x52\x61"
11263 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
11264 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
11265 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
11266 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
11267 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
11268 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
11269 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
11270 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
11271 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
11272 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
11273 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
11274 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
11275 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
11276 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
11277 "\x00\x11\x22\x33\x44\x55\x66\x77"
11278 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
11279 "\x10\x21\x32\x43\x54\x65\x76\x87"
11280 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
11281 "\x20\x31\x42\x53\x64\x75\x86\x97"
11282 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
11283 "\x30\x41\x52\x63\x74\x85\x96\xa7"
11284 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
11285 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
11286 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
11287 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
11288 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
11289 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
11290 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
11291 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
11292 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
11293 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
11294 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
11295 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
11296 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
11297 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
11298 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
11299 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
11300 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
11301 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
11302 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
11303 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
11304 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
11305 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
11306 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
11307 "\xf0\x01\x12\x23\x34\x45\x56\x67"
11308 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
11309 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
11310 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
11311 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
11312 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
11313 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
11314 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
11315 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
11316 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
11317 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
11318 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
11319 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
11320 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
11321 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
11322 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
11323 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
11324 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
11325 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
11326 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
11327 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
11328 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
11329 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
11330 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
11331 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
11332 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
11333 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
11334 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
11335 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
11336 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
11337 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
11338 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
11339 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
11340 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
11341 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
11342 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
11343 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
11344 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
11345 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
11346 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
11347 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
11348 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
11349 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
11350 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
11351 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
11352 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
11353 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
11354 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
11355 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
11356 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
11357 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
11358 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
11359 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
11360 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
11361 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
11362 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
11363 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
11364 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
11365 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
11366 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
11367 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
11368 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
11369 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
11370 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
11371 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
11372 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
11373 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
11374 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
11375 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
11376 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
11377 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
11378 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
11379 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
11380 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
11381 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
11382 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
11383 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
11384 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
11385 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
11386 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
11387 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
11388 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
11389 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
11390 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
11391 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
11392 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
11393 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
11394 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
11395 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
11396 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
11397 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
11398 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
11399 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
11400 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
11401 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
11402 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
11403 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
11404 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
11405 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
11406 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
11407 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
11408 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
11409 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
11410 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
11411 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
11412 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
11413 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
11414 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
11415 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
11416 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
11417 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
11418 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
11419 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
11420 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
11421 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
11422 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
11423 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
11424 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
11425 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
11426 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
11427 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
11428 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
11429 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
11430 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
11431 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
11432 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
11433 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
11434 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
11435 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
11436 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
11437 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
11438 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
11439 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
11440 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
11441 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
11442 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
11443 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
11444 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
11445 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
11446 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
11447 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
11448 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
11449 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
11450 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
11451 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
11452 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
11453 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
11454 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
11455 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
11456 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
11457 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
11458 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
11459 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
11460 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
11461 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
11462 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
11463 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
11464 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
11465 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
11466 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
11467 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
11468 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
11469 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
11470 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
11471 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
11472 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
11473 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
11474 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
11475 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
11476 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
11477 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
11478 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
11479 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
11480 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
11481 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
11482 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
11483 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
11484 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
11485 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
11486 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
11487 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
11488 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
11489 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
11490 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
11491 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
11492 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
11493 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
11494 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
11495 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
11496 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
11497 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
11498 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
11499 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
11500 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
11501 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
11502 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
11503 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
11504 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
11505 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
11506 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
11507 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
11508 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
11509 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
11510 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
11511 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
11512 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
11513 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
11514 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
11515 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
11516 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
11517 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
11518 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
11519 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
11520 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
11521 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
11522 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
11523 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
11524 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
11525 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
11526 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
11527 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
11528 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
11529 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
11530 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
11531 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
11532 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
11533 "\x00\x21\x42\x63",
11534 .ilen = 4100,
11535 .result =
11536 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
11537 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
11538 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
11539 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
11540 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
11541 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
11542 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
11543 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
11544 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
11545 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
11546 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
11547 "\xbb\xde\x56\x86\xab\x65\x21\x30"
11548 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
11549 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
11550 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
11551 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
11552 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
11553 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
11554 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
11555 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
11556 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
11557 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
11558 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
11559 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
11560 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
11561 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
11562 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
11563 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
11564 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
11565 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
11566 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
11567 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
11568 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
11569 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
11570 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
11571 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
11572 "\x62\x08\x18\x7a\x25\x49\x28\xac"
11573 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
11574 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
11575 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
11576 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
11577 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
11578 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
11579 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
11580 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
11581 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
11582 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
11583 "\x33\xee\x14\x19\x22\x52\x89\xa7"
11584 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
11585 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
11586 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
11587 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
11588 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
11589 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
11590 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
11591 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
11592 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
11593 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
11594 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
11595 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
11596 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
11597 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
11598 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
11599 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
11600 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
11601 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
11602 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
11603 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
11604 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
11605 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
11606 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
11607 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
11608 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
11609 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
11610 "\x49\x97\x33\xab\x36\x14\x0a\x70"
11611 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
11612 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
11613 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
11614 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
11615 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
11616 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
11617 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
11618 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
11619 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
11620 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
11621 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
11622 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
11623 "\xad\x04\x07\xae\x22\x90\x4a\x93"
11624 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
11625 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
11626 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
11627 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
11628 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
11629 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
11630 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
11631 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
11632 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
11633 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
11634 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
11635 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
11636 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
11637 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
11638 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
11639 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
11640 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
11641 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
11642 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
11643 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
11644 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
11645 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
11646 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
11647 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
11648 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
11649 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
11650 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
11651 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
11652 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
11653 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
11654 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
11655 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
11656 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
11657 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
11658 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
11659 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
11660 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
11661 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
11662 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
11663 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
11664 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
11665 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
11666 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
11667 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
11668 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
11669 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
11670 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
11671 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
11672 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
11673 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
11674 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
11675 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
11676 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
11677 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
11678 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
11679 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
11680 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
11681 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
11682 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
11683 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
11684 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
11685 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
11686 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
11687 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
11688 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
11689 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
11690 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
11691 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
11692 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
11693 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
11694 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
11695 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
11696 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
11697 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
11698 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
11699 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
11700 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
11701 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
11702 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
11703 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
11704 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
11705 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
11706 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
11707 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
11708 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
11709 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
11710 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
11711 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
11712 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
11713 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
11714 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
11715 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
11716 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
11717 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
11718 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
11719 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
11720 "\x2e\x53\x49\x97\x94\x33\xae\x40"
11721 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
11722 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
11723 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
11724 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
11725 "\xce\x87\xad\xcc\x72\x05\x00\x29"
11726 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
11727 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
11728 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
11729 "\xac\xc0\x79\x50\x69\xca\x59\x32"
11730 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
11731 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
11732 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
11733 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
11734 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
11735 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
11736 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
11737 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
11738 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
11739 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
11740 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
11741 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
11742 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
11743 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
11744 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
11745 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
11746 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
11747 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
11748 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
11749 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
11750 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
11751 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
11752 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
11753 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
11754 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
11755 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
11756 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
11757 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
11758 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
11759 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
11760 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
11761 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
11762 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
11763 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
11764 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
11765 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
11766 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
11767 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
11768 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
11769 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
11770 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
11771 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
11772 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
11773 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
11774 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
11775 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
11776 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
11777 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
11778 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
11779 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
11780 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
11781 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
11782 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
11783 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
11784 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
11785 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
11786 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
11787 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
11788 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
11789 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
11790 "\x38\x55\xab\x33\x26\xef\x9f\x43"
11791 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
11792 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
11793 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
11794 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
11795 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
11796 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
11797 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
11798 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
11799 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
11800 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
11801 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
11802 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
11803 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
11804 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
11805 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
11806 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
11807 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
11808 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
11809 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
11810 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
11811 "\x62\x36\x43\xb2\x82\x15\x75\x50"
11812 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
11813 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
11814 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
11815 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
11816 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
11817 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
11818 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
11819 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
11820 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
11821 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
11822 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
11823 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
11824 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
11825 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
11826 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
11827 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
11828 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
11829 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
11830 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
11831 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
11832 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
11833 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
11834 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
11835 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
11836 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
11837 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
11838 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
11839 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
11840 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
11841 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
11842 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
11843 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
11844 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
11845 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
11846 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
11847 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
11848 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
11849 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
11850 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
11851 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
11852 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
11853 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
11854 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
11855 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
11856 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
11857 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
11858 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
11859 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
11860 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
11861 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
11862 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
11863 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
11864 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
11865 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
11866 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
11867 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
11868 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
11869 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
11870 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
11871 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
11872 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
11873 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
11874 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
11875 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
11876 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
11877 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
11878 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
11879 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
11880 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
11881 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
11882 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
11883 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
11884 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
11885 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
11886 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
11887 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
11888 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
11889 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
11890 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
11891 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
11892 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
11893 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
11894 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
11895 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
11896 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
11897 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
11898 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
11899 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
11900 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
11901 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
11902 "\x73\x2e\x71\x79\x16\x06\x63\x28"
11903 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
11904 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
11905 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
11906 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
11907 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
11908 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
11909 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
11910 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
11911 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
11912 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
11913 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
11914 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
11915 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
11916 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
11917 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
11918 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
11919 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
11920 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
11921 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
11922 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
11923 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
11924 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
11925 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
11926 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
11927 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
11928 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
11929 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
11930 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
11931 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
11932 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
11933 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
11934 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
11935 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
11936 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
11937 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
11938 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
11939 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
11940 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
11941 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
11942 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
11943 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
11944 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
11945 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
11946 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
11947 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
11948 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
11949 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
11950 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
11951 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
11952 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
11953 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
11954 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
11955 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
11956 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
11957 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
11958 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
11959 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
11960 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
11961 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
11962 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
11963 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
11964 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
11965 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
11966 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
11967 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
11968 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
11969 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
11970 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
11971 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
11972 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
11973 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
11974 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
11975 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
11976 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
11977 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
11978 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
11979 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
11980 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
11981 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
11982 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
11983 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
11984 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
11985 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
11986 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
11987 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
11988 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
11989 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
11990 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
11991 "\x85\x73\x78\x45\x20\x7f\xae\x13"
11992 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
11993 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
11994 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
11995 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
11996 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
11997 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
11998 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
11999 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
12000 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
12001 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
12002 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
12003 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
12004 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
12005 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
12006 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
12007 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
12008 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
12009 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
12010 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
12011 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
12012 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
12013 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
12014 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
12015 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
12016 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
12017 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
12018 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
12019 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
12020 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
12021 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
12022 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
12023 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
12024 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
12025 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
12026 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
12027 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
12028 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
12029 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
12030 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
12031 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
12032 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
12033 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
12034 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
12035 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
12036 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
12037 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
12038 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
12039 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
12040 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
12041 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
12042 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
12043 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
12044 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
12045 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
12046 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
12047 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
12048 "\xaf\xdf\x11\x95",
12049 .rlen = 4100,
12050 .np = 2,
12051 .tap = { 4064, 36 },
12052 },
12053};
12054
12055/*
12056 * CTS (Cipher Text Stealing) mode tests
12057 */
12058#define CTS_MODE_ENC_TEST_VECTORS 6
12059#define CTS_MODE_DEC_TEST_VECTORS 6
12060static struct cipher_testvec cts_mode_enc_tv_template[] = {
12061 { /* from rfc3962 */
12062 .klen = 16,
12063 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12064 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12065 .ilen = 17,
12066 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12067 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12068 "\x20",
12069 .rlen = 17,
12070 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
12071 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
12072 "\x97",
12073 }, {
12074 .klen = 16,
12075 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12076 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12077 .ilen = 31,
12078 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12079 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12080 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12081 "\x20\x47\x61\x75\x27\x73\x20",
12082 .rlen = 31,
12083 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
12084 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
12085 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12086 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
12087 }, {
12088 .klen = 16,
12089 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12090 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12091 .ilen = 32,
12092 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12093 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12094 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12095 "\x20\x47\x61\x75\x27\x73\x20\x43",
12096 .rlen = 32,
12097 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12098 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
12099 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12100 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
12101 }, {
12102 .klen = 16,
12103 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12104 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12105 .ilen = 47,
12106 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12107 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12108 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12109 "\x20\x47\x61\x75\x27\x73\x20\x43"
12110 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12111 "\x70\x6c\x65\x61\x73\x65\x2c",
12112 .rlen = 47,
12113 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12114 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12115 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
12116 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
12117 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12118 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
12119 }, {
12120 .klen = 16,
12121 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12122 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12123 .ilen = 48,
12124 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12125 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12126 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12127 "\x20\x47\x61\x75\x27\x73\x20\x43"
12128 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12129 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
12130 .rlen = 48,
12131 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12132 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12133 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
12134 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
12135 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12136 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
12137 }, {
12138 .klen = 16,
12139 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12140 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12141 .ilen = 64,
12142 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12143 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12144 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12145 "\x20\x47\x61\x75\x27\x73\x20\x43"
12146 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12147 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
12148 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
12149 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
12150 .rlen = 64,
12151 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12152 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12153 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12154 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
12155 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
12156 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
12157 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
12158 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
12159 }
12160};
12161
12162static struct cipher_testvec cts_mode_dec_tv_template[] = {
12163 { /* from rfc3962 */
12164 .klen = 16,
12165 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12166 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12167 .rlen = 17,
12168 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12169 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12170 "\x20",
12171 .ilen = 17,
12172 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
12173 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
12174 "\x97",
12175 }, {
12176 .klen = 16,
12177 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12178 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12179 .rlen = 31,
12180 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12181 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12182 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12183 "\x20\x47\x61\x75\x27\x73\x20",
12184 .ilen = 31,
12185 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
12186 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
12187 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12188 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
12189 }, {
12190 .klen = 16,
12191 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12192 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12193 .rlen = 32,
12194 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12195 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12196 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12197 "\x20\x47\x61\x75\x27\x73\x20\x43",
12198 .ilen = 32,
12199 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12200 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
12201 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12202 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
12203 }, {
12204 .klen = 16,
12205 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12206 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12207 .rlen = 47,
12208 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12209 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12210 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12211 "\x20\x47\x61\x75\x27\x73\x20\x43"
12212 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12213 "\x70\x6c\x65\x61\x73\x65\x2c",
12214 .ilen = 47,
12215 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12216 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12217 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
12218 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
12219 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12220 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
12221 }, {
12222 .klen = 16,
12223 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12224 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12225 .rlen = 48,
12226 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12227 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12228 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12229 "\x20\x47\x61\x75\x27\x73\x20\x43"
12230 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12231 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
12232 .ilen = 48,
12233 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12234 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12235 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
12236 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
12237 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12238 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
12239 }, {
12240 .klen = 16,
12241 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
12242 "\x74\x65\x72\x69\x79\x61\x6b\x69",
12243 .rlen = 64,
12244 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
12245 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
12246 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
12247 "\x20\x47\x61\x75\x27\x73\x20\x43"
12248 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
12249 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
12250 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
12251 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
12252 .ilen = 64,
12253 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
12254 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
12255 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
12256 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
12257 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
12258 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
12259 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
12260 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
12261 }
12262};
12263
12264/*
12265 * Compression stuff.
12266 */
12267#define COMP_BUF_SIZE 512
12268
12269struct comp_testvec {
12270 int inlen, outlen;
12271 char input[COMP_BUF_SIZE];
12272 char output[COMP_BUF_SIZE];
12273};
12274
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080012275struct pcomp_testvec {
12276 void *params;
12277 unsigned int paramsize;
12278 int inlen, outlen;
12279 char input[COMP_BUF_SIZE];
12280 char output[COMP_BUF_SIZE];
12281};
12282
Herbert Xuda7f0332008-07-31 17:08:25 +080012283/*
12284 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110012285 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080012286 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080012287
Herbert Xuda7f0332008-07-31 17:08:25 +080012288#define DEFLATE_COMP_TEST_VECTORS 2
12289#define DEFLATE_DECOMP_TEST_VECTORS 2
12290
12291static struct comp_testvec deflate_comp_tv_template[] = {
12292 {
12293 .inlen = 70,
12294 .outlen = 38,
12295 .input = "Join us now and share the software "
12296 "Join us now and share the software ",
12297 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
12298 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
12299 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
12300 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
12301 "\x71\xbc\x08\x2b\x01\x00",
12302 }, {
12303 .inlen = 191,
12304 .outlen = 122,
12305 .input = "This document describes a compression method based on the DEFLATE"
12306 "compression algorithm. This document defines the application of "
12307 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
12308 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
12309 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
12310 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
12311 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
12312 "\x68\x12\x51\xae\x76\x67\xd6\x27"
12313 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
12314 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
12315 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
12316 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
12317 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
12318 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
12319 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
12320 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
12321 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
12322 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
12323 "\xfa\x02",
12324 },
12325};
12326
12327static struct comp_testvec deflate_decomp_tv_template[] = {
12328 {
12329 .inlen = 122,
12330 .outlen = 191,
12331 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
12332 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
12333 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
12334 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
12335 "\x68\x12\x51\xae\x76\x67\xd6\x27"
12336 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
12337 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
12338 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
12339 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
12340 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
12341 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
12342 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
12343 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
12344 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
12345 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
12346 "\xfa\x02",
12347 .output = "This document describes a compression method based on the DEFLATE"
12348 "compression algorithm. This document defines the application of "
12349 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
12350 }, {
12351 .inlen = 38,
12352 .outlen = 70,
12353 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
12354 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
12355 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
12356 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
12357 "\x71\xbc\x08\x2b\x01\x00",
12358 .output = "Join us now and share the software "
12359 "Join us now and share the software ",
12360 },
12361};
12362
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080012363#define ZLIB_COMP_TEST_VECTORS 2
12364#define ZLIB_DECOMP_TEST_VECTORS 2
12365
12366static const struct {
12367 struct nlattr nla;
12368 int val;
12369} deflate_comp_params[] = {
12370 {
12371 .nla = {
12372 .nla_len = NLA_HDRLEN + sizeof(int),
12373 .nla_type = ZLIB_COMP_LEVEL,
12374 },
12375 .val = Z_DEFAULT_COMPRESSION,
12376 }, {
12377 .nla = {
12378 .nla_len = NLA_HDRLEN + sizeof(int),
12379 .nla_type = ZLIB_COMP_METHOD,
12380 },
12381 .val = Z_DEFLATED,
12382 }, {
12383 .nla = {
12384 .nla_len = NLA_HDRLEN + sizeof(int),
12385 .nla_type = ZLIB_COMP_WINDOWBITS,
12386 },
12387 .val = -11,
12388 }, {
12389 .nla = {
12390 .nla_len = NLA_HDRLEN + sizeof(int),
12391 .nla_type = ZLIB_COMP_MEMLEVEL,
12392 },
12393 .val = MAX_MEM_LEVEL,
12394 }, {
12395 .nla = {
12396 .nla_len = NLA_HDRLEN + sizeof(int),
12397 .nla_type = ZLIB_COMP_STRATEGY,
12398 },
12399 .val = Z_DEFAULT_STRATEGY,
12400 }
12401};
12402
12403static const struct {
12404 struct nlattr nla;
12405 int val;
12406} deflate_decomp_params[] = {
12407 {
12408 .nla = {
12409 .nla_len = NLA_HDRLEN + sizeof(int),
12410 .nla_type = ZLIB_DECOMP_WINDOWBITS,
12411 },
12412 .val = -11,
12413 }
12414};
12415
12416static struct pcomp_testvec zlib_comp_tv_template[] = {
12417 {
12418 .params = &deflate_comp_params,
12419 .paramsize = sizeof(deflate_comp_params),
12420 .inlen = 70,
12421 .outlen = 38,
12422 .input = "Join us now and share the software "
12423 "Join us now and share the software ",
12424 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
12425 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
12426 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
12427 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
12428 "\x71\xbc\x08\x2b\x01\x00",
12429 }, {
12430 .params = &deflate_comp_params,
12431 .paramsize = sizeof(deflate_comp_params),
12432 .inlen = 191,
12433 .outlen = 122,
12434 .input = "This document describes a compression method based on the DEFLATE"
12435 "compression algorithm. This document defines the application of "
12436 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
12437 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
12438 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
12439 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
12440 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
12441 "\x68\x12\x51\xae\x76\x67\xd6\x27"
12442 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
12443 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
12444 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
12445 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
12446 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
12447 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
12448 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
12449 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
12450 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
12451 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
12452 "\xfa\x02",
12453 },
12454};
12455
12456static struct pcomp_testvec zlib_decomp_tv_template[] = {
12457 {
12458 .params = &deflate_decomp_params,
12459 .paramsize = sizeof(deflate_decomp_params),
12460 .inlen = 122,
12461 .outlen = 191,
12462 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
12463 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
12464 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
12465 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
12466 "\x68\x12\x51\xae\x76\x67\xd6\x27"
12467 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
12468 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
12469 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
12470 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
12471 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
12472 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
12473 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
12474 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
12475 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
12476 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
12477 "\xfa\x02",
12478 .output = "This document describes a compression method based on the DEFLATE"
12479 "compression algorithm. This document defines the application of "
12480 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
12481 }, {
12482 .params = &deflate_decomp_params,
12483 .paramsize = sizeof(deflate_decomp_params),
12484 .inlen = 38,
12485 .outlen = 70,
12486 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
12487 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
12488 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
12489 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
12490 "\x71\xbc\x08\x2b\x01\x00",
12491 .output = "Join us now and share the software "
12492 "Join us now and share the software ",
12493 },
12494};
12495
Herbert Xuda7f0332008-07-31 17:08:25 +080012496/*
12497 * LZO test vectors (null-terminated strings).
12498 */
12499#define LZO_COMP_TEST_VECTORS 2
12500#define LZO_DECOMP_TEST_VECTORS 2
12501
12502static struct comp_testvec lzo_comp_tv_template[] = {
12503 {
12504 .inlen = 70,
12505 .outlen = 46,
12506 .input = "Join us now and share the software "
12507 "Join us now and share the software ",
12508 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
12509 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
12510 "\x64\x20\x73\x68\x61\x72\x65\x20"
12511 "\x74\x68\x65\x20\x73\x6f\x66\x74"
12512 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
12513 "\x3d\x88\x00\x11\x00\x00",
12514 }, {
12515 .inlen = 159,
12516 .outlen = 133,
12517 .input = "This document describes a compression method based on the LZO "
12518 "compression algorithm. This document defines the application of "
12519 "the LZO algorithm used in UBIFS.",
12520 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
12521 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
12522 "\x64\x65\x73\x63\x72\x69\x62\x65"
12523 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
12524 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
12525 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
12526 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
12527 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
12528 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
12529 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
12530 "\x68\x69\x73\x2a\x54\x01\x02\x66"
12531 "\x69\x6e\x65\x73\x94\x06\x05\x61"
12532 "\x70\x70\x6c\x69\x63\x61\x74\x76"
12533 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
12534 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
12535 "\x20\x69\x6e\x20\x55\x42\x49\x46"
12536 "\x53\x2e\x11\x00\x00",
12537 },
12538};
12539
12540static struct comp_testvec lzo_decomp_tv_template[] = {
12541 {
12542 .inlen = 133,
12543 .outlen = 159,
12544 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
12545 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
12546 "\x64\x65\x73\x63\x72\x69\x62\x65"
12547 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
12548 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
12549 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
12550 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
12551 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
12552 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
12553 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
12554 "\x68\x69\x73\x2a\x54\x01\x02\x66"
12555 "\x69\x6e\x65\x73\x94\x06\x05\x61"
12556 "\x70\x70\x6c\x69\x63\x61\x74\x76"
12557 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
12558 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
12559 "\x20\x69\x6e\x20\x55\x42\x49\x46"
12560 "\x53\x2e\x11\x00\x00",
12561 .output = "This document describes a compression method based on the LZO "
12562 "compression algorithm. This document defines the application of "
12563 "the LZO algorithm used in UBIFS.",
12564 }, {
12565 .inlen = 46,
12566 .outlen = 70,
12567 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
12568 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
12569 "\x64\x20\x73\x68\x61\x72\x65\x20"
12570 "\x74\x68\x65\x20\x73\x6f\x66\x74"
12571 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
12572 "\x3d\x88\x00\x11\x00\x00",
12573 .output = "Join us now and share the software "
12574 "Join us now and share the software ",
12575 },
12576};
12577
12578/*
12579 * Michael MIC test vectors from IEEE 802.11i
12580 */
12581#define MICHAEL_MIC_TEST_VECTORS 6
12582
12583static struct hash_testvec michael_mic_tv_template[] = {
12584 {
12585 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
12586 .ksize = 8,
12587 .plaintext = zeroed_string,
12588 .psize = 0,
12589 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
12590 },
12591 {
12592 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
12593 .ksize = 8,
12594 .plaintext = "M",
12595 .psize = 1,
12596 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
12597 },
12598 {
12599 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
12600 .ksize = 8,
12601 .plaintext = "Mi",
12602 .psize = 2,
12603 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
12604 },
12605 {
12606 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
12607 .ksize = 8,
12608 .plaintext = "Mic",
12609 .psize = 3,
12610 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
12611 },
12612 {
12613 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
12614 .ksize = 8,
12615 .plaintext = "Mich",
12616 .psize = 4,
12617 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
12618 },
12619 {
12620 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
12621 .ksize = 8,
12622 .plaintext = "Michael",
12623 .psize = 7,
12624 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
12625 }
12626};
12627
12628/*
12629 * CRC32C test vectors
12630 */
12631#define CRC32C_TEST_VECTORS 14
12632
12633static struct hash_testvec crc32c_tv_template[] = {
12634 {
12635 .psize = 0,
12636 .digest = "\x00\x00\x00\x00",
12637 },
12638 {
12639 .key = "\x87\xa9\xcb\xed",
12640 .ksize = 4,
12641 .psize = 0,
12642 .digest = "\x78\x56\x34\x12",
12643 },
12644 {
12645 .key = "\xff\xff\xff\xff",
12646 .ksize = 4,
12647 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
12648 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
12649 "\x11\x12\x13\x14\x15\x16\x17\x18"
12650 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
12651 "\x21\x22\x23\x24\x25\x26\x27\x28",
12652 .psize = 40,
12653 .digest = "\x7f\x15\x2c\x0e",
12654 },
12655 {
12656 .key = "\xff\xff\xff\xff",
12657 .ksize = 4,
12658 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
12659 "\x31\x32\x33\x34\x35\x36\x37\x38"
12660 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
12661 "\x41\x42\x43\x44\x45\x46\x47\x48"
12662 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
12663 .psize = 40,
12664 .digest = "\xf6\xeb\x80\xe9",
12665 },
12666 {
12667 .key = "\xff\xff\xff\xff",
12668 .ksize = 4,
12669 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
12670 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
12671 "\x61\x62\x63\x64\x65\x66\x67\x68"
12672 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
12673 "\x71\x72\x73\x74\x75\x76\x77\x78",
12674 .psize = 40,
12675 .digest = "\xed\xbd\x74\xde",
12676 },
12677 {
12678 .key = "\xff\xff\xff\xff",
12679 .ksize = 4,
12680 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
12681 "\x81\x82\x83\x84\x85\x86\x87\x88"
12682 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
12683 "\x91\x92\x93\x94\x95\x96\x97\x98"
12684 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
12685 .psize = 40,
12686 .digest = "\x62\xc8\x79\xd5",
12687 },
12688 {
12689 .key = "\xff\xff\xff\xff",
12690 .ksize = 4,
12691 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
12692 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
12693 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
12694 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
12695 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
12696 .psize = 40,
12697 .digest = "\xd0\x9a\x97\xba",
12698 },
12699 {
12700 .key = "\xff\xff\xff\xff",
12701 .ksize = 4,
12702 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
12703 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
12704 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
12705 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
12706 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
12707 .psize = 40,
12708 .digest = "\x13\xd9\x29\x2b",
12709 },
12710 {
12711 .key = "\x80\xea\xd3\xf1",
12712 .ksize = 4,
12713 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
12714 "\x31\x32\x33\x34\x35\x36\x37\x38"
12715 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
12716 "\x41\x42\x43\x44\x45\x46\x47\x48"
12717 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
12718 .psize = 40,
12719 .digest = "\x0c\xb5\xe2\xa2",
12720 },
12721 {
12722 .key = "\xf3\x4a\x1d\x5d",
12723 .ksize = 4,
12724 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
12725 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
12726 "\x61\x62\x63\x64\x65\x66\x67\x68"
12727 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
12728 "\x71\x72\x73\x74\x75\x76\x77\x78",
12729 .psize = 40,
12730 .digest = "\xd1\x7f\xfb\xa6",
12731 },
12732 {
12733 .key = "\x2e\x80\x04\x59",
12734 .ksize = 4,
12735 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
12736 "\x81\x82\x83\x84\x85\x86\x87\x88"
12737 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
12738 "\x91\x92\x93\x94\x95\x96\x97\x98"
12739 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
12740 .psize = 40,
12741 .digest = "\x59\x33\xe6\x7a",
12742 },
12743 {
12744 .key = "\xa6\xcc\x19\x85",
12745 .ksize = 4,
12746 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
12747 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
12748 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
12749 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
12750 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
12751 .psize = 40,
12752 .digest = "\xbe\x03\x01\xd2",
12753 },
12754 {
12755 .key = "\x41\xfc\xfe\x2d",
12756 .ksize = 4,
12757 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
12758 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
12759 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
12760 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
12761 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
12762 .psize = 40,
12763 .digest = "\x75\xd3\xc5\x24",
12764 },
12765 {
12766 .key = "\xff\xff\xff\xff",
12767 .ksize = 4,
12768 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
12769 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
12770 "\x11\x12\x13\x14\x15\x16\x17\x18"
12771 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
12772 "\x21\x22\x23\x24\x25\x26\x27\x28"
12773 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
12774 "\x31\x32\x33\x34\x35\x36\x37\x38"
12775 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
12776 "\x41\x42\x43\x44\x45\x46\x47\x48"
12777 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
12778 "\x51\x52\x53\x54\x55\x56\x57\x58"
12779 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
12780 "\x61\x62\x63\x64\x65\x66\x67\x68"
12781 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
12782 "\x71\x72\x73\x74\x75\x76\x77\x78"
12783 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
12784 "\x81\x82\x83\x84\x85\x86\x87\x88"
12785 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
12786 "\x91\x92\x93\x94\x95\x96\x97\x98"
12787 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
12788 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
12789 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
12790 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
12791 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
12792 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
12793 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
12794 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
12795 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
12796 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
12797 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
12798 .psize = 240,
12799 .digest = "\x75\xd3\xc5\x24",
12800 .np = 2,
12801 .tap = { 31, 209 }
12802 },
12803};
12804
12805#endif /* _CRYPTO_TESTMGR_H */