blob: e36cb6d57e7a0bb798f64bded03651b4954ac64a [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;
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030056 unsigned char also_non_np;
Herbert Xuda7f0332008-07-31 17:08:25 +080057 unsigned char fail;
58 unsigned char wk; /* weak key flag */
59 unsigned char klen;
60 unsigned short ilen;
61 unsigned short rlen;
62};
63
64struct aead_testvec {
65 char *key;
66 char *iv;
67 char *input;
68 char *assoc;
69 char *result;
70 unsigned char tap[MAX_TAP];
71 unsigned char atap[MAX_TAP];
72 int np;
73 int anp;
74 unsigned char fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080075 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080076 unsigned char wk; /* weak key flag */
77 unsigned char klen;
78 unsigned short ilen;
79 unsigned short alen;
80 unsigned short rlen;
81};
82
Jarod Wilson7647d6c2009-05-04 19:44:50 +080083struct cprng_testvec {
84 char *key;
85 char *dt;
86 char *v;
87 char *result;
88 unsigned char klen;
89 unsigned short dtlen;
90 unsigned short vlen;
91 unsigned short rlen;
92 unsigned short loops;
93};
94
Herbert Xuda7f0332008-07-31 17:08:25 +080095static char zeroed_string[48];
96
97/*
98 * MD4 test vectors from RFC1320
99 */
100#define MD4_TEST_VECTORS 7
101
102static struct hash_testvec md4_tv_template [] = {
103 {
104 .plaintext = "",
105 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
106 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
107 }, {
108 .plaintext = "a",
109 .psize = 1,
110 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
111 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
112 }, {
113 .plaintext = "abc",
114 .psize = 3,
115 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
116 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
117 }, {
118 .plaintext = "message digest",
119 .psize = 14,
120 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
121 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
122 }, {
123 .plaintext = "abcdefghijklmnopqrstuvwxyz",
124 .psize = 26,
125 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
126 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
127 .np = 2,
128 .tap = { 13, 13 },
129 }, {
130 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
131 .psize = 62,
132 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
133 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
134 }, {
135 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
136 "45678901234567890",
137 .psize = 80,
138 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
139 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
140 },
141};
142
143/*
144 * MD5 test vectors from RFC1321
145 */
146#define MD5_TEST_VECTORS 7
147
148static struct hash_testvec md5_tv_template[] = {
149 {
150 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
151 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
152 }, {
153 .plaintext = "a",
154 .psize = 1,
155 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
156 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
157 }, {
158 .plaintext = "abc",
159 .psize = 3,
160 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
161 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
162 }, {
163 .plaintext = "message digest",
164 .psize = 14,
165 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
166 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
167 }, {
168 .plaintext = "abcdefghijklmnopqrstuvwxyz",
169 .psize = 26,
170 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
171 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
172 .np = 2,
173 .tap = {13, 13}
174 }, {
175 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
176 .psize = 62,
177 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
178 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
179 }, {
180 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
181 "345678901234567890",
182 .psize = 80,
183 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
184 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
185 }
186
187};
188
189/*
190 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
191 */
192#define RMD128_TEST_VECTORS 10
193
194static struct hash_testvec rmd128_tv_template[] = {
195 {
196 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
197 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
198 }, {
199 .plaintext = "a",
200 .psize = 1,
201 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
202 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
203 }, {
204 .plaintext = "abc",
205 .psize = 3,
206 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
207 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
208 }, {
209 .plaintext = "message digest",
210 .psize = 14,
211 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
212 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
213 }, {
214 .plaintext = "abcdefghijklmnopqrstuvwxyz",
215 .psize = 26,
216 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
217 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
218 }, {
219 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
220 "fghijklmnopqrstuvwxyz0123456789",
221 .psize = 62,
222 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
223 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
224 }, {
225 .plaintext = "1234567890123456789012345678901234567890"
226 "1234567890123456789012345678901234567890",
227 .psize = 80,
228 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
229 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
230 }, {
231 .plaintext = "abcdbcdecdefdefgefghfghighij"
232 "hijkijkljklmklmnlmnomnopnopq",
233 .psize = 56,
234 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
235 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
236 .np = 2,
237 .tap = { 28, 28 },
238 }, {
239 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
240 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
241 "lmnopqrsmnopqrstnopqrstu",
242 .psize = 112,
243 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
244 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
245 }, {
246 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
247 .psize = 32,
248 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
249 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
250 }
251};
252
253/*
254 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
255 */
256#define RMD160_TEST_VECTORS 10
257
258static struct hash_testvec rmd160_tv_template[] = {
259 {
260 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
261 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
262 }, {
263 .plaintext = "a",
264 .psize = 1,
265 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
266 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
267 }, {
268 .plaintext = "abc",
269 .psize = 3,
270 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
271 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
272 }, {
273 .plaintext = "message digest",
274 .psize = 14,
275 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
276 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
277 }, {
278 .plaintext = "abcdefghijklmnopqrstuvwxyz",
279 .psize = 26,
280 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
281 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
282 }, {
283 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
284 "fghijklmnopqrstuvwxyz0123456789",
285 .psize = 62,
286 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
287 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
288 }, {
289 .plaintext = "1234567890123456789012345678901234567890"
290 "1234567890123456789012345678901234567890",
291 .psize = 80,
292 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
293 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
294 }, {
295 .plaintext = "abcdbcdecdefdefgefghfghighij"
296 "hijkijkljklmklmnlmnomnopnopq",
297 .psize = 56,
298 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
299 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
300 .np = 2,
301 .tap = { 28, 28 },
302 }, {
303 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
304 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
305 "lmnopqrsmnopqrstnopqrstu",
306 .psize = 112,
307 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
308 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
309 }, {
310 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
311 .psize = 32,
312 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
313 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
314 }
315};
316
317/*
318 * RIPEMD-256 test vectors
319 */
320#define RMD256_TEST_VECTORS 8
321
322static struct hash_testvec rmd256_tv_template[] = {
323 {
324 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
325 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
326 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
327 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
328 }, {
329 .plaintext = "a",
330 .psize = 1,
331 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
332 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
333 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
334 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
335 }, {
336 .plaintext = "abc",
337 .psize = 3,
338 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
339 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
340 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
341 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
342 }, {
343 .plaintext = "message digest",
344 .psize = 14,
345 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
346 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
347 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
348 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
349 }, {
350 .plaintext = "abcdefghijklmnopqrstuvwxyz",
351 .psize = 26,
352 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
353 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
354 "\x78\x96\x11\x8a\x51\x97\x96\x87"
355 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
356 }, {
357 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
358 "fghijklmnopqrstuvwxyz0123456789",
359 .psize = 62,
360 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
361 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
362 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
363 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
364 }, {
365 .plaintext = "1234567890123456789012345678901234567890"
366 "1234567890123456789012345678901234567890",
367 .psize = 80,
368 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
369 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
370 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
371 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
372 }, {
373 .plaintext = "abcdbcdecdefdefgefghfghighij"
374 "hijkijkljklmklmnlmnomnopnopq",
375 .psize = 56,
376 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
377 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
378 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
379 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
380 .np = 2,
381 .tap = { 28, 28 },
382 }
383};
384
385/*
386 * RIPEMD-320 test vectors
387 */
388#define RMD320_TEST_VECTORS 8
389
390static struct hash_testvec rmd320_tv_template[] = {
391 {
392 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
393 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
394 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
395 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
396 }, {
397 .plaintext = "a",
398 .psize = 1,
399 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
400 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
401 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
402 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
403 }, {
404 .plaintext = "abc",
405 .psize = 3,
406 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
407 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
408 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
409 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
410 }, {
411 .plaintext = "message digest",
412 .psize = 14,
413 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
414 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
415 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
416 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
417 }, {
418 .plaintext = "abcdefghijklmnopqrstuvwxyz",
419 .psize = 26,
420 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
421 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
422 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
423 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
424 }, {
425 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
426 "fghijklmnopqrstuvwxyz0123456789",
427 .psize = 62,
428 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
429 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
430 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
431 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
432 }, {
433 .plaintext = "1234567890123456789012345678901234567890"
434 "1234567890123456789012345678901234567890",
435 .psize = 80,
436 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
437 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
438 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
439 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
440 }, {
441 .plaintext = "abcdbcdecdefdefgefghfghighij"
442 "hijkijkljklmklmnlmnomnopnopq",
443 .psize = 56,
444 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
445 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
446 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
447 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
448 .np = 2,
449 .tap = { 28, 28 },
450 }
451};
452
453/*
454 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100455 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800456 */
Herbert Xubd1f2992011-02-17 14:24:45 +1100457#define SHA1_TEST_VECTORS 3
Herbert Xuda7f0332008-07-31 17:08:25 +0800458
459static struct hash_testvec sha1_tv_template[] = {
460 {
461 .plaintext = "abc",
462 .psize = 3,
463 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
464 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
465 }, {
466 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
467 .psize = 56,
468 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
469 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
470 .np = 2,
471 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100472 }, {
473 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
474 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
475 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
476 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
477 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
478 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
479 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
480 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
481 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
482 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
483 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
484 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
485 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
486 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
487 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
488 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
489 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
490 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
491 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
492 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
493 "\x5a\x90\x11",
494 .psize = 163,
495 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
496 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
497 .np = 4,
498 .tap = { 63, 64, 31, 5 }
Herbert Xuda7f0332008-07-31 17:08:25 +0800499 }
500};
501
502
503/*
504 * SHA224 test vectors from from FIPS PUB 180-2
505 */
506#define SHA224_TEST_VECTORS 2
507
508static struct hash_testvec sha224_tv_template[] = {
509 {
510 .plaintext = "abc",
511 .psize = 3,
512 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
513 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
514 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
515 "\xE3\x6C\x9D\xA7",
516 }, {
517 .plaintext =
518 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
519 .psize = 56,
520 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
521 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
522 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
523 "\x52\x52\x25\x25",
524 .np = 2,
525 .tap = { 28, 28 }
526 }
527};
528
529/*
530 * SHA256 test vectors from from NIST
531 */
532#define SHA256_TEST_VECTORS 2
533
534static struct hash_testvec sha256_tv_template[] = {
535 {
536 .plaintext = "abc",
537 .psize = 3,
538 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
539 "\x41\x41\x40\xde\x5d\xae\x22\x23"
540 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
541 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
542 }, {
543 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
544 .psize = 56,
545 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
546 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
547 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
548 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
549 .np = 2,
550 .tap = { 28, 28 }
551 },
552};
553
554/*
555 * SHA384 test vectors from from NIST and kerneli
556 */
557#define SHA384_TEST_VECTORS 4
558
559static struct hash_testvec sha384_tv_template[] = {
560 {
561 .plaintext= "abc",
562 .psize = 3,
563 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
564 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
565 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
566 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
567 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
568 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
569 }, {
570 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
571 .psize = 56,
572 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
573 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
574 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
575 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
576 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
577 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
578 }, {
579 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
580 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
581 .psize = 112,
582 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
583 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
584 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
585 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
586 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
587 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
588 }, {
589 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
590 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
591 .psize = 104,
592 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
593 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
594 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
595 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
596 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
597 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
598 .np = 4,
599 .tap = { 26, 26, 26, 26 }
600 },
601};
602
603/*
604 * SHA512 test vectors from from NIST and kerneli
605 */
606#define SHA512_TEST_VECTORS 4
607
608static struct hash_testvec sha512_tv_template[] = {
609 {
610 .plaintext = "abc",
611 .psize = 3,
612 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
613 "\xcc\x41\x73\x49\xae\x20\x41\x31"
614 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
615 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
616 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
617 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
618 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
619 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
620 }, {
621 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
622 .psize = 56,
623 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
624 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
625 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
626 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
627 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
628 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
629 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
630 "\x54\xec\x63\x12\x38\xca\x34\x45",
631 }, {
632 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
633 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
634 .psize = 112,
635 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
636 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
637 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
638 "\x72\x99\xae\xad\xb6\x88\x90\x18"
639 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
640 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
641 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
642 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
643 }, {
644 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
645 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
646 .psize = 104,
647 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
648 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
649 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
650 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
651 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
652 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
653 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
654 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
655 .np = 4,
656 .tap = { 26, 26, 26, 26 }
657 },
658};
659
660
661/*
662 * WHIRLPOOL test vectors from Whirlpool package
663 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
664 * submission
665 */
666#define WP512_TEST_VECTORS 8
667
668static struct hash_testvec wp512_tv_template[] = {
669 {
670 .plaintext = "",
671 .psize = 0,
672 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
673 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
674 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
675 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
676 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
677 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
678 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
679 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
680
681
682 }, {
683 .plaintext = "a",
684 .psize = 1,
685 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
686 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
687 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
688 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
689 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
690 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
691 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
692 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
693 }, {
694 .plaintext = "abc",
695 .psize = 3,
696 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
697 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
698 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
699 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
700 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
701 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
702 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
703 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
704 }, {
705 .plaintext = "message digest",
706 .psize = 14,
707 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
708 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
709 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
710 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
711 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
712 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
713 "\x92\xED\x92\x00\x52\x83\x8F\x33"
714 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
715 }, {
716 .plaintext = "abcdefghijklmnopqrstuvwxyz",
717 .psize = 26,
718 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
719 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
720 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
721 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
722 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
723 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
724 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
725 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
726 }, {
727 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
728 "abcdefghijklmnopqrstuvwxyz0123456789",
729 .psize = 62,
730 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
731 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
732 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
733 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
734 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
735 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
736 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
737 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
738 }, {
739 .plaintext = "1234567890123456789012345678901234567890"
740 "1234567890123456789012345678901234567890",
741 .psize = 80,
742 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
743 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
744 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
745 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
746 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
747 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
748 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
749 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
750 }, {
751 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
752 .psize = 32,
753 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
754 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
755 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
756 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
757 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
758 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
759 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
760 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
761 },
762};
763
764#define WP384_TEST_VECTORS 8
765
766static struct hash_testvec wp384_tv_template[] = {
767 {
768 .plaintext = "",
769 .psize = 0,
770 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
771 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
772 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
773 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
774 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
775 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
776
777
778 }, {
779 .plaintext = "a",
780 .psize = 1,
781 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
782 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
783 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
784 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
785 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
786 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
787 }, {
788 .plaintext = "abc",
789 .psize = 3,
790 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
791 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
792 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
793 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
794 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
795 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
796 }, {
797 .plaintext = "message digest",
798 .psize = 14,
799 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
800 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
801 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
802 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
803 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
804 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
805 }, {
806 .plaintext = "abcdefghijklmnopqrstuvwxyz",
807 .psize = 26,
808 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
809 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
810 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
811 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
812 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
813 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
814 }, {
815 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
816 "abcdefghijklmnopqrstuvwxyz0123456789",
817 .psize = 62,
818 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
819 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
820 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
821 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
822 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
823 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
824 }, {
825 .plaintext = "1234567890123456789012345678901234567890"
826 "1234567890123456789012345678901234567890",
827 .psize = 80,
828 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
829 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
830 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
831 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
832 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
833 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
834 }, {
835 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
836 .psize = 32,
837 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
838 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
839 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
840 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
841 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
842 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
843 },
844};
845
846#define WP256_TEST_VECTORS 8
847
848static struct hash_testvec wp256_tv_template[] = {
849 {
850 .plaintext = "",
851 .psize = 0,
852 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
853 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
854 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
855 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
856
857
858 }, {
859 .plaintext = "a",
860 .psize = 1,
861 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
862 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
863 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
864 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
865 }, {
866 .plaintext = "abc",
867 .psize = 3,
868 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
869 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
870 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
871 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
872 }, {
873 .plaintext = "message digest",
874 .psize = 14,
875 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
876 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
877 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
878 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
879 }, {
880 .plaintext = "abcdefghijklmnopqrstuvwxyz",
881 .psize = 26,
882 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
883 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
884 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
885 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
886 }, {
887 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
888 "abcdefghijklmnopqrstuvwxyz0123456789",
889 .psize = 62,
890 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
891 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
892 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
893 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
894 }, {
895 .plaintext = "1234567890123456789012345678901234567890"
896 "1234567890123456789012345678901234567890",
897 .psize = 80,
898 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
899 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
900 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
901 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
902 }, {
903 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
904 .psize = 32,
905 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
906 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
907 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
908 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
909 },
910};
911
912/*
913 * TIGER test vectors from Tiger website
914 */
915#define TGR192_TEST_VECTORS 6
916
917static struct hash_testvec tgr192_tv_template[] = {
918 {
919 .plaintext = "",
920 .psize = 0,
921 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
922 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
923 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
924 }, {
925 .plaintext = "abc",
926 .psize = 3,
927 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
928 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
929 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
930 }, {
931 .plaintext = "Tiger",
932 .psize = 5,
933 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
934 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
935 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
936 }, {
937 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
938 .psize = 64,
939 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
940 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
941 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
942 }, {
943 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
944 .psize = 64,
945 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
946 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
947 "\x57\x89\x65\x65\x97\x5f\x91\x97",
948 }, {
949 .plaintext = "Tiger - A Fast New Hash Function, "
950 "by Ross Anderson and Eli Biham, "
951 "proceedings of Fast Software Encryption 3, "
952 "Cambridge, 1996.",
953 .psize = 125,
954 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
955 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
956 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
957 },
958};
959
960#define TGR160_TEST_VECTORS 6
961
962static struct hash_testvec tgr160_tv_template[] = {
963 {
964 .plaintext = "",
965 .psize = 0,
966 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
967 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
968 "\xf3\x73\xde\x2d",
969 }, {
970 .plaintext = "abc",
971 .psize = 3,
972 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
973 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
974 "\x93\x5f\x7b\x95",
975 }, {
976 .plaintext = "Tiger",
977 .psize = 5,
978 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
979 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
980 "\x37\x79\x0c\x11",
981 }, {
982 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
983 .psize = 64,
984 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
985 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
986 "\xb5\x86\x44\x50",
987 }, {
988 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
989 .psize = 64,
990 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
991 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
992 "\x57\x89\x65\x65",
993 }, {
994 .plaintext = "Tiger - A Fast New Hash Function, "
995 "by Ross Anderson and Eli Biham, "
996 "proceedings of Fast Software Encryption 3, "
997 "Cambridge, 1996.",
998 .psize = 125,
999 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1000 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1001 "\xdd\x68\x15\x1d",
1002 },
1003};
1004
1005#define TGR128_TEST_VECTORS 6
1006
1007static struct hash_testvec tgr128_tv_template[] = {
1008 {
1009 .plaintext = "",
1010 .psize = 0,
1011 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1012 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1013 }, {
1014 .plaintext = "abc",
1015 .psize = 3,
1016 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1017 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1018 }, {
1019 .plaintext = "Tiger",
1020 .psize = 5,
1021 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1022 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1023 }, {
1024 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1025 .psize = 64,
1026 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1027 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1028 }, {
1029 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1030 .psize = 64,
1031 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1032 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1033 }, {
1034 .plaintext = "Tiger - A Fast New Hash Function, "
1035 "by Ross Anderson and Eli Biham, "
1036 "proceedings of Fast Software Encryption 3, "
1037 "Cambridge, 1996.",
1038 .psize = 125,
1039 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1040 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1041 },
1042};
1043
Youquan, Song507069c2009-11-23 20:23:04 +08001044#define GHASH_TEST_VECTORS 1
1045
1046static struct hash_testvec ghash_tv_template[] =
1047{
1048 {
1049
1050 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1051 .ksize = 16,
1052 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1053 .psize = 16,
1054 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1055 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1056 },
1057};
1058
Herbert Xuda7f0332008-07-31 17:08:25 +08001059/*
1060 * HMAC-MD5 test vectors from RFC2202
1061 * (These need to be fixed to not use strlen).
1062 */
1063#define HMAC_MD5_TEST_VECTORS 7
1064
1065static struct hash_testvec hmac_md5_tv_template[] =
1066{
1067 {
1068 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1069 .ksize = 16,
1070 .plaintext = "Hi There",
1071 .psize = 8,
1072 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1073 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1074 }, {
1075 .key = "Jefe",
1076 .ksize = 4,
1077 .plaintext = "what do ya want for nothing?",
1078 .psize = 28,
1079 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1080 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1081 .np = 2,
1082 .tap = {14, 14}
1083 }, {
1084 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1085 .ksize = 16,
1086 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1087 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1088 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1089 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1090 .psize = 50,
1091 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1092 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1093 }, {
1094 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1095 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1096 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1097 .ksize = 25,
1098 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1099 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1100 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1101 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1102 .psize = 50,
1103 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1104 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1105 }, {
1106 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1107 .ksize = 16,
1108 .plaintext = "Test With Truncation",
1109 .psize = 20,
1110 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1111 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1112 }, {
1113 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1114 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1115 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1116 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1117 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1118 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1119 "\xaa\xaa",
1120 .ksize = 80,
1121 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1122 .psize = 54,
1123 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1124 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1125 }, {
1126 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1127 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1128 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1129 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1130 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1131 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1132 "\xaa\xaa",
1133 .ksize = 80,
1134 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1135 "Block-Size Data",
1136 .psize = 73,
1137 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1138 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1139 },
1140};
1141
1142/*
1143 * HMAC-RIPEMD128 test vectors from RFC2286
1144 */
1145#define HMAC_RMD128_TEST_VECTORS 7
1146
1147static struct hash_testvec hmac_rmd128_tv_template[] = {
1148 {
1149 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1150 .ksize = 16,
1151 .plaintext = "Hi There",
1152 .psize = 8,
1153 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1154 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1155 }, {
1156 .key = "Jefe",
1157 .ksize = 4,
1158 .plaintext = "what do ya want for nothing?",
1159 .psize = 28,
1160 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1161 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1162 .np = 2,
1163 .tap = { 14, 14 },
1164 }, {
1165 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1166 .ksize = 16,
1167 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1168 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1169 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1170 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1171 .psize = 50,
1172 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1173 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1174 }, {
1175 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1176 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1177 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1178 .ksize = 25,
1179 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1180 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1181 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1182 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1183 .psize = 50,
1184 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1185 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1186 }, {
1187 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1188 .ksize = 16,
1189 .plaintext = "Test With Truncation",
1190 .psize = 20,
1191 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1192 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1193 }, {
1194 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1195 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1196 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1197 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1198 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1199 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1200 "\xaa\xaa",
1201 .ksize = 80,
1202 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1203 .psize = 54,
1204 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1205 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1206 }, {
1207 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1208 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1209 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1210 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1211 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1212 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1213 "\xaa\xaa",
1214 .ksize = 80,
1215 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1216 "Block-Size Data",
1217 .psize = 73,
1218 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1219 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1220 },
1221};
1222
1223/*
1224 * HMAC-RIPEMD160 test vectors from RFC2286
1225 */
1226#define HMAC_RMD160_TEST_VECTORS 7
1227
1228static struct hash_testvec hmac_rmd160_tv_template[] = {
1229 {
1230 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1231 .ksize = 20,
1232 .plaintext = "Hi There",
1233 .psize = 8,
1234 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1235 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1236 }, {
1237 .key = "Jefe",
1238 .ksize = 4,
1239 .plaintext = "what do ya want for nothing?",
1240 .psize = 28,
1241 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1242 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1243 .np = 2,
1244 .tap = { 14, 14 },
1245 }, {
1246 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1247 .ksize = 20,
1248 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1249 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1250 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1251 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1252 .psize = 50,
1253 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1254 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1255 }, {
1256 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1257 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1258 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1259 .ksize = 25,
1260 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1261 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1262 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1263 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1264 .psize = 50,
1265 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1266 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1267 }, {
1268 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1269 .ksize = 20,
1270 .plaintext = "Test With Truncation",
1271 .psize = 20,
1272 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1273 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1274 }, {
1275 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1276 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1277 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1278 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1279 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1280 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1281 "\xaa\xaa",
1282 .ksize = 80,
1283 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1284 .psize = 54,
1285 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1286 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1287 }, {
1288 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1289 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1290 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1291 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1292 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1293 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1294 "\xaa\xaa",
1295 .ksize = 80,
1296 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1297 "Block-Size Data",
1298 .psize = 73,
1299 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1300 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1301 },
1302};
1303
1304/*
1305 * HMAC-SHA1 test vectors from RFC2202
1306 */
1307#define HMAC_SHA1_TEST_VECTORS 7
1308
1309static struct hash_testvec hmac_sha1_tv_template[] = {
1310 {
1311 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1312 .ksize = 20,
1313 .plaintext = "Hi There",
1314 .psize = 8,
1315 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1316 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1317 "\x46\xbe",
1318 }, {
1319 .key = "Jefe",
1320 .ksize = 4,
1321 .plaintext = "what do ya want for nothing?",
1322 .psize = 28,
1323 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1324 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1325 .np = 2,
1326 .tap = { 14, 14 }
1327 }, {
1328 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1329 .ksize = 20,
1330 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1331 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1332 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1333 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1334 .psize = 50,
1335 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1336 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1337 }, {
1338 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1339 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1340 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1341 .ksize = 25,
1342 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1343 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1344 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1345 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1346 .psize = 50,
1347 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1348 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1349 }, {
1350 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1351 .ksize = 20,
1352 .plaintext = "Test With Truncation",
1353 .psize = 20,
1354 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1355 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1356 }, {
1357 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1358 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1359 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1360 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1361 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1362 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1363 "\xaa\xaa",
1364 .ksize = 80,
1365 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1366 .psize = 54,
1367 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1368 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1369 }, {
1370 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1371 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1372 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1373 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1374 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1375 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1376 "\xaa\xaa",
1377 .ksize = 80,
1378 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1379 "Block-Size Data",
1380 .psize = 73,
1381 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1382 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1383 },
1384};
1385
1386
1387/*
1388 * SHA224 HMAC test vectors from RFC4231
1389 */
1390#define HMAC_SHA224_TEST_VECTORS 4
1391
1392static struct hash_testvec hmac_sha224_tv_template[] = {
1393 {
1394 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1395 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1396 "\x0b\x0b\x0b\x0b",
1397 .ksize = 20,
1398 /* ("Hi There") */
1399 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1400 .psize = 8,
1401 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1402 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1403 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1404 "\x53\x68\x4b\x22",
1405 }, {
1406 .key = "Jefe",
1407 .ksize = 4,
1408 /* ("what do ya want for nothing?") */
1409 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1410 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1411 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1412 "\x69\x6e\x67\x3f",
1413 .psize = 28,
1414 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1415 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1416 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1417 "\x8f\xd0\x5e\x44",
1418 .np = 4,
1419 .tap = { 7, 7, 7, 7 }
1420 }, {
1421 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1422 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1423 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1424 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1425 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1426 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1427 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1428 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1429 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1430 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1431 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1432 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1433 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1434 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1435 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1436 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1437 "\xaa\xaa\xaa",
1438 .ksize = 131,
1439 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
1440 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1441 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1442 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1443 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1444 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1445 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1446 "\x20\x46\x69\x72\x73\x74",
1447 .psize = 54,
1448 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1449 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1450 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1451 "\x3f\xa6\x87\x0e",
1452 }, {
1453 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1454 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1455 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1456 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1457 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1460 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1461 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1462 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1463 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1464 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1465 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1466 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1467 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1468 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1469 "\xaa\xaa\xaa",
1470 .ksize = 131,
1471 /* ("This is a test using a larger than block-size key and a")
1472 (" larger than block-size data. The key needs to be")
1473 (" hashed before being used by the HMAC algorithm.") */
1474 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1475 "\x61\x20\x74\x65\x73\x74\x20\x75"
1476 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1477 "\x61\x72\x67\x65\x72\x20\x74\x68"
1478 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1479 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1480 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1481 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1482 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1483 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1484 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1485 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1486 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1487 "\x20\x68\x61\x73\x68\x65\x64\x20"
1488 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1489 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1490 "\x64\x20\x62\x79\x20\x74\x68\x65"
1491 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1492 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1493 .psize = 152,
1494 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1495 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1496 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1497 "\xf6\xf5\x65\xd1",
1498 },
1499};
1500
1501/*
1502 * HMAC-SHA256 test vectors from
1503 * draft-ietf-ipsec-ciph-sha-256-01.txt
1504 */
1505#define HMAC_SHA256_TEST_VECTORS 10
1506
1507static struct hash_testvec hmac_sha256_tv_template[] = {
1508 {
1509 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1510 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1511 "\x11\x12\x13\x14\x15\x16\x17\x18"
1512 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1513 .ksize = 32,
1514 .plaintext = "abc",
1515 .psize = 3,
1516 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1517 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1518 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1519 "\x92\x75\x90\x21\xcf\xab\x81\x81",
1520 }, {
1521 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1522 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1523 "\x11\x12\x13\x14\x15\x16\x17\x18"
1524 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1525 .ksize = 32,
1526 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1527 .psize = 56,
1528 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1529 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1530 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1531 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1532 }, {
1533 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1534 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1535 "\x11\x12\x13\x14\x15\x16\x17\x18"
1536 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1537 .ksize = 32,
1538 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1539 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1540 .psize = 112,
1541 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1542 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1543 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1544 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1545 }, {
1546 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1547 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1548 "\x0b\x0b\x0b\x0b\x0b\x0b",
1549 .ksize = 32,
1550 .plaintext = "Hi There",
1551 .psize = 8,
1552 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1553 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1554 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1555 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1556 }, {
1557 .key = "Jefe",
1558 .ksize = 4,
1559 .plaintext = "what do ya want for nothing?",
1560 .psize = 28,
1561 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1562 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1563 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1564 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1565 .np = 2,
1566 .tap = { 14, 14 }
1567 }, {
1568 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1569 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1570 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1571 .ksize = 32,
1572 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1573 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1574 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1575 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1576 .psize = 50,
1577 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1578 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1579 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1580 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1581 }, {
1582 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1583 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1584 "\x11\x12\x13\x14\x15\x16\x17\x18"
1585 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1586 "\x21\x22\x23\x24\x25",
1587 .ksize = 37,
1588 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1589 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1590 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1591 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1592 .psize = 50,
1593 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1594 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1595 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1596 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1597 }, {
1598 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1599 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1600 "\x0c\x0c\x0c\x0c\x0c\x0c",
1601 .ksize = 32,
1602 .plaintext = "Test With Truncation",
1603 .psize = 20,
1604 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1605 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1606 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1607 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1608 }, {
1609 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1610 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1611 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1612 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1613 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1614 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1615 "\xaa\xaa",
1616 .ksize = 80,
1617 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1618 .psize = 54,
1619 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1620 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1621 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1622 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1623 }, {
1624 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1625 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1626 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1627 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1628 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1629 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1630 "\xaa\xaa",
1631 .ksize = 80,
1632 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1633 "One Block-Size Data",
1634 .psize = 73,
1635 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1636 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1637 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1638 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1639 },
1640};
1641
1642#define XCBC_AES_TEST_VECTORS 6
1643
1644static struct hash_testvec aes_xcbc128_tv_template[] = {
1645 {
1646 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1647 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1648 .plaintext = zeroed_string,
1649 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1650 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1651 .psize = 0,
1652 .ksize = 16,
1653 }, {
1654 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1655 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1656 .plaintext = "\x00\x01\x02",
1657 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1658 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1659 .psize = 3,
1660 .ksize = 16,
1661 } , {
1662 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1663 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1664 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1665 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1666 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1667 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1668 .psize = 16,
1669 .ksize = 16,
1670 }, {
1671 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1672 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1673 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1674 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1675 "\x10\x11\x12\x13",
1676 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1677 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1678 .tap = { 10, 10 },
1679 .psize = 20,
1680 .np = 2,
1681 .ksize = 16,
1682 }, {
1683 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1684 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1685 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1686 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1687 "\x10\x11\x12\x13\x14\x15\x16\x17"
1688 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1689 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1690 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1691 .psize = 32,
1692 .ksize = 16,
1693 }, {
1694 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1695 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1696 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1697 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1698 "\x10\x11\x12\x13\x14\x15\x16\x17"
1699 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1700 "\x20\x21",
1701 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1702 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1703 .tap = { 17, 17 },
1704 .psize = 34,
1705 .np = 2,
1706 .ksize = 16,
1707 }
1708};
1709
Salman Qaziba1ee072012-10-05 14:24:14 -07001710#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08001711static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10001712 '\x02', '\x03', '\x02', '\x02',
1713 '\x02', '\x04', '\x01', '\x07',
1714 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08001715static char vmac_string2[128] = {'a', 'b', 'c',};
1716static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
1717 'a', 'b', 'c', 'a', 'b', 'c',
1718 'a', 'b', 'c', 'a', 'b', 'c',
1719 'a', 'b', 'c', 'a', 'b', 'c',
1720 'a', 'b', 'c', 'a', 'b', 'c',
1721 'a', 'b', 'c', 'a', 'b', 'c',
1722 'a', 'b', 'c', 'a', 'b', 'c',
1723 'a', 'b', 'c', 'a', 'b', 'c',
1724 };
1725
Salman Qaziba1ee072012-10-05 14:24:14 -07001726static char vmac_string4[17] = {'b', 'c', 'e', 'f',
1727 'i', 'j', 'l', 'm',
1728 'o', 'p', 'r', 's',
1729 't', 'u', 'w', 'x', 'z'};
1730
1731static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
1732 'o', 'l', 'k', ']', '%',
1733 '9', '2', '7', '!', 'A'};
1734
1735static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
1736 'i', '!', '#', 'w', '0',
1737 'z', '/', '4', 'A', 'n'};
1738
Shane Wangf1939f72009-09-02 20:05:22 +10001739static struct hash_testvec aes_vmac128_tv_template[] = {
1740 {
Shane Wang304a2042010-03-18 20:22:55 +08001741 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1742 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1743 .plaintext = NULL,
1744 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1745 .psize = 0,
1746 .ksize = 16,
1747 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10001748 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1749 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08001750 .plaintext = vmac_string1,
1751 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1752 .psize = 128,
1753 .ksize = 16,
1754 }, {
1755 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1756 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1757 .plaintext = vmac_string2,
1758 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1759 .psize = 128,
1760 .ksize = 16,
1761 }, {
1762 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1763 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1764 .plaintext = vmac_string3,
1765 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1766 .psize = 128,
1767 .ksize = 16,
1768 }, {
1769 .key = "abcdefghijklmnop",
1770 .plaintext = NULL,
1771 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1772 .psize = 0,
1773 .ksize = 16,
1774 }, {
1775 .key = "abcdefghijklmnop",
1776 .plaintext = vmac_string1,
1777 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1778 .psize = 128,
1779 .ksize = 16,
1780 }, {
1781 .key = "abcdefghijklmnop",
1782 .plaintext = vmac_string2,
1783 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1784 .psize = 128,
1785 .ksize = 16,
1786 }, {
1787 .key = "abcdefghijklmnop",
1788 .plaintext = vmac_string3,
1789 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10001790 .psize = 128,
1791 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07001792 }, {
1793 .key = "a09b5cd!f#07K\x00\x00\x00",
1794 .plaintext = vmac_string4,
1795 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
1796 .psize = sizeof(vmac_string4),
1797 .ksize = 16,
1798 }, {
1799 .key = "a09b5cd!f#07K\x00\x00\x00",
1800 .plaintext = vmac_string5,
1801 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
1802 .psize = sizeof(vmac_string5),
1803 .ksize = 16,
1804 }, {
1805 .key = "a09b5cd!f#07K\x00\x00\x00",
1806 .plaintext = vmac_string6,
1807 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
1808 .psize = sizeof(vmac_string6),
1809 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10001810 },
1811};
1812
Herbert Xuda7f0332008-07-31 17:08:25 +08001813/*
1814 * SHA384 HMAC test vectors from RFC4231
1815 */
1816
1817#define HMAC_SHA384_TEST_VECTORS 4
1818
1819static struct hash_testvec hmac_sha384_tv_template[] = {
1820 {
1821 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1822 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1823 "\x0b\x0b\x0b\x0b",
1824 .ksize = 20,
1825 .plaintext = "Hi There",
1826 .psize = 8,
1827 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1828 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1829 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1830 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1831 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1832 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1833 }, {
1834 .key = "Jefe",
1835 .ksize = 4,
1836 .plaintext = "what do ya want for nothing?",
1837 .psize = 28,
1838 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1839 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1840 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1841 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1842 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1843 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
1844 .np = 4,
1845 .tap = { 7, 7, 7, 7 }
1846 }, {
1847 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1848 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1849 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1850 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1851 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1852 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1853 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1854 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1855 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1856 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1857 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1858 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1859 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1860 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1861 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1862 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1863 "\xaa\xaa\xaa",
1864 .ksize = 131,
1865 .plaintext = "Test Using Larger Than Block-Siz"
1866 "e Key - Hash Key First",
1867 .psize = 54,
1868 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1869 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1870 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1871 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1872 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1873 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
1874 }, {
1875 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1876 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1877 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1878 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1879 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1880 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1881 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1882 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1883 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1884 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1885 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1886 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1887 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1888 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1889 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1890 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1891 "\xaa\xaa\xaa",
1892 .ksize = 131,
1893 .plaintext = "This is a test u"
1894 "sing a larger th"
1895 "an block-size ke"
1896 "y and a larger t"
1897 "han block-size d"
1898 "ata. The key nee"
1899 "ds to be hashed "
1900 "before being use"
1901 "d by the HMAC al"
1902 "gorithm.",
1903 .psize = 152,
1904 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1905 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1906 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1907 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1908 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1909 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
1910 },
1911};
1912
1913/*
1914 * SHA512 HMAC test vectors from RFC4231
1915 */
1916
1917#define HMAC_SHA512_TEST_VECTORS 4
1918
1919static struct hash_testvec hmac_sha512_tv_template[] = {
1920 {
1921 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1922 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1923 "\x0b\x0b\x0b\x0b",
1924 .ksize = 20,
1925 .plaintext = "Hi There",
1926 .psize = 8,
1927 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1928 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1929 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1930 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1931 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1932 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1933 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1934 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
1935 }, {
1936 .key = "Jefe",
1937 .ksize = 4,
1938 .plaintext = "what do ya want for nothing?",
1939 .psize = 28,
1940 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1941 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1942 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1943 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1944 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1945 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1946 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1947 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
1948 .np = 4,
1949 .tap = { 7, 7, 7, 7 }
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 = "Test Using Large"
1970 "r Than Block-Siz"
1971 "e Key - Hash Key"
1972 " First",
1973 .psize = 54,
1974 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1975 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1976 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1977 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1978 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1979 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1980 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1981 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
1982 }, {
1983 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1984 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1985 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1986 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1987 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1988 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1989 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1990 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1991 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1992 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1993 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1994 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1995 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1996 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1997 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1998 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1999 "\xaa\xaa\xaa",
2000 .ksize = 131,
2001 .plaintext =
2002 "This is a test u"
2003 "sing a larger th"
2004 "an block-size ke"
2005 "y and a larger t"
2006 "han block-size d"
2007 "ata. The key nee"
2008 "ds to be hashed "
2009 "before being use"
2010 "d by the HMAC al"
2011 "gorithm.",
2012 .psize = 152,
2013 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
2014 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
2015 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
2016 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
2017 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
2018 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
2019 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
2020 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
2021 },
2022};
2023
2024/*
2025 * DES test vectors.
2026 */
2027#define DES_ENC_TEST_VECTORS 10
2028#define DES_DEC_TEST_VECTORS 4
2029#define DES_CBC_ENC_TEST_VECTORS 5
2030#define DES_CBC_DEC_TEST_VECTORS 4
2031#define DES3_EDE_ENC_TEST_VECTORS 3
2032#define DES3_EDE_DEC_TEST_VECTORS 3
2033#define DES3_EDE_CBC_ENC_TEST_VECTORS 1
2034#define DES3_EDE_CBC_DEC_TEST_VECTORS 1
2035
2036static struct cipher_testvec des_enc_tv_template[] = {
2037 { /* From Applied Cryptography */
2038 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2039 .klen = 8,
2040 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2041 .ilen = 8,
2042 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2043 .rlen = 8,
2044 }, { /* Same key, different plaintext block */
2045 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2046 .klen = 8,
2047 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2048 .ilen = 8,
2049 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2050 .rlen = 8,
2051 }, { /* Sbox test from NBS */
2052 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2053 .klen = 8,
2054 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2055 .ilen = 8,
2056 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2057 .rlen = 8,
2058 }, { /* Three blocks */
2059 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2060 .klen = 8,
2061 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2062 "\x22\x33\x44\x55\x66\x77\x88\x99"
2063 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2064 .ilen = 24,
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 .rlen = 24,
2069 }, { /* Weak key */
2070 .fail = 1,
2071 .wk = 1,
2072 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2073 .klen = 8,
2074 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2075 .ilen = 8,
2076 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2077 .rlen = 8,
2078 }, { /* Two blocks -- for testing encryption across pages */
2079 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2080 .klen = 8,
2081 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2082 "\x22\x33\x44\x55\x66\x77\x88\x99",
2083 .ilen = 16,
2084 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2085 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2086 .rlen = 16,
2087 .np = 2,
2088 .tap = { 8, 8 }
2089 }, { /* Four blocks -- for testing encryption with chunking */
2090 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2091 .klen = 8,
2092 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2093 "\x22\x33\x44\x55\x66\x77\x88\x99"
2094 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2095 "\x22\x33\x44\x55\x66\x77\x88\x99",
2096 .ilen = 32,
2097 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2098 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2099 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2100 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2101 .rlen = 32,
2102 .np = 3,
2103 .tap = { 14, 10, 8 }
2104 }, {
2105 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2106 .klen = 8,
2107 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2108 "\x22\x33\x44\x55\x66\x77\x88\x99"
2109 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2110 .ilen = 24,
2111 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2112 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2113 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2114 .rlen = 24,
2115 .np = 4,
2116 .tap = { 2, 1, 3, 18 }
2117 }, {
2118 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2119 .klen = 8,
2120 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2121 "\x22\x33\x44\x55\x66\x77\x88\x99",
2122 .ilen = 16,
2123 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2124 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2125 .rlen = 16,
2126 .np = 5,
2127 .tap = { 2, 2, 2, 2, 8 }
2128 }, {
2129 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2130 .klen = 8,
2131 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2132 .ilen = 8,
2133 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2134 .rlen = 8,
2135 .np = 8,
2136 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
2137 },
2138};
2139
2140static struct cipher_testvec des_dec_tv_template[] = {
2141 { /* From Applied Cryptography */
2142 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2143 .klen = 8,
2144 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2145 .ilen = 8,
2146 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2147 .rlen = 8,
2148 }, { /* Sbox test from NBS */
2149 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2150 .klen = 8,
2151 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2152 .ilen = 8,
2153 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2154 .rlen = 8,
2155 }, { /* Two blocks, for chunking test */
2156 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2157 .klen = 8,
2158 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2159 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2160 .ilen = 16,
2161 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2162 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2163 .rlen = 16,
2164 .np = 2,
2165 .tap = { 8, 8 }
2166 }, {
2167 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2168 .klen = 8,
2169 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2170 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2171 .ilen = 16,
2172 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2173 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2174 .rlen = 16,
2175 .np = 3,
2176 .tap = { 3, 12, 1 }
2177 },
2178};
2179
2180static struct cipher_testvec des_cbc_enc_tv_template[] = {
2181 { /* From OpenSSL */
2182 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2183 .klen = 8,
2184 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2185 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2186 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2187 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2188 .ilen = 24,
2189 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2190 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2191 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2192 .rlen = 24,
2193 }, { /* FIPS Pub 81 */
2194 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2195 .klen = 8,
2196 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2197 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2198 .ilen = 8,
2199 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2200 .rlen = 8,
2201 }, {
2202 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2203 .klen = 8,
2204 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2205 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2206 .ilen = 8,
2207 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2208 .rlen = 8,
2209 }, {
2210 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2211 .klen = 8,
2212 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2213 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2214 .ilen = 8,
2215 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2216 .rlen = 8,
2217 }, { /* Copy of openssl vector for chunk testing */
2218 /* From OpenSSL */
2219 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2220 .klen = 8,
2221 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2222 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2223 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2224 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2225 .ilen = 24,
2226 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2227 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2228 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2229 .rlen = 24,
2230 .np = 2,
2231 .tap = { 13, 11 }
2232 },
2233};
2234
2235static struct cipher_testvec des_cbc_dec_tv_template[] = {
2236 { /* FIPS Pub 81 */
2237 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2238 .klen = 8,
2239 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2240 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2241 .ilen = 8,
2242 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2243 .rlen = 8,
2244 }, {
2245 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2246 .klen = 8,
2247 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2248 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2249 .ilen = 8,
2250 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2251 .rlen = 8,
2252 }, {
2253 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2254 .klen = 8,
2255 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2256 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2257 .ilen = 8,
2258 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2259 .rlen = 8,
2260 }, { /* Copy of above, for chunk testing */
2261 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2262 .klen = 8,
2263 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2264 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2265 .ilen = 8,
2266 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2267 .rlen = 8,
2268 .np = 2,
2269 .tap = { 4, 4 }
2270 },
2271};
2272
2273static struct cipher_testvec des3_ede_enc_tv_template[] = {
2274 { /* These are from openssl */
2275 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2276 "\x55\x55\x55\x55\x55\x55\x55\x55"
2277 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2278 .klen = 24,
2279 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2280 .ilen = 8,
2281 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2282 .rlen = 8,
2283 }, {
2284 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2285 "\x86\x02\x87\x66\x59\x08\x21\x98"
2286 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2287 .klen = 24,
2288 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2289 .ilen = 8,
2290 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2291 .rlen = 8,
2292 }, {
2293 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2294 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2295 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2296 .klen = 24,
2297 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2298 .ilen = 8,
2299 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2300 .rlen = 8,
2301 },
2302};
2303
2304static struct cipher_testvec des3_ede_dec_tv_template[] = {
2305 { /* These are from openssl */
2306 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2307 "\x55\x55\x55\x55\x55\x55\x55\x55"
2308 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2309 .klen = 24,
2310 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2311 .ilen = 8,
2312 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2313 .rlen = 8,
2314 }, {
2315 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2316 "\x86\x02\x87\x66\x59\x08\x21\x98"
2317 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2318 .klen = 24,
2319 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2320 .ilen = 8,
2321 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2322 .rlen = 8,
2323 }, {
2324 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2325 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2326 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2327 .klen = 24,
2328 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2329 .ilen = 8,
2330 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2331 .rlen = 8,
2332 },
2333};
2334
2335static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2336 { /* Generated from openssl */
2337 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2338 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2339 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2340 .klen = 24,
2341 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2342 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2343 "\x53\x20\x63\x65\x65\x72\x73\x74"
2344 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2345 "\x20\x79\x65\x53\x72\x63\x74\x65"
2346 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2347 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2348 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2349 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2350 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2351 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2352 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2353 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2354 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2355 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2356 "\x63\x65\x65\x72\x73\x74\x54\x20"
2357 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2358 .ilen = 128,
2359 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2360 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2361 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2362 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2363 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2364 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2365 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2366 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2367 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2368 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2369 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2370 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2371 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2372 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2373 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2374 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2375 .rlen = 128,
2376 },
2377};
2378
2379static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2380 { /* Generated from openssl */
2381 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2382 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2383 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2384 .klen = 24,
2385 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2386 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2387 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2388 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2389 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2390 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2391 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2392 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2393 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2394 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2395 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2396 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2397 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2398 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2399 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2400 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2401 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2402 .ilen = 128,
2403 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2404 "\x53\x20\x63\x65\x65\x72\x73\x74"
2405 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2406 "\x20\x79\x65\x53\x72\x63\x74\x65"
2407 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2408 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2409 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2410 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2411 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2412 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2413 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2414 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2415 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2416 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2417 "\x63\x65\x65\x72\x73\x74\x54\x20"
2418 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2419 .rlen = 128,
2420 },
2421};
2422
2423/*
2424 * Blowfish test vectors.
2425 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002426#define BF_ENC_TEST_VECTORS 7
2427#define BF_DEC_TEST_VECTORS 7
2428#define BF_CBC_ENC_TEST_VECTORS 2
2429#define BF_CBC_DEC_TEST_VECTORS 2
2430#define BF_CTR_ENC_TEST_VECTORS 2
2431#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08002432
2433static struct cipher_testvec bf_enc_tv_template[] = {
2434 { /* DES test vectors from OpenSSL */
2435 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2436 .klen = 8,
2437 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2438 .ilen = 8,
2439 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2440 .rlen = 8,
2441 }, {
2442 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2443 .klen = 8,
2444 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2445 .ilen = 8,
2446 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2447 .rlen = 8,
2448 }, {
2449 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2450 .klen = 8,
2451 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2452 .ilen = 8,
2453 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2454 .rlen = 8,
2455 }, { /* Vary the keylength... */
2456 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2457 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2458 .klen = 16,
2459 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2460 .ilen = 8,
2461 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2462 .rlen = 8,
2463 }, {
2464 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2465 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2466 "\x00\x11\x22\x33\x44",
2467 .klen = 21,
2468 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2469 .ilen = 8,
2470 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2471 .rlen = 8,
2472 }, { /* Generated with bf488 */
2473 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2474 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2475 "\x00\x11\x22\x33\x44\x55\x66\x77"
2476 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2477 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2478 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2479 "\xff\xff\xff\xff\xff\xff\xff\xff",
2480 .klen = 56,
2481 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2482 .ilen = 8,
2483 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2484 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002485 }, { /* Generated with Crypto++ */
2486 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2487 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2488 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2489 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2490 .klen = 32,
2491 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2492 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2493 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2494 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2495 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2496 .ilen = 40,
2497 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2498 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2499 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2500 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2501 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2502 .rlen = 40,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002503 .also_non_np = 1,
2504 .np = 2,
2505 .tap = { 40 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002506 },
2507};
2508
2509static struct cipher_testvec bf_dec_tv_template[] = {
2510 { /* DES test vectors from OpenSSL */
2511 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2512 .klen = 8,
2513 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2514 .ilen = 8,
2515 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2516 .rlen = 8,
2517 }, {
2518 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2519 .klen = 8,
2520 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2521 .ilen = 8,
2522 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2523 .rlen = 8,
2524 }, {
2525 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2526 .klen = 8,
2527 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2528 .ilen = 8,
2529 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2530 .rlen = 8,
2531 }, { /* Vary the keylength... */
2532 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2533 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2534 .klen = 16,
2535 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2536 .ilen = 8,
2537 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2538 .rlen = 8,
2539 }, {
2540 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2541 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2542 "\x00\x11\x22\x33\x44",
2543 .klen = 21,
2544 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2545 .ilen = 8,
2546 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2547 .rlen = 8,
2548 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
2549 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2550 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2551 "\x00\x11\x22\x33\x44\x55\x66\x77"
2552 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2553 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2554 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2555 "\xff\xff\xff\xff\xff\xff\xff\xff",
2556 .klen = 56,
2557 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2558 .ilen = 8,
2559 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2560 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002561 }, { /* Generated with Crypto++ */
2562 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2563 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2564 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2565 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2566 .klen = 32,
2567 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2568 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2569 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2570 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2571 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2572 .ilen = 40,
2573 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2574 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2575 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2576 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2577 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2578 .rlen = 40,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002579 .also_non_np = 1,
2580 .np = 2,
2581 .tap = { 40 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002582 },
2583};
2584
2585static struct cipher_testvec bf_cbc_enc_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 = "\x37\x36\x35\x34\x33\x32\x31\x20"
2592 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2593 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2594 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2595 .ilen = 32,
2596 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2597 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2598 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2599 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2609 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2610 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2611 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2612 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2613 .ilen = 40,
2614 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2615 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2616 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2617 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2618 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2619 .rlen = 40,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002620 .also_non_np = 1,
2621 .np = 2,
2622 .tap = { 40 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002623 },
2624};
2625
2626static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2627 { /* From OpenSSL */
2628 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2629 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2630 .klen = 16,
2631 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2632 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2633 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2634 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2635 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2636 .ilen = 32,
2637 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2638 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2639 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2640 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2641 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002642 }, { /* Generated with Crypto++ */
2643 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2644 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2645 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2646 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2647 .klen = 32,
2648 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2649 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2650 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2651 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2652 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2653 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2654 .ilen = 40,
2655 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2656 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2657 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2658 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2659 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2660 .rlen = 40,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002661 .also_non_np = 1,
2662 .np = 2,
2663 .tap = { 40 - 8, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002664 },
2665};
2666
2667static struct cipher_testvec bf_ctr_enc_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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2676 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2677 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2678 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2679 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2680 .ilen = 40,
2681 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2682 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2683 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2684 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2685 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
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 = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2695 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2696 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2697 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2698 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2699 "\x6D\x04\x9B",
2700 .ilen = 43,
2701 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2702 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2703 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2704 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2705 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2706 "\x3D\xA7\xE9",
2707 .rlen = 43,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002708 .also_non_np = 1,
2709 .np = 2,
2710 .tap = { 43 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03002711 }, { /* Generated with Crypto++ */
2712 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2713 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2714 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2715 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2716 .klen = 32,
2717 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2718 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2719 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2720 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2721 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2722 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2723 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2724 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2725 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2726 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2727 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2728 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2729 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2730 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2731 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2732 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2733 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2734 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2735 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2736 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2737 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2738 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2739 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2740 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2741 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2742 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2743 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2744 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2745 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2746 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2747 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2748 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2749 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2750 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2751 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2752 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2753 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2754 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2755 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2756 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2757 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2758 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2759 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2760 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2761 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2762 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2763 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2764 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2765 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2766 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2767 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2768 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2769 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2770 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2771 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2772 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2773 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2774 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2775 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2776 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2777 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2778 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2779 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2780 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2781 .ilen = 504,
2782 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
2783 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
2784 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
2785 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
2786 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
2787 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
2788 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
2789 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
2790 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
2791 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
2792 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
2793 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
2794 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
2795 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
2796 "\x0B\x82\x59\x14\x26\x67\x08\x09"
2797 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
2798 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
2799 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
2800 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
2801 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
2802 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
2803 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
2804 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
2805 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
2806 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
2807 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
2808 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
2809 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
2810 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
2811 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
2812 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
2813 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
2814 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
2815 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
2816 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
2817 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
2818 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
2819 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
2820 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
2821 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
2822 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
2823 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
2824 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
2825 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
2826 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
2827 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
2828 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
2829 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
2830 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
2831 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
2832 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
2833 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
2834 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
2835 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
2836 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
2837 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
2838 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
2839 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
2840 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
2841 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
2842 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
2843 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
2844 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
2845 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002846 },
2847};
2848
2849static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2850 { /* Generated with Crypto++ */
2851 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2852 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2853 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2854 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2855 .klen = 32,
2856 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2857 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2858 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2859 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2860 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2861 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2862 .ilen = 40,
2863 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2864 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2865 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2866 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2867 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2868 .rlen = 40,
2869 }, { /* Generated with Crypto++ */
2870 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2871 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2872 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2873 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2874 .klen = 32,
2875 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2876 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2877 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2878 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2879 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2880 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2881 "\x3D\xA7\xE9",
2882 .ilen = 43,
2883 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2884 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2885 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2886 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2887 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2888 "\x6D\x04\x9B",
2889 .rlen = 43,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002890 .also_non_np = 1,
2891 .np = 2,
2892 .tap = { 43 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03002893 }, { /* Generated with Crypto++ */
2894 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2895 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2896 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2897 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2898 .klen = 32,
2899 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2900 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
2901 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
2902 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
2903 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
2904 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
2905 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
2906 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
2907 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
2908 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
2909 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
2910 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
2911 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
2912 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
2913 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
2914 "\x0B\x82\x59\x14\x26\x67\x08\x09"
2915 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
2916 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
2917 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
2918 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
2919 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
2920 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
2921 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
2922 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
2923 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
2924 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
2925 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
2926 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
2927 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
2928 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
2929 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
2930 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
2931 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
2932 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
2933 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
2934 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
2935 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
2936 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
2937 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
2938 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
2939 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
2940 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
2941 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
2942 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
2943 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
2944 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
2945 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
2946 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
2947 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
2948 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
2949 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
2950 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
2951 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
2952 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
2953 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
2954 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
2955 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
2956 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
2957 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
2958 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
2959 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
2960 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
2961 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
2962 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
2963 .ilen = 504,
2964 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2965 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2966 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2967 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2968 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2969 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2970 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2971 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2972 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2973 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2974 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2975 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2976 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2977 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2978 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2979 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2980 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2981 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2982 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2983 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2984 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2985 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2986 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2987 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2988 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2989 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2990 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2991 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2992 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2993 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2994 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2995 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2996 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2997 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2998 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2999 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3000 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3001 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3002 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3003 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3004 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3005 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3006 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3007 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3008 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3009 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3010 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3011 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3012 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3013 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3014 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3015 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3016 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3017 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3018 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3019 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3020 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3021 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3022 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3023 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3024 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3025 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3026 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3027 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08003028 },
3029};
3030
3031/*
3032 * Twofish test vectors.
3033 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03003034#define TF_ENC_TEST_VECTORS 4
3035#define TF_DEC_TEST_VECTORS 4
3036#define TF_CBC_ENC_TEST_VECTORS 5
3037#define TF_CBC_DEC_TEST_VECTORS 5
3038#define TF_CTR_ENC_TEST_VECTORS 2
3039#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03003040#define TF_LRW_ENC_TEST_VECTORS 8
3041#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03003042#define TF_XTS_ENC_TEST_VECTORS 5
3043#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08003044
3045static struct cipher_testvec tf_enc_tv_template[] = {
3046 {
3047 .key = zeroed_string,
3048 .klen = 16,
3049 .input = zeroed_string,
3050 .ilen = 16,
3051 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3052 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3053 .rlen = 16,
3054 }, {
3055 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3056 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3057 "\x00\x11\x22\x33\x44\x55\x66\x77",
3058 .klen = 24,
3059 .input = zeroed_string,
3060 .ilen = 16,
3061 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
3062 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
3063 .rlen = 16,
3064 }, {
3065 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3066 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3067 "\x00\x11\x22\x33\x44\x55\x66\x77"
3068 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
3069 .klen = 32,
3070 .input = zeroed_string,
3071 .ilen = 16,
3072 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
3073 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
3074 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003075 }, { /* Generated with Crypto++ */
3076 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
3077 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
3078 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
3079 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
3080 .klen = 32,
3081 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3082 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3083 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3084 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3085 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3086 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3087 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003088 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3089 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3090 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3091 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3092 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3093 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3094 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3095 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3096 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3097 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3098 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3099 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3100 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3101 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3102 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3103 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3104 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3105 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3106 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3107 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3108 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3109 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3110 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3111 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3112 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3113 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3114 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3115 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3116 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3117 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3118 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3119 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3120 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3121 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3122 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3123 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3124 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3125 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3126 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3127 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3128 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3129 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3130 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3131 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3132 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3133 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3134 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3135 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3136 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3137 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3138 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3139 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3140 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3141 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3142 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3143 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003144 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
3145 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
3146 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
3147 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
3148 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
3149 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
3150 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003151 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
3152 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
3153 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
3154 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
3155 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
3156 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
3157 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
3158 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
3159 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
3160 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
3161 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
3162 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
3163 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
3164 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
3165 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
3166 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
3167 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
3168 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
3169 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
3170 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
3171 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
3172 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
3173 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
3174 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
3175 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
3176 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
3177 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
3178 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
3179 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
3180 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
3181 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
3182 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
3183 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
3184 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
3185 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
3186 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
3187 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
3188 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
3189 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
3190 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
3191 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
3192 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
3193 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
3194 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
3195 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
3196 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
3197 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
3198 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
3199 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
3200 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
3201 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
3202 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
3203 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
3204 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
3205 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
3206 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003207 .also_non_np = 1,
3208 .np = 2,
3209 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003210 },
3211};
3212
3213static struct cipher_testvec tf_dec_tv_template[] = {
3214 {
3215 .key = zeroed_string,
3216 .klen = 16,
3217 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3218 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3219 .ilen = 16,
3220 .result = zeroed_string,
3221 .rlen = 16,
3222 }, {
3223 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3224 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3225 "\x00\x11\x22\x33\x44\x55\x66\x77",
3226 .klen = 24,
3227 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
3228 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
3229 .ilen = 16,
3230 .result = zeroed_string,
3231 .rlen = 16,
3232 }, {
3233 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3234 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3235 "\x00\x11\x22\x33\x44\x55\x66\x77"
3236 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
3237 .klen = 32,
3238 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
3239 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
3240 .ilen = 16,
3241 .result = zeroed_string,
3242 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003243 }, { /* Generated with Crypto++ */
3244 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
3245 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
3246 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
3247 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
3248 .klen = 32,
3249 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
3250 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
3251 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
3252 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
3253 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
3254 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
3255 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003256 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
3257 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
3258 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
3259 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
3260 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
3261 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
3262 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
3263 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
3264 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
3265 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
3266 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
3267 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
3268 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
3269 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
3270 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
3271 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
3272 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
3273 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
3274 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
3275 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
3276 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
3277 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
3278 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
3279 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
3280 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
3281 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
3282 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
3283 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
3284 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
3285 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
3286 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
3287 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
3288 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
3289 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
3290 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
3291 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
3292 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
3293 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
3294 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
3295 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
3296 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
3297 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
3298 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
3299 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
3300 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
3301 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
3302 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
3303 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
3304 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
3305 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
3306 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
3307 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
3308 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
3309 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
3310 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
3311 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003312 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3313 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3314 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3315 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3316 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3317 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3318 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003319 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3320 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3321 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3322 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3323 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3324 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3325 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3326 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3327 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3328 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3329 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3330 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3331 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3332 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3333 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3334 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3335 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3336 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3337 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3338 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3339 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3340 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3341 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3342 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3343 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3344 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3345 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3346 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3347 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3348 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3349 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3350 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3351 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3352 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3353 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3354 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3355 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3356 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3357 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3358 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3359 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3360 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3361 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3362 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3363 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3364 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3365 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3366 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3367 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3368 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3369 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3370 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3371 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3372 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3373 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3374 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003375 .also_non_np = 1,
3376 .np = 2,
3377 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003378 },
3379};
3380
3381static struct cipher_testvec tf_cbc_enc_tv_template[] = {
3382 { /* Generated with Nettle */
3383 .key = zeroed_string,
3384 .klen = 16,
3385 .iv = zeroed_string,
3386 .input = zeroed_string,
3387 .ilen = 16,
3388 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3389 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3390 .rlen = 16,
3391 }, {
3392 .key = zeroed_string,
3393 .klen = 16,
3394 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3395 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3396 .input = zeroed_string,
3397 .ilen = 16,
3398 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3399 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3400 .rlen = 16,
3401 }, {
3402 .key = zeroed_string,
3403 .klen = 16,
3404 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3405 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3406 .input = zeroed_string,
3407 .ilen = 16,
3408 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3409 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3410 .rlen = 16,
3411 }, {
3412 .key = zeroed_string,
3413 .klen = 16,
3414 .iv = zeroed_string,
3415 .input = zeroed_string,
3416 .ilen = 48,
3417 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3418 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3419 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3420 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3421 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3422 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3423 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003424 }, { /* Generated with Crypto++ */
3425 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3426 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3427 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3428 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3429 .klen = 32,
3430 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3431 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3432 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3433 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3434 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3435 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3436 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3437 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3438 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003439 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3440 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3441 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3442 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3443 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3444 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3445 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3446 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3447 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3448 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3449 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3450 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3451 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3452 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3453 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3454 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3455 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3456 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3457 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3458 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3459 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3460 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3461 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3462 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3463 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3464 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3465 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3466 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3467 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3468 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3469 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3470 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3471 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3472 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3473 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3474 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3475 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3476 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3477 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3478 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3479 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3480 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3481 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3482 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3483 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3484 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3485 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3486 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3487 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3488 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3489 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3490 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3491 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3492 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3493 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3494 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003495 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3496 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3497 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3498 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3499 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3500 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3501 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003502 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3503 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3504 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3505 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3506 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3507 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3508 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3509 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3510 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3511 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3512 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3513 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3514 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3515 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3516 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3517 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3518 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3519 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3520 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3521 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3522 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3523 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3524 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3525 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3526 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3527 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3528 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3529 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3530 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3531 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3532 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3533 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3534 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3535 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3536 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3537 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3538 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3539 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3540 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3541 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3542 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3543 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3544 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3545 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3546 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3547 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3548 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3549 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3550 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3551 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3552 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3553 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3554 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3555 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3556 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3557 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003558 .also_non_np = 1,
3559 .np = 2,
3560 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003561 },
3562};
3563
3564static struct cipher_testvec tf_cbc_dec_tv_template[] = {
3565 { /* Reverse of the first four above */
3566 .key = zeroed_string,
3567 .klen = 16,
3568 .iv = zeroed_string,
3569 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3570 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3571 .ilen = 16,
3572 .result = zeroed_string,
3573 .rlen = 16,
3574 }, {
3575 .key = zeroed_string,
3576 .klen = 16,
3577 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3578 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3579 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3580 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3581 .ilen = 16,
3582 .result = zeroed_string,
3583 .rlen = 16,
3584 }, {
3585 .key = zeroed_string,
3586 .klen = 16,
3587 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3588 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3589 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3590 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3591 .ilen = 16,
3592 .result = zeroed_string,
3593 .rlen = 16,
3594 }, {
3595 .key = zeroed_string,
3596 .klen = 16,
3597 .iv = zeroed_string,
3598 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3599 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3600 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3601 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3602 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3603 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3604 .ilen = 48,
3605 .result = zeroed_string,
3606 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003607 }, { /* Generated with Crypto++ */
3608 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3609 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3610 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3611 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3612 .klen = 32,
3613 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3614 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3615 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3616 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3617 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3618 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3619 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3620 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3621 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003622 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3623 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3624 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3625 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3626 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3627 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3628 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3629 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3630 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3631 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3632 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3633 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3634 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3635 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3636 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3637 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3638 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3639 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3640 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3641 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3642 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3643 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3644 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3645 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3646 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3647 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3648 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3649 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3650 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3651 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3652 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3653 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3654 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3655 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3656 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3657 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3658 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3659 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3660 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3661 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3662 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3663 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3664 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3665 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3666 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3667 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3668 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3669 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3670 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3671 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3672 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3673 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3674 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3675 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3676 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3677 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003678 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3679 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3680 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3681 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3682 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3683 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3684 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003685 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3686 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3687 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3688 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3689 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3690 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3691 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3692 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3693 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3694 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3695 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3696 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3697 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3698 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3699 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3700 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3701 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3702 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3703 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3704 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3705 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3706 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3707 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3708 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3709 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3710 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3711 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3712 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3713 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3714 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3715 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3716 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3717 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3718 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3719 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3720 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3721 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3722 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3723 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3724 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3725 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3726 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3727 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3728 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3729 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3730 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3731 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3732 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3733 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3734 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3735 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3736 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3737 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3738 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3739 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3740 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003741 .also_non_np = 1,
3742 .np = 2,
3743 .tap = { 496 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03003744 },
3745};
3746
3747static struct cipher_testvec tf_ctr_enc_tv_template[] = {
3748 { /* Generated with Crypto++ */
3749 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3750 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3751 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3752 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3753 .klen = 32,
3754 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3755 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3756 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3757 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3758 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3759 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3760 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3761 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3762 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003763 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3764 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3765 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3766 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3767 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3768 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3769 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3770 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3771 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3772 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3773 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3774 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3775 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3776 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3777 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3778 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3779 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3780 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3781 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3782 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3783 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3784 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3785 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3786 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3787 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3788 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3789 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3790 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3791 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3792 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3793 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3794 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3795 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3796 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3797 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3798 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3799 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3800 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3801 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3802 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3803 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3804 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3805 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3806 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3807 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3808 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3809 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3810 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3811 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3812 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3813 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3814 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3815 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3816 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3817 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3818 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003819 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3820 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3821 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3822 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3823 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3824 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3825 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02003826 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3827 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3828 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3829 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3830 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3831 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3832 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3833 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3834 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3835 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3836 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3837 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3838 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3839 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3840 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3841 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3842 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3843 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3844 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3845 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3846 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3847 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3848 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3849 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3850 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3851 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3852 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3853 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3854 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3855 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3856 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3857 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3858 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3859 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3860 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3861 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3862 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3863 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3864 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3865 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3866 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3867 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3868 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3869 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3870 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3871 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3872 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3873 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3874 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3875 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3876 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3877 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3878 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3879 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3880 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
3881 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003882 }, { /* Generated with Crypto++ */
3883 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3884 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3885 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3886 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3887 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03003888 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3889 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3890 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3891 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3892 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3893 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3894 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3895 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3896 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3897 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3898 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3899 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3900 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3901 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3902 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3903 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3904 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3905 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3906 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3907 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3908 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3909 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3910 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3911 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3912 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3913 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3914 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3915 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3916 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3917 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3918 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3919 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3920 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3921 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3922 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3923 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3924 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3925 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3926 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3927 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3928 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3929 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3930 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3931 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3932 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3933 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3934 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3935 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3936 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3937 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3938 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3939 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3940 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3941 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3942 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3943 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3944 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3945 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3946 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3947 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3948 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3949 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3950 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3951 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3952 .ilen = 496,
3953 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
3954 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
3955 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
3956 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
3957 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
3958 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
3959 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
3960 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
3961 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
3962 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
3963 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
3964 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
3965 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
3966 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
3967 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
3968 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
3969 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
3970 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
3971 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
3972 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
3973 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
3974 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
3975 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
3976 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
3977 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
3978 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
3979 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
3980 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
3981 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
3982 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
3983 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
3984 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
3985 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
3986 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
3987 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
3988 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
3989 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
3990 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
3991 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
3992 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
3993 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
3994 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
3995 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
3996 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
3997 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
3998 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
3999 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
4000 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
4001 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
4002 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
4003 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
4004 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
4005 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
4006 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
4007 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
4008 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
4009 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
4010 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
4011 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
4012 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
4013 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
4014 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
4015 .rlen = 496,
4016 }, { /* Generated with Crypto++ */
4017 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4018 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4019 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4020 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4021 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004022 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4023 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4024 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4025 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4026 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4027 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4028 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4029 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4030 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4031 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004032 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4033 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4034 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4035 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4036 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4037 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4038 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4039 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4040 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4041 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4042 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4043 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4044 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4045 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4046 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4047 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4048 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4049 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4050 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4051 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4052 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4053 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4054 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4055 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4056 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4057 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4058 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4059 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4060 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4061 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4062 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4063 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4064 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4065 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4066 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4067 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4068 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4069 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4070 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4071 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4072 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4073 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4074 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4075 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4076 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4077 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4078 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4079 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4080 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4081 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4082 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4083 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4084 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4085 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4086 "\x2B\xC2\x59",
4087 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004088 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4089 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4090 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4091 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4092 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4093 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4094 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4095 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004096 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4097 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4098 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4099 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4100 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4101 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4102 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4103 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4104 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4105 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4106 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4107 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4108 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4109 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4110 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4111 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4112 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4113 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4114 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4115 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4116 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4117 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4118 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4119 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4120 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4121 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4122 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4123 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4124 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4125 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4126 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4127 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4128 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4129 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4130 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4131 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4132 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4133 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4134 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4135 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4136 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4137 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4138 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4139 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4140 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4141 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4142 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4143 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4144 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4145 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4146 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4147 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4148 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4149 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
4150 "\x6C\x82\x9D",
4151 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004152 .also_non_np = 1,
4153 .np = 2,
4154 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03004155 },
4156};
4157
4158static struct cipher_testvec tf_ctr_dec_tv_template[] = {
4159 { /* Generated with Crypto++ */
4160 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4161 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4162 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4163 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4164 .klen = 32,
4165 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4166 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4167 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4168 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4169 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4170 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4171 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4172 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4173 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004174 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4175 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4176 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4177 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4178 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4179 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4180 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4181 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4182 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4183 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4184 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4185 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4186 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4187 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4188 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4189 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4190 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4191 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4192 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4193 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4194 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4195 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4196 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4197 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4198 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4199 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4200 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4201 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4202 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4203 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4204 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4205 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4206 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4207 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4208 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4209 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4210 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4211 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4212 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4213 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4214 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4215 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4216 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4217 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4218 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4219 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4220 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4221 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4222 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4223 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4224 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4225 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4226 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4227 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4228 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
4229 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004230 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4231 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4232 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4233 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4234 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4235 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4236 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004237 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4238 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4239 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4240 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4241 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4242 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4243 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4244 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4245 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4246 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4247 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4248 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4249 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4250 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4251 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4252 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4253 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4254 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4255 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4256 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4257 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4258 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4259 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4260 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4261 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4262 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4263 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4264 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4265 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4266 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4267 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4268 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4269 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4270 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4271 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4272 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4273 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4274 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4275 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4276 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4277 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4278 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4279 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4280 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4281 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4282 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4283 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4284 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4285 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4286 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4287 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4288 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4289 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4290 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4291 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4292 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004293 }, { /* Generated with Crypto++ */
4294 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4295 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4296 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4297 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4298 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03004299 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4300 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4301 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
4302 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
4303 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
4304 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
4305 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
4306 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
4307 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
4308 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
4309 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
4310 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
4311 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
4312 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
4313 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
4314 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
4315 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
4316 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
4317 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
4318 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
4319 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
4320 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
4321 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
4322 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
4323 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
4324 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
4325 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
4326 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
4327 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
4328 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
4329 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
4330 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
4331 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
4332 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
4333 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
4334 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
4335 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
4336 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
4337 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
4338 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
4339 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
4340 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
4341 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
4342 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
4343 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
4344 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
4345 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
4346 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
4347 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
4348 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
4349 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
4350 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
4351 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
4352 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
4353 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
4354 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
4355 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
4356 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
4357 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
4358 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
4359 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
4360 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
4361 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
4362 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
4363 .ilen = 496,
4364 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4365 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4366 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4367 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4368 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4369 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4370 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4371 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4372 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4373 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4374 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4375 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4376 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4377 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4378 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4379 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4380 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4381 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4382 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4383 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4384 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4385 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4386 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4387 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4388 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4389 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4390 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4391 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4392 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4393 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4394 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4395 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4396 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4397 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4398 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4399 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4400 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4401 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4402 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4403 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4404 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4405 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4406 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4407 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4408 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4409 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4410 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4411 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4412 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4413 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4414 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4415 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4416 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4417 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4418 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4419 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4420 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4421 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4422 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4423 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4424 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4425 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4426 .rlen = 496,
4427 }, { /* Generated with Crypto++ */
4428 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4429 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4430 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4431 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4432 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004433 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4434 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4435 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4436 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4437 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4438 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4439 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4440 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4441 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4442 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004443 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4444 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4445 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4446 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4447 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4448 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4449 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4450 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4451 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4452 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4453 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4454 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4455 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4456 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4457 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4458 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4459 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4460 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4461 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4462 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4463 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4464 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4465 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4466 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4467 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4468 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4469 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4470 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4471 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4472 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4473 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4474 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4475 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4476 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4477 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4478 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4479 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4480 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4481 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4482 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4483 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4484 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4485 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4486 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4487 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4488 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4489 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4490 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4491 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4492 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4493 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4494 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4495 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4496 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
4497 "\x6C\x82\x9D",
4498 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004499 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4500 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4501 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4502 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4503 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4504 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4505 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4506 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004507 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4508 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4509 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4510 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4511 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4512 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4513 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4514 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4515 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4516 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4517 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4518 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4519 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4520 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4521 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4522 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4523 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4524 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4525 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4526 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4527 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4528 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4529 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4530 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4531 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4532 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4533 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4534 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4535 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4536 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4537 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4538 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4539 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4540 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4541 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4542 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4543 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4544 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4545 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4546 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4547 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4548 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4549 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4550 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4551 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4552 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4553 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4554 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4555 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4556 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4557 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4558 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4559 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4560 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4561 "\x2B\xC2\x59",
4562 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004563 .also_non_np = 1,
4564 .np = 2,
4565 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004566 },
4567};
4568
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03004569static struct cipher_testvec tf_lrw_enc_tv_template[] = {
4570 /* Generated from AES-LRW test vectors */
4571 {
4572 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4573 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4574 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4575 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4576 .klen = 32,
4577 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4578 "\x00\x00\x00\x00\x00\x00\x00\x01",
4579 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4580 "\x38\x39\x41\x42\x43\x44\x45\x46",
4581 .ilen = 16,
4582 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4583 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4584 .rlen = 16,
4585 }, {
4586 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4587 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4588 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4589 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4590 .klen = 32,
4591 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4592 "\x00\x00\x00\x00\x00\x00\x00\x02",
4593 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4594 "\x38\x39\x41\x42\x43\x44\x45\x46",
4595 .ilen = 16,
4596 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4597 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4598 .rlen = 16,
4599 }, {
4600 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4601 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4602 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4603 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4604 .klen = 32,
4605 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4606 "\x00\x00\x00\x02\x00\x00\x00\x00",
4607 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4608 "\x38\x39\x41\x42\x43\x44\x45\x46",
4609 .ilen = 16,
4610 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4611 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4612 .rlen = 16,
4613 }, {
4614 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4615 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4616 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4617 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4618 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4619 .klen = 40,
4620 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4621 "\x00\x00\x00\x00\x00\x00\x00\x01",
4622 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4623 "\x38\x39\x41\x42\x43\x44\x45\x46",
4624 .ilen = 16,
4625 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4626 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4627 .rlen = 16,
4628 }, {
4629 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4630 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4631 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4632 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4633 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4634 .klen = 40,
4635 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4636 "\x00\x00\x00\x02\x00\x00\x00\x00",
4637 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4638 "\x38\x39\x41\x42\x43\x44\x45\x46",
4639 .ilen = 16,
4640 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4641 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4642 .rlen = 16,
4643 }, {
4644 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4645 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4646 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4647 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4648 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4649 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4650 .klen = 48,
4651 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4652 "\x00\x00\x00\x00\x00\x00\x00\x01",
4653 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4654 "\x38\x39\x41\x42\x43\x44\x45\x46",
4655 .ilen = 16,
4656 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4657 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4658 .rlen = 16,
4659 }, {
4660 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4661 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4662 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4663 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4664 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4665 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4666 .klen = 48,
4667 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4668 "\x00\x00\x00\x02\x00\x00\x00\x00",
4669 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4670 "\x38\x39\x41\x42\x43\x44\x45\x46",
4671 .ilen = 16,
4672 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4673 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4674 .rlen = 16,
4675 }, {
4676 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4677 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4678 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4679 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4680 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4681 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4682 .klen = 48,
4683 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4684 "\x00\x00\x00\x00\x00\x00\x00\x01",
4685 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4686 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4687 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4688 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4689 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4690 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4691 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4692 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4693 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4694 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4695 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4696 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4697 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4698 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4699 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4700 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4701 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4702 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4703 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4704 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4705 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4706 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4707 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4708 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4709 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4710 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4711 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4712 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4713 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4714 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4715 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4716 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4717 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4718 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4719 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4720 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4721 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4722 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4723 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4724 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4725 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4726 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4727 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4728 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4729 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4730 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4731 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4732 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4733 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4734 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4735 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4736 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4737 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4738 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4739 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4740 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4741 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4742 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4743 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4744 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4745 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4746 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4747 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4748 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4749 .ilen = 512,
4750 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4751 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4752 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4753 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4754 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4755 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4756 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4757 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4758 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4759 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4760 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4761 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4762 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4763 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4764 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4765 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4766 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4767 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4768 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4769 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4770 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4771 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4772 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4773 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4774 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4775 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4776 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4777 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4778 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4779 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4780 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4781 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4782 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4783 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4784 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4785 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4786 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4787 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4788 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4789 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4790 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4791 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4792 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4793 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4794 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4795 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4796 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4797 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4798 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4799 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4800 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4801 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4802 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4803 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4804 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4805 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4806 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4807 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4808 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4809 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4810 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4811 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
4812 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4813 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4814 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004815 .also_non_np = 1,
4816 .np = 2,
4817 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03004818 },
4819};
4820
4821static struct cipher_testvec tf_lrw_dec_tv_template[] = {
4822 /* Generated from AES-LRW test vectors */
4823 /* same as enc vectors with input and result reversed */
4824 {
4825 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4826 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4827 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4828 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4829 .klen = 32,
4830 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4831 "\x00\x00\x00\x00\x00\x00\x00\x01",
4832 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4833 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4834 .ilen = 16,
4835 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4836 "\x38\x39\x41\x42\x43\x44\x45\x46",
4837 .rlen = 16,
4838 }, {
4839 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4840 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4841 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4842 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4843 .klen = 32,
4844 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4845 "\x00\x00\x00\x00\x00\x00\x00\x02",
4846 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4847 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4848 .ilen = 16,
4849 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4850 "\x38\x39\x41\x42\x43\x44\x45\x46",
4851 .rlen = 16,
4852 }, {
4853 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4854 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4855 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4856 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4857 .klen = 32,
4858 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4859 "\x00\x00\x00\x02\x00\x00\x00\x00",
4860 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4861 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4862 .ilen = 16,
4863 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4864 "\x38\x39\x41\x42\x43\x44\x45\x46",
4865 .rlen = 16,
4866 }, {
4867 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4868 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4869 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4870 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4871 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4872 .klen = 40,
4873 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4874 "\x00\x00\x00\x00\x00\x00\x00\x01",
4875 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4876 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4877 .ilen = 16,
4878 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4879 "\x38\x39\x41\x42\x43\x44\x45\x46",
4880 .rlen = 16,
4881 }, {
4882 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4883 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4884 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4885 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4886 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4887 .klen = 40,
4888 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4889 "\x00\x00\x00\x02\x00\x00\x00\x00",
4890 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4891 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4892 .ilen = 16,
4893 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4894 "\x38\x39\x41\x42\x43\x44\x45\x46",
4895 .rlen = 16,
4896 }, {
4897 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4898 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4899 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4900 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4901 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4902 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4903 .klen = 48,
4904 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4905 "\x00\x00\x00\x00\x00\x00\x00\x01",
4906 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4907 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4908 .ilen = 16,
4909 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4910 "\x38\x39\x41\x42\x43\x44\x45\x46",
4911 .rlen = 16,
4912 }, {
4913 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4914 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4915 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4916 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4917 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4918 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4919 .klen = 48,
4920 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4921 "\x00\x00\x00\x02\x00\x00\x00\x00",
4922 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4923 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4924 .ilen = 16,
4925 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4926 "\x38\x39\x41\x42\x43\x44\x45\x46",
4927 .rlen = 16,
4928 }, {
4929 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4930 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4931 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4932 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4933 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4934 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4935 .klen = 48,
4936 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4937 "\x00\x00\x00\x00\x00\x00\x00\x01",
4938 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4939 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4940 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4941 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4942 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4943 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4944 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4945 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4946 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4947 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4948 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4949 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4950 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4951 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4952 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4953 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4954 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4955 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4956 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4957 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4958 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4959 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4960 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4961 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4962 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4963 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4964 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4965 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4966 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4967 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4968 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4969 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4970 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4971 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4972 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4973 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4974 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4975 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4976 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4977 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4978 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4979 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4980 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4981 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4982 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4983 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4984 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4985 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4986 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4987 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4988 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4989 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4990 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4991 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4992 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4993 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4994 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4995 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4996 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4997 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4998 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4999 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
5000 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
5001 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
5002 .ilen = 512,
5003 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5004 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5005 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5006 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5007 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5008 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5009 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5010 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5011 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5012 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5013 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5014 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5015 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5016 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5017 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5018 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5019 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5020 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5021 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5022 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5023 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5024 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5025 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5026 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5027 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5028 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5029 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5030 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5031 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5032 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5033 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5034 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5035 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5036 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5037 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5038 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5039 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5040 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5041 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5042 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5043 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5044 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5045 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5046 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5047 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5048 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5049 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5050 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5051 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5052 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5053 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5054 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5055 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5056 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5057 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5058 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5059 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5060 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5061 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5062 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5063 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5064 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5065 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5066 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5067 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005068 .also_non_np = 1,
5069 .np = 2,
5070 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005071 },
5072};
5073
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005074static struct cipher_testvec tf_xts_enc_tv_template[] = {
5075 /* Generated from AES-XTS test vectors */
5076{
5077 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
5078 "\x00\x00\x00\x00\x00\x00\x00\x00"
5079 "\x00\x00\x00\x00\x00\x00\x00\x00"
5080 "\x00\x00\x00\x00\x00\x00\x00\x00",
5081 .klen = 32,
5082 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5083 "\x00\x00\x00\x00\x00\x00\x00\x00",
5084 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5085 "\x00\x00\x00\x00\x00\x00\x00\x00"
5086 "\x00\x00\x00\x00\x00\x00\x00\x00"
5087 "\x00\x00\x00\x00\x00\x00\x00\x00",
5088 .ilen = 32,
5089 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
5090 "\x30\x74\xe4\x44\x52\x77\x97\x43"
5091 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
5092 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
5093 .rlen = 32,
5094 }, {
5095 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
5096 "\x11\x11\x11\x11\x11\x11\x11\x11"
5097 "\x22\x22\x22\x22\x22\x22\x22\x22"
5098 "\x22\x22\x22\x22\x22\x22\x22\x22",
5099 .klen = 32,
5100 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5101 "\x00\x00\x00\x00\x00\x00\x00\x00",
5102 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
5103 "\x44\x44\x44\x44\x44\x44\x44\x44"
5104 "\x44\x44\x44\x44\x44\x44\x44\x44"
5105 "\x44\x44\x44\x44\x44\x44\x44\x44",
5106 .ilen = 32,
5107 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
5108 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
5109 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
5110 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
5111 .rlen = 32,
5112 }, {
5113 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5114 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5115 "\x22\x22\x22\x22\x22\x22\x22\x22"
5116 "\x22\x22\x22\x22\x22\x22\x22\x22",
5117 .klen = 32,
5118 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5119 "\x00\x00\x00\x00\x00\x00\x00\x00",
5120 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
5121 "\x44\x44\x44\x44\x44\x44\x44\x44"
5122 "\x44\x44\x44\x44\x44\x44\x44\x44"
5123 "\x44\x44\x44\x44\x44\x44\x44\x44",
5124 .ilen = 32,
5125 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
5126 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
5127 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
5128 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
5129 .rlen = 32,
5130 }, {
5131 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5132 "\x23\x53\x60\x28\x74\x71\x35\x26"
5133 "\x31\x41\x59\x26\x53\x58\x97\x93"
5134 "\x23\x84\x62\x64\x33\x83\x27\x95",
5135 .klen = 32,
5136 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5137 "\x00\x00\x00\x00\x00\x00\x00\x00",
5138 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5139 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5140 "\x10\x11\x12\x13\x14\x15\x16\x17"
5141 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5142 "\x20\x21\x22\x23\x24\x25\x26\x27"
5143 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5144 "\x30\x31\x32\x33\x34\x35\x36\x37"
5145 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5146 "\x40\x41\x42\x43\x44\x45\x46\x47"
5147 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5148 "\x50\x51\x52\x53\x54\x55\x56\x57"
5149 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5150 "\x60\x61\x62\x63\x64\x65\x66\x67"
5151 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5152 "\x70\x71\x72\x73\x74\x75\x76\x77"
5153 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5154 "\x80\x81\x82\x83\x84\x85\x86\x87"
5155 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5156 "\x90\x91\x92\x93\x94\x95\x96\x97"
5157 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5158 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5159 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5160 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5161 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5162 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5163 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5164 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5165 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5166 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5167 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5168 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5169 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5170 "\x00\x01\x02\x03\x04\x05\x06\x07"
5171 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5172 "\x10\x11\x12\x13\x14\x15\x16\x17"
5173 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5174 "\x20\x21\x22\x23\x24\x25\x26\x27"
5175 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5176 "\x30\x31\x32\x33\x34\x35\x36\x37"
5177 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5178 "\x40\x41\x42\x43\x44\x45\x46\x47"
5179 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5180 "\x50\x51\x52\x53\x54\x55\x56\x57"
5181 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5182 "\x60\x61\x62\x63\x64\x65\x66\x67"
5183 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5184 "\x70\x71\x72\x73\x74\x75\x76\x77"
5185 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5186 "\x80\x81\x82\x83\x84\x85\x86\x87"
5187 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5188 "\x90\x91\x92\x93\x94\x95\x96\x97"
5189 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5190 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5191 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5192 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5193 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5194 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5195 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5196 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5197 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5198 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5199 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5200 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5201 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5202 .ilen = 512,
5203 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
5204 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
5205 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
5206 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
5207 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
5208 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
5209 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
5210 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
5211 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
5212 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
5213 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
5214 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
5215 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
5216 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
5217 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
5218 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
5219 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
5220 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
5221 "\x39\x80\x39\x09\x97\x65\xf2\x83"
5222 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
5223 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
5224 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
5225 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
5226 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
5227 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
5228 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
5229 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
5230 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
5231 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
5232 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
5233 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
5234 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
5235 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
5236 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
5237 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
5238 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
5239 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
5240 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
5241 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
5242 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
5243 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
5244 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
5245 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
5246 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
5247 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
5248 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
5249 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
5250 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
5251 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
5252 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
5253 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
5254 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
5255 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
5256 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
5257 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
5258 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
5259 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
5260 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
5261 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
5262 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
5263 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
5264 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
5265 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
5266 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
5267 .rlen = 512,
5268 }, {
5269 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5270 "\x23\x53\x60\x28\x74\x71\x35\x26"
5271 "\x62\x49\x77\x57\x24\x70\x93\x69"
5272 "\x99\x59\x57\x49\x66\x96\x76\x27"
5273 "\x31\x41\x59\x26\x53\x58\x97\x93"
5274 "\x23\x84\x62\x64\x33\x83\x27\x95"
5275 "\x02\x88\x41\x97\x16\x93\x99\x37"
5276 "\x51\x05\x82\x09\x74\x94\x45\x92",
5277 .klen = 64,
5278 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
5279 "\x00\x00\x00\x00\x00\x00\x00\x00",
5280 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5281 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5282 "\x10\x11\x12\x13\x14\x15\x16\x17"
5283 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5284 "\x20\x21\x22\x23\x24\x25\x26\x27"
5285 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5286 "\x30\x31\x32\x33\x34\x35\x36\x37"
5287 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5288 "\x40\x41\x42\x43\x44\x45\x46\x47"
5289 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5290 "\x50\x51\x52\x53\x54\x55\x56\x57"
5291 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5292 "\x60\x61\x62\x63\x64\x65\x66\x67"
5293 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5294 "\x70\x71\x72\x73\x74\x75\x76\x77"
5295 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5296 "\x80\x81\x82\x83\x84\x85\x86\x87"
5297 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5298 "\x90\x91\x92\x93\x94\x95\x96\x97"
5299 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5300 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5301 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5302 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5303 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5304 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5305 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5306 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5307 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5308 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5309 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5310 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5311 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5312 "\x00\x01\x02\x03\x04\x05\x06\x07"
5313 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5314 "\x10\x11\x12\x13\x14\x15\x16\x17"
5315 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5316 "\x20\x21\x22\x23\x24\x25\x26\x27"
5317 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5318 "\x30\x31\x32\x33\x34\x35\x36\x37"
5319 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5320 "\x40\x41\x42\x43\x44\x45\x46\x47"
5321 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5322 "\x50\x51\x52\x53\x54\x55\x56\x57"
5323 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5324 "\x60\x61\x62\x63\x64\x65\x66\x67"
5325 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5326 "\x70\x71\x72\x73\x74\x75\x76\x77"
5327 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5328 "\x80\x81\x82\x83\x84\x85\x86\x87"
5329 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5330 "\x90\x91\x92\x93\x94\x95\x96\x97"
5331 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5332 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5333 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5334 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5335 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5336 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5337 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5338 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5339 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5340 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5341 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5342 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5343 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5344 .ilen = 512,
5345 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
5346 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
5347 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
5348 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
5349 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
5350 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
5351 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
5352 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
5353 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
5354 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
5355 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
5356 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
5357 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
5358 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
5359 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
5360 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
5361 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
5362 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
5363 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
5364 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
5365 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
5366 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
5367 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
5368 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
5369 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
5370 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
5371 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
5372 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
5373 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
5374 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
5375 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
5376 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
5377 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
5378 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
5379 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
5380 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
5381 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
5382 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
5383 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
5384 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
5385 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
5386 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
5387 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
5388 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
5389 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
5390 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
5391 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
5392 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
5393 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
5394 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
5395 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
5396 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
5397 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
5398 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
5399 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
5400 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
5401 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
5402 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
5403 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
5404 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
5405 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
5406 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
5407 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
5408 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
5409 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005410 .also_non_np = 1,
5411 .np = 2,
5412 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005413 },
5414};
5415
5416static struct cipher_testvec tf_xts_dec_tv_template[] = {
5417 /* Generated from AES-XTS test vectors */
5418 /* same as enc vectors with input and result reversed */
5419 {
5420 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
5421 "\x00\x00\x00\x00\x00\x00\x00\x00"
5422 "\x00\x00\x00\x00\x00\x00\x00\x00"
5423 "\x00\x00\x00\x00\x00\x00\x00\x00",
5424 .klen = 32,
5425 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5426 "\x00\x00\x00\x00\x00\x00\x00\x00",
5427 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
5428 "\x30\x74\xe4\x44\x52\x77\x97\x43"
5429 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
5430 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
5431 .ilen = 32,
5432 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5433 "\x00\x00\x00\x00\x00\x00\x00\x00"
5434 "\x00\x00\x00\x00\x00\x00\x00\x00"
5435 "\x00\x00\x00\x00\x00\x00\x00\x00",
5436 .rlen = 32,
5437 }, {
5438 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
5439 "\x11\x11\x11\x11\x11\x11\x11\x11"
5440 "\x22\x22\x22\x22\x22\x22\x22\x22"
5441 "\x22\x22\x22\x22\x22\x22\x22\x22",
5442 .klen = 32,
5443 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5444 "\x00\x00\x00\x00\x00\x00\x00\x00",
5445 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
5446 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
5447 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
5448 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
5449 .ilen = 32,
5450 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5451 "\x44\x44\x44\x44\x44\x44\x44\x44"
5452 "\x44\x44\x44\x44\x44\x44\x44\x44"
5453 "\x44\x44\x44\x44\x44\x44\x44\x44",
5454 .rlen = 32,
5455 }, {
5456 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5457 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5458 "\x22\x22\x22\x22\x22\x22\x22\x22"
5459 "\x22\x22\x22\x22\x22\x22\x22\x22",
5460 .klen = 32,
5461 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5462 "\x00\x00\x00\x00\x00\x00\x00\x00",
5463 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
5464 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
5465 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
5466 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
5467 .ilen = 32,
5468 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5469 "\x44\x44\x44\x44\x44\x44\x44\x44"
5470 "\x44\x44\x44\x44\x44\x44\x44\x44"
5471 "\x44\x44\x44\x44\x44\x44\x44\x44",
5472 .rlen = 32,
5473 }, {
5474 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5475 "\x23\x53\x60\x28\x74\x71\x35\x26"
5476 "\x31\x41\x59\x26\x53\x58\x97\x93"
5477 "\x23\x84\x62\x64\x33\x83\x27\x95",
5478 .klen = 32,
5479 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5480 "\x00\x00\x00\x00\x00\x00\x00\x00",
5481 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
5482 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
5483 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
5484 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
5485 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
5486 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
5487 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
5488 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
5489 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
5490 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
5491 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
5492 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
5493 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
5494 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
5495 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
5496 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
5497 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
5498 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
5499 "\x39\x80\x39\x09\x97\x65\xf2\x83"
5500 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
5501 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
5502 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
5503 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
5504 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
5505 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
5506 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
5507 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
5508 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
5509 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
5510 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
5511 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
5512 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
5513 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
5514 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
5515 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
5516 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
5517 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
5518 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
5519 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
5520 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
5521 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
5522 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
5523 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
5524 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
5525 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
5526 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
5527 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
5528 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
5529 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
5530 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
5531 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
5532 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
5533 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
5534 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
5535 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
5536 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
5537 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
5538 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
5539 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
5540 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
5541 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
5542 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
5543 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
5544 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
5545 .ilen = 512,
5546 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5547 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5548 "\x10\x11\x12\x13\x14\x15\x16\x17"
5549 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5550 "\x20\x21\x22\x23\x24\x25\x26\x27"
5551 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5552 "\x30\x31\x32\x33\x34\x35\x36\x37"
5553 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5554 "\x40\x41\x42\x43\x44\x45\x46\x47"
5555 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5556 "\x50\x51\x52\x53\x54\x55\x56\x57"
5557 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5558 "\x60\x61\x62\x63\x64\x65\x66\x67"
5559 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5560 "\x70\x71\x72\x73\x74\x75\x76\x77"
5561 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5562 "\x80\x81\x82\x83\x84\x85\x86\x87"
5563 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5564 "\x90\x91\x92\x93\x94\x95\x96\x97"
5565 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5566 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5567 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5568 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5569 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5570 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5571 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5572 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5573 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5574 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5575 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5576 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5577 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5578 "\x00\x01\x02\x03\x04\x05\x06\x07"
5579 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5580 "\x10\x11\x12\x13\x14\x15\x16\x17"
5581 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5582 "\x20\x21\x22\x23\x24\x25\x26\x27"
5583 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5584 "\x30\x31\x32\x33\x34\x35\x36\x37"
5585 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5586 "\x40\x41\x42\x43\x44\x45\x46\x47"
5587 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5588 "\x50\x51\x52\x53\x54\x55\x56\x57"
5589 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5590 "\x60\x61\x62\x63\x64\x65\x66\x67"
5591 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5592 "\x70\x71\x72\x73\x74\x75\x76\x77"
5593 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5594 "\x80\x81\x82\x83\x84\x85\x86\x87"
5595 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5596 "\x90\x91\x92\x93\x94\x95\x96\x97"
5597 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5598 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5599 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5600 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5601 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5602 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5603 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5604 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5605 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5606 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5607 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5608 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5609 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5610 .rlen = 512,
5611 }, {
5612 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5613 "\x23\x53\x60\x28\x74\x71\x35\x26"
5614 "\x62\x49\x77\x57\x24\x70\x93\x69"
5615 "\x99\x59\x57\x49\x66\x96\x76\x27"
5616 "\x31\x41\x59\x26\x53\x58\x97\x93"
5617 "\x23\x84\x62\x64\x33\x83\x27\x95"
5618 "\x02\x88\x41\x97\x16\x93\x99\x37"
5619 "\x51\x05\x82\x09\x74\x94\x45\x92",
5620 .klen = 64,
5621 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
5622 "\x00\x00\x00\x00\x00\x00\x00\x00",
5623 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
5624 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
5625 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
5626 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
5627 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
5628 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
5629 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
5630 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
5631 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
5632 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
5633 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
5634 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
5635 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
5636 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
5637 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
5638 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
5639 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
5640 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
5641 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
5642 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
5643 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
5644 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
5645 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
5646 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
5647 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
5648 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
5649 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
5650 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
5651 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
5652 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
5653 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
5654 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
5655 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
5656 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
5657 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
5658 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
5659 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
5660 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
5661 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
5662 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
5663 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
5664 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
5665 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
5666 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
5667 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
5668 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
5669 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
5670 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
5671 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
5672 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
5673 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
5674 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
5675 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
5676 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
5677 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
5678 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
5679 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
5680 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
5681 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
5682 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
5683 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
5684 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
5685 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
5686 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
5687 .ilen = 512,
5688 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5689 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5690 "\x10\x11\x12\x13\x14\x15\x16\x17"
5691 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5692 "\x20\x21\x22\x23\x24\x25\x26\x27"
5693 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5694 "\x30\x31\x32\x33\x34\x35\x36\x37"
5695 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5696 "\x40\x41\x42\x43\x44\x45\x46\x47"
5697 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5698 "\x50\x51\x52\x53\x54\x55\x56\x57"
5699 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5700 "\x60\x61\x62\x63\x64\x65\x66\x67"
5701 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5702 "\x70\x71\x72\x73\x74\x75\x76\x77"
5703 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5704 "\x80\x81\x82\x83\x84\x85\x86\x87"
5705 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5706 "\x90\x91\x92\x93\x94\x95\x96\x97"
5707 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5708 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5709 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5710 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5711 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5712 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5713 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5714 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5715 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5716 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5717 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5718 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5719 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5720 "\x00\x01\x02\x03\x04\x05\x06\x07"
5721 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5722 "\x10\x11\x12\x13\x14\x15\x16\x17"
5723 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5724 "\x20\x21\x22\x23\x24\x25\x26\x27"
5725 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5726 "\x30\x31\x32\x33\x34\x35\x36\x37"
5727 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5728 "\x40\x41\x42\x43\x44\x45\x46\x47"
5729 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5730 "\x50\x51\x52\x53\x54\x55\x56\x57"
5731 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5732 "\x60\x61\x62\x63\x64\x65\x66\x67"
5733 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5734 "\x70\x71\x72\x73\x74\x75\x76\x77"
5735 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5736 "\x80\x81\x82\x83\x84\x85\x86\x87"
5737 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5738 "\x90\x91\x92\x93\x94\x95\x96\x97"
5739 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5740 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5741 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5742 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5743 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5744 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5745 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5746 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5747 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5748 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5749 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5750 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5751 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5752 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005753 .also_non_np = 1,
5754 .np = 2,
5755 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005756 },
5757};
5758
Herbert Xuda7f0332008-07-31 17:08:25 +08005759/*
5760 * Serpent test vectors. These are backwards because Serpent writes
5761 * octet sequences in right-to-left mode.
5762 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03005763#define SERPENT_ENC_TEST_VECTORS 5
5764#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08005765
5766#define TNEPRES_ENC_TEST_VECTORS 4
5767#define TNEPRES_DEC_TEST_VECTORS 4
5768
Jussi Kivilinna9d259172011-10-18 00:02:53 +03005769#define SERPENT_CBC_ENC_TEST_VECTORS 1
5770#define SERPENT_CBC_DEC_TEST_VECTORS 1
5771
5772#define SERPENT_CTR_ENC_TEST_VECTORS 2
5773#define SERPENT_CTR_DEC_TEST_VECTORS 2
5774
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03005775#define SERPENT_LRW_ENC_TEST_VECTORS 8
5776#define SERPENT_LRW_DEC_TEST_VECTORS 8
5777
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03005778#define SERPENT_XTS_ENC_TEST_VECTORS 5
5779#define SERPENT_XTS_DEC_TEST_VECTORS 5
5780
Herbert Xuda7f0332008-07-31 17:08:25 +08005781static struct cipher_testvec serpent_enc_tv_template[] = {
5782 {
5783 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5784 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5785 .ilen = 16,
5786 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5787 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5788 .rlen = 16,
5789 }, {
5790 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5791 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5792 .klen = 16,
5793 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5794 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5795 .ilen = 16,
5796 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5797 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5798 .rlen = 16,
5799 }, {
5800 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5801 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5802 "\x10\x11\x12\x13\x14\x15\x16\x17"
5803 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5804 .klen = 32,
5805 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5806 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5807 .ilen = 16,
5808 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5809 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5810 .rlen = 16,
5811 }, {
5812 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5813 .klen = 16,
5814 .input = zeroed_string,
5815 .ilen = 16,
5816 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5817 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5818 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03005819 }, { /* Generated with Crypto++ */
5820 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5821 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5822 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5823 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5824 .klen = 32,
5825 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5826 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5827 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5828 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5829 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5830 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5831 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5832 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5833 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5834 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5835 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5836 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5837 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5838 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5839 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5840 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5841 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5842 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5843 .ilen = 144,
5844 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5845 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5846 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5847 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5848 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5849 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5850 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5851 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5852 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5853 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5854 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5855 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5856 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5857 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5858 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5859 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5860 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5861 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5862 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005863 .also_non_np = 1,
5864 .np = 2,
5865 .tap = { 144 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005866 },
5867};
5868
5869static struct cipher_testvec tnepres_enc_tv_template[] = {
5870 { /* KeySize=128, PT=0, I=1 */
5871 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5872 "\x00\x00\x00\x00\x00\x00\x00\x00",
5873 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5874 "\x00\x00\x00\x00\x00\x00\x00\x00",
5875 .klen = 16,
5876 .ilen = 16,
5877 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
5878 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
5879 .rlen = 16,
5880 }, { /* KeySize=192, PT=0, I=1 */
5881 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5882 "\x00\x00\x00\x00\x00\x00\x00\x00"
5883 "\x00\x00\x00\x00\x00\x00\x00\x00",
5884 .klen = 24,
5885 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5886 "\x00\x00\x00\x00\x00\x00\x00\x00",
5887 .ilen = 16,
5888 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
5889 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
5890 .rlen = 16,
5891 }, { /* KeySize=256, PT=0, I=1 */
5892 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5893 "\x00\x00\x00\x00\x00\x00\x00\x00"
5894 "\x00\x00\x00\x00\x00\x00\x00\x00"
5895 "\x00\x00\x00\x00\x00\x00\x00\x00",
5896 .klen = 32,
5897 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5898 "\x00\x00\x00\x00\x00\x00\x00\x00",
5899 .ilen = 16,
5900 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
5901 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
5902 .rlen = 16,
5903 }, { /* KeySize=256, I=257 */
5904 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
5905 "\x17\x16\x15\x14\x13\x12\x11\x10"
5906 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5907 "\x07\x06\x05\x04\x03\x02\x01\x00",
5908 .klen = 32,
5909 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5910 "\x07\x06\x05\x04\x03\x02\x01\x00",
5911 .ilen = 16,
5912 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
5913 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
5914 .rlen = 16,
5915 },
5916};
5917
5918
5919static struct cipher_testvec serpent_dec_tv_template[] = {
5920 {
5921 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5922 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5923 .ilen = 16,
5924 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5925 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5926 .rlen = 16,
5927 }, {
5928 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5929 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5930 .klen = 16,
5931 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5932 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5933 .ilen = 16,
5934 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5935 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5936 .rlen = 16,
5937 }, {
5938 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5939 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5940 "\x10\x11\x12\x13\x14\x15\x16\x17"
5941 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5942 .klen = 32,
5943 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5944 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5945 .ilen = 16,
5946 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5947 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5948 .rlen = 16,
5949 }, {
5950 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5951 .klen = 16,
5952 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5953 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5954 .ilen = 16,
5955 .result = zeroed_string,
5956 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03005957 }, { /* Generated with Crypto++ */
5958 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5959 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5960 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5961 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5962 .klen = 32,
5963 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5964 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5965 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5966 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5967 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5968 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5969 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5970 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5971 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5972 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5973 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5974 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5975 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5976 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5977 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5978 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5979 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5980 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5981 .ilen = 144,
5982 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5983 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5984 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5985 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5986 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5987 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5988 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5989 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5990 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5991 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5992 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5993 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5994 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5995 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5996 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5997 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5998 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5999 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6000 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006001 .also_non_np = 1,
6002 .np = 2,
6003 .tap = { 144 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006004 },
6005};
6006
6007static struct cipher_testvec tnepres_dec_tv_template[] = {
6008 {
6009 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
6010 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
6011 .ilen = 16,
6012 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6013 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6014 .rlen = 16,
6015 }, {
6016 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6017 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6018 .klen = 16,
6019 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
6020 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
6021 .ilen = 16,
6022 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6023 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6024 .rlen = 16,
6025 }, {
6026 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6027 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6028 "\x10\x11\x12\x13\x14\x15\x16\x17"
6029 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6030 .klen = 32,
6031 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
6032 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
6033 .ilen = 16,
6034 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6035 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6036 .rlen = 16,
6037 }, { /* KeySize=128, I=121 */
6038 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
6039 .klen = 16,
6040 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
6041 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
6042 .ilen = 16,
6043 .result = zeroed_string,
6044 .rlen = 16,
6045 },
6046};
6047
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006048static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
6049 { /* Generated with Crypto++ */
6050 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6051 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6052 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6053 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6054 .klen = 32,
6055 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6056 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6057 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6058 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6059 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6060 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6061 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6062 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6063 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6064 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6065 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6066 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6067 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6068 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6069 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6070 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6071 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6072 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6073 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6074 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6075 .ilen = 144,
6076 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
6077 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
6078 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
6079 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
6080 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
6081 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
6082 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
6083 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
6084 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
6085 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
6086 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
6087 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
6088 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
6089 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
6090 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
6091 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
6092 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
6093 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
6094 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006095 .also_non_np = 1,
6096 .np = 2,
6097 .tap = { 144 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006098 },
6099};
6100
6101static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
6102 { /* Generated with Crypto++ */
6103 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6104 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6105 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6106 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6107 .klen = 32,
6108 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6109 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6110 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
6111 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
6112 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
6113 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
6114 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
6115 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
6116 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
6117 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
6118 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
6119 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
6120 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
6121 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
6122 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
6123 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
6124 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
6125 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
6126 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
6127 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
6128 .ilen = 144,
6129 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6130 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6131 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6132 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6133 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6134 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6135 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6136 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6137 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6138 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6139 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6140 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6141 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6142 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6143 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6144 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6145 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6146 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6147 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006148 .also_non_np = 1,
6149 .np = 2,
6150 .tap = { 144 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006151 },
6152};
6153
6154static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
6155 { /* Generated with Crypto++ */
6156 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6157 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6158 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6159 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6160 .klen = 32,
6161 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6162 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6163 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6164 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6165 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6166 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6167 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6168 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6169 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6170 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6171 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6172 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6173 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6174 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6175 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6176 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6177 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6178 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6179 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6180 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6181 .ilen = 144,
6182 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6183 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6184 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6185 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6186 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6187 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6188 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6189 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6190 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6191 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6192 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6193 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6194 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6195 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6196 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6197 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6198 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6199 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
6200 .rlen = 144,
6201 }, { /* Generated with Crypto++ */
6202 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6203 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6204 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6205 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6206 .klen = 32,
6207 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6208 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6209 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6210 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6211 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6212 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6213 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6214 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6215 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6216 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6217 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6218 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6219 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6220 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6221 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6222 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6223 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6224 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6225 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6226 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6227 "\xF1\x65\xFC",
6228 .ilen = 147,
6229 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6230 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6231 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6232 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6233 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6234 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6235 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6236 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6237 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6238 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6239 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6240 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6241 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6242 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6243 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6244 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6245 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6246 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
6247 "\xE6\xD0\x97",
6248 .rlen = 147,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006249 .also_non_np = 1,
6250 .np = 2,
6251 .tap = { 147 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006252 }, { /* Generated with Crypto++ */
6253 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6254 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6255 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6256 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6257 .klen = 32,
6258 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6259 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6260 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6261 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6262 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6263 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6264 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6265 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6266 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6267 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6268 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6269 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6270 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6271 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6272 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6273 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6274 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6275 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6276 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6277 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6278 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6279 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6280 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6281 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6282 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6283 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6284 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6285 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6286 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6287 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6288 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6289 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6290 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6291 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6292 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6293 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6294 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6295 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6296 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6297 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6298 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6299 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6300 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6301 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6302 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6303 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6304 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6305 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6306 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6307 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6308 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6309 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6310 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6311 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6312 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6313 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6314 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6315 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6316 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6317 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6318 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6319 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6320 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6321 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6322 .ilen = 496,
6323 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
6324 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
6325 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
6326 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
6327 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
6328 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
6329 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
6330 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
6331 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
6332 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
6333 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
6334 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
6335 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
6336 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
6337 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
6338 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
6339 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
6340 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
6341 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
6342 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
6343 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
6344 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
6345 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
6346 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
6347 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
6348 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
6349 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
6350 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
6351 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
6352 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
6353 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
6354 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
6355 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
6356 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
6357 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
6358 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
6359 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
6360 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
6361 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
6362 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
6363 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
6364 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
6365 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
6366 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
6367 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
6368 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
6369 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
6370 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
6371 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
6372 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
6373 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
6374 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
6375 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
6376 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
6377 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
6378 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
6379 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
6380 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
6381 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
6382 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
6383 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
6384 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
6385 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006386 },
6387};
6388
6389static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
6390 { /* Generated with Crypto++ */
6391 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6392 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6393 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6394 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6395 .klen = 32,
6396 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6397 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6398 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6399 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6400 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6401 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6402 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6403 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6404 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6405 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6406 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6407 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6408 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6409 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6410 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6411 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6412 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6413 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6414 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6415 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
6416 .ilen = 144,
6417 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6418 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6419 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6420 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6421 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6422 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6423 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6424 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6425 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6426 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6427 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6428 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6429 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6430 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6431 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6432 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6433 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6434 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6435 .rlen = 144,
6436 }, { /* Generated with Crypto++ */
6437 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6438 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6439 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6440 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6441 .klen = 32,
6442 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6443 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6444 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6445 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6446 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6447 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6448 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6449 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6450 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6451 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6452 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6453 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6454 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6455 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6456 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6457 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6458 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6459 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6460 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6461 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
6462 "\xE6\xD0\x97",
6463 .ilen = 147,
6464 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6465 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6466 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6467 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6468 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6469 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6470 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6471 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6472 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6473 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6474 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6475 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6476 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6477 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6478 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6479 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6480 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6481 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6482 "\xF1\x65\xFC",
6483 .rlen = 147,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006484 .also_non_np = 1,
6485 .np = 2,
6486 .tap = { 147 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006487 }, { /* Generated with Crypto++ */
6488 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6489 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6490 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6491 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6492 .klen = 32,
6493 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6494 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6495 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
6496 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
6497 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
6498 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
6499 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
6500 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
6501 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
6502 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
6503 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
6504 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
6505 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
6506 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
6507 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
6508 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
6509 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
6510 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
6511 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
6512 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
6513 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
6514 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
6515 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
6516 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
6517 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
6518 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
6519 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
6520 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
6521 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
6522 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
6523 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
6524 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
6525 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
6526 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
6527 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
6528 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
6529 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
6530 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
6531 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
6532 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
6533 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
6534 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
6535 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
6536 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
6537 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
6538 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
6539 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
6540 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
6541 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
6542 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
6543 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
6544 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
6545 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
6546 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
6547 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
6548 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
6549 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
6550 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
6551 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
6552 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
6553 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
6554 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
6555 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
6556 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
6557 .ilen = 496,
6558 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6559 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6560 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6561 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6562 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6563 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6564 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6565 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6566 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6567 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6568 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6569 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6570 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6571 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6572 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6573 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6574 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6575 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6576 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6577 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6578 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6579 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6580 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6581 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6582 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6583 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6584 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6585 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6586 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6587 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6588 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6589 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6590 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6591 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6592 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6593 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6594 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6595 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6596 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6597 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6598 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6599 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6600 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6601 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6602 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6603 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6604 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6605 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6606 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6607 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6608 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6609 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6610 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6611 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6612 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6613 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6614 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6615 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6616 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6617 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6618 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6619 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6620 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006621 },
6622};
Herbert Xuda7f0332008-07-31 17:08:25 +08006623
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03006624static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
6625 /* Generated from AES-LRW test vectors */
6626 {
6627 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6628 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6629 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6630 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6631 .klen = 32,
6632 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6633 "\x00\x00\x00\x00\x00\x00\x00\x01",
6634 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6635 "\x38\x39\x41\x42\x43\x44\x45\x46",
6636 .ilen = 16,
6637 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
6638 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
6639 .rlen = 16,
6640 }, {
6641 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6642 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6643 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6644 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6645 .klen = 32,
6646 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6647 "\x00\x00\x00\x00\x00\x00\x00\x02",
6648 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6649 "\x38\x39\x41\x42\x43\x44\x45\x46",
6650 .ilen = 16,
6651 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
6652 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
6653 .rlen = 16,
6654 }, {
6655 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6656 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6657 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6658 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6659 .klen = 32,
6660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6661 "\x00\x00\x00\x02\x00\x00\x00\x00",
6662 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6663 "\x38\x39\x41\x42\x43\x44\x45\x46",
6664 .ilen = 16,
6665 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
6666 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
6667 .rlen = 16,
6668 }, {
6669 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6670 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6671 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6672 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6673 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6674 .klen = 40,
6675 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6676 "\x00\x00\x00\x00\x00\x00\x00\x01",
6677 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6678 "\x38\x39\x41\x42\x43\x44\x45\x46",
6679 .ilen = 16,
6680 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
6681 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
6682 .rlen = 16,
6683 }, {
6684 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6685 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6686 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6687 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6688 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6689 .klen = 40,
6690 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6691 "\x00\x00\x00\x02\x00\x00\x00\x00",
6692 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6693 "\x38\x39\x41\x42\x43\x44\x45\x46",
6694 .ilen = 16,
6695 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
6696 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
6697 .rlen = 16,
6698 }, {
6699 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6700 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6701 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6702 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6703 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6704 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6705 .klen = 48,
6706 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6707 "\x00\x00\x00\x00\x00\x00\x00\x01",
6708 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6709 "\x38\x39\x41\x42\x43\x44\x45\x46",
6710 .ilen = 16,
6711 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
6712 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
6713 .rlen = 16,
6714 }, {
6715 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6716 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6717 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6718 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6719 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6720 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6721 .klen = 48,
6722 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6723 "\x00\x00\x00\x02\x00\x00\x00\x00",
6724 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
6725 "\x38\x39\x41\x42\x43\x44\x45\x46",
6726 .ilen = 16,
6727 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
6728 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
6729 .rlen = 16,
6730 }, {
6731 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6732 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6733 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6734 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6735 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6736 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6737 .klen = 48,
6738 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6739 "\x00\x00\x00\x00\x00\x00\x00\x01",
6740 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6741 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6742 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6743 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6744 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6745 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6746 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6747 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6748 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6749 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6750 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6751 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6752 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6753 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6754 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6755 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6756 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6757 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6758 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6759 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6760 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6761 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6762 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6763 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6764 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6765 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6766 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6767 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6768 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6769 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6770 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6771 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6772 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6773 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6774 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6775 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6776 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6777 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6778 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6779 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6780 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6781 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6782 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6783 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6784 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6785 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6786 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6787 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6788 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6789 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6790 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6791 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6792 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6793 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6794 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6795 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6796 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6797 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6798 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6799 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6800 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6801 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6802 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6803 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6804 .ilen = 512,
6805 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
6806 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
6807 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
6808 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
6809 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
6810 "\xce\xab\xda\x33\x30\x20\x12\xfa"
6811 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
6812 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
6813 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
6814 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
6815 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
6816 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
6817 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
6818 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
6819 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
6820 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
6821 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
6822 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
6823 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
6824 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
6825 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
6826 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
6827 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
6828 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
6829 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
6830 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
6831 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
6832 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
6833 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
6834 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
6835 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
6836 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
6837 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
6838 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
6839 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
6840 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
6841 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
6842 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
6843 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
6844 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
6845 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
6846 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
6847 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
6848 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
6849 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
6850 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
6851 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
6852 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
6853 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
6854 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
6855 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
6856 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
6857 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
6858 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
6859 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
6860 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
6861 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
6862 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
6863 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
6864 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
6865 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
6866 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
6867 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
6868 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
6869 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006870 .also_non_np = 1,
6871 .np = 2,
6872 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03006873 },
6874};
6875
6876static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
6877 /* Generated from AES-LRW test vectors */
6878 /* same as enc vectors with input and result reversed */
6879 {
6880 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6881 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6882 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6883 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6884 .klen = 32,
6885 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6886 "\x00\x00\x00\x00\x00\x00\x00\x01",
6887 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
6888 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
6889 .ilen = 16,
6890 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6891 "\x38\x39\x41\x42\x43\x44\x45\x46",
6892 .rlen = 16,
6893 }, {
6894 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6895 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6896 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6897 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6898 .klen = 32,
6899 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6900 "\x00\x00\x00\x00\x00\x00\x00\x02",
6901 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
6902 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
6903 .ilen = 16,
6904 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6905 "\x38\x39\x41\x42\x43\x44\x45\x46",
6906 .rlen = 16,
6907 }, {
6908 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6909 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6910 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6911 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6912 .klen = 32,
6913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6914 "\x00\x00\x00\x02\x00\x00\x00\x00",
6915 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
6916 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
6917 .ilen = 16,
6918 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6919 "\x38\x39\x41\x42\x43\x44\x45\x46",
6920 .rlen = 16,
6921 }, {
6922 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6923 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6924 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6925 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6926 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6927 .klen = 40,
6928 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6929 "\x00\x00\x00\x00\x00\x00\x00\x01",
6930 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
6931 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
6932 .ilen = 16,
6933 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6934 "\x38\x39\x41\x42\x43\x44\x45\x46",
6935 .rlen = 16,
6936 }, {
6937 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6938 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6939 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6940 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6941 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6942 .klen = 40,
6943 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6944 "\x00\x00\x00\x02\x00\x00\x00\x00",
6945 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
6946 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
6947 .ilen = 16,
6948 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6949 "\x38\x39\x41\x42\x43\x44\x45\x46",
6950 .rlen = 16,
6951 }, {
6952 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6953 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6954 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6955 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6956 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6957 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6958 .klen = 48,
6959 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6960 "\x00\x00\x00\x00\x00\x00\x00\x01",
6961 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
6962 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
6963 .ilen = 16,
6964 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6965 "\x38\x39\x41\x42\x43\x44\x45\x46",
6966 .rlen = 16,
6967 }, {
6968 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6969 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6970 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6971 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6972 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6973 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6974 .klen = 48,
6975 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6976 "\x00\x00\x00\x02\x00\x00\x00\x00",
6977 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
6978 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
6979 .ilen = 16,
6980 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6981 "\x38\x39\x41\x42\x43\x44\x45\x46",
6982 .rlen = 16,
6983 }, {
6984 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6985 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6986 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6987 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6988 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6989 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6990 .klen = 48,
6991 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6992 "\x00\x00\x00\x00\x00\x00\x00\x01",
6993 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
6994 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
6995 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
6996 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
6997 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
6998 "\xce\xab\xda\x33\x30\x20\x12\xfa"
6999 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
7000 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
7001 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
7002 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
7003 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
7004 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
7005 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
7006 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
7007 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
7008 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
7009 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
7010 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
7011 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
7012 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
7013 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
7014 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
7015 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
7016 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
7017 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
7018 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
7019 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
7020 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
7021 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
7022 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
7023 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
7024 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
7025 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
7026 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
7027 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
7028 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
7029 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
7030 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
7031 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
7032 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
7033 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
7034 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
7035 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
7036 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
7037 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
7038 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
7039 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
7040 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
7041 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
7042 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
7043 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
7044 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
7045 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
7046 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
7047 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
7048 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
7049 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
7050 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
7051 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
7052 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
7053 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
7054 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
7055 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
7056 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
7057 .ilen = 512,
7058 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7059 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7060 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7061 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7062 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7063 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7064 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7065 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7066 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7067 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7068 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7069 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7070 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7071 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7072 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7073 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7074 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7075 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7076 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7077 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7078 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7079 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7080 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7081 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7082 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7083 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7084 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7085 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7086 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7087 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7088 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7089 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7090 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7091 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7092 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7093 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7094 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7095 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7096 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7097 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7098 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7099 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7100 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7101 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7102 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7103 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7104 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7105 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7106 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7107 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7108 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7109 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7110 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7111 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7112 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7113 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7114 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7115 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7116 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7117 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7118 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7119 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7120 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7121 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7122 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007123 .also_non_np = 1,
7124 .np = 2,
7125 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03007126 },
7127};
7128
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03007129static struct cipher_testvec serpent_xts_enc_tv_template[] = {
7130 /* Generated from AES-XTS test vectors */
7131 {
7132 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
7133 "\x00\x00\x00\x00\x00\x00\x00\x00"
7134 "\x00\x00\x00\x00\x00\x00\x00\x00"
7135 "\x00\x00\x00\x00\x00\x00\x00\x00",
7136 .klen = 32,
7137 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7138 "\x00\x00\x00\x00\x00\x00\x00\x00",
7139 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
7140 "\x00\x00\x00\x00\x00\x00\x00\x00"
7141 "\x00\x00\x00\x00\x00\x00\x00\x00"
7142 "\x00\x00\x00\x00\x00\x00\x00\x00",
7143 .ilen = 32,
7144 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
7145 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
7146 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
7147 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
7148 .rlen = 32,
7149 }, {
7150 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
7151 "\x11\x11\x11\x11\x11\x11\x11\x11"
7152 "\x22\x22\x22\x22\x22\x22\x22\x22"
7153 "\x22\x22\x22\x22\x22\x22\x22\x22",
7154 .klen = 32,
7155 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7156 "\x00\x00\x00\x00\x00\x00\x00\x00",
7157 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7158 "\x44\x44\x44\x44\x44\x44\x44\x44"
7159 "\x44\x44\x44\x44\x44\x44\x44\x44"
7160 "\x44\x44\x44\x44\x44\x44\x44\x44",
7161 .ilen = 32,
7162 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
7163 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
7164 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
7165 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
7166 .rlen = 32,
7167 }, {
7168 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7169 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7170 "\x22\x22\x22\x22\x22\x22\x22\x22"
7171 "\x22\x22\x22\x22\x22\x22\x22\x22",
7172 .klen = 32,
7173 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7174 "\x00\x00\x00\x00\x00\x00\x00\x00",
7175 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7176 "\x44\x44\x44\x44\x44\x44\x44\x44"
7177 "\x44\x44\x44\x44\x44\x44\x44\x44"
7178 "\x44\x44\x44\x44\x44\x44\x44\x44",
7179 .ilen = 32,
7180 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
7181 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
7182 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
7183 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
7184 .rlen = 32,
7185 }, {
7186 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7187 "\x23\x53\x60\x28\x74\x71\x35\x26"
7188 "\x31\x41\x59\x26\x53\x58\x97\x93"
7189 "\x23\x84\x62\x64\x33\x83\x27\x95",
7190 .klen = 32,
7191 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7192 "\x00\x00\x00\x00\x00\x00\x00\x00",
7193 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7194 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7195 "\x10\x11\x12\x13\x14\x15\x16\x17"
7196 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7197 "\x20\x21\x22\x23\x24\x25\x26\x27"
7198 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7199 "\x30\x31\x32\x33\x34\x35\x36\x37"
7200 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7201 "\x40\x41\x42\x43\x44\x45\x46\x47"
7202 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7203 "\x50\x51\x52\x53\x54\x55\x56\x57"
7204 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7205 "\x60\x61\x62\x63\x64\x65\x66\x67"
7206 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7207 "\x70\x71\x72\x73\x74\x75\x76\x77"
7208 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7209 "\x80\x81\x82\x83\x84\x85\x86\x87"
7210 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7211 "\x90\x91\x92\x93\x94\x95\x96\x97"
7212 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7213 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7214 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7215 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7216 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7217 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7218 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7219 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7220 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7221 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7222 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7223 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7224 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7225 "\x00\x01\x02\x03\x04\x05\x06\x07"
7226 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7227 "\x10\x11\x12\x13\x14\x15\x16\x17"
7228 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7229 "\x20\x21\x22\x23\x24\x25\x26\x27"
7230 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7231 "\x30\x31\x32\x33\x34\x35\x36\x37"
7232 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7233 "\x40\x41\x42\x43\x44\x45\x46\x47"
7234 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7235 "\x50\x51\x52\x53\x54\x55\x56\x57"
7236 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7237 "\x60\x61\x62\x63\x64\x65\x66\x67"
7238 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7239 "\x70\x71\x72\x73\x74\x75\x76\x77"
7240 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7241 "\x80\x81\x82\x83\x84\x85\x86\x87"
7242 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7243 "\x90\x91\x92\x93\x94\x95\x96\x97"
7244 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7245 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7246 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7247 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7248 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7249 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7250 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7251 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7252 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7253 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7254 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7255 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7256 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7257 .ilen = 512,
7258 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
7259 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
7260 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
7261 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
7262 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
7263 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
7264 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
7265 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
7266 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
7267 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
7268 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
7269 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
7270 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
7271 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
7272 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
7273 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
7274 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
7275 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
7276 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
7277 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
7278 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
7279 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
7280 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
7281 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
7282 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
7283 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
7284 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
7285 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
7286 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
7287 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
7288 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
7289 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
7290 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
7291 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
7292 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
7293 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
7294 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
7295 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
7296 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
7297 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
7298 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
7299 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
7300 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
7301 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
7302 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
7303 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
7304 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
7305 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
7306 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
7307 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
7308 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
7309 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
7310 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
7311 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
7312 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
7313 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
7314 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
7315 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
7316 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
7317 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
7318 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
7319 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
7320 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
7321 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
7322 .rlen = 512,
7323 }, {
7324 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7325 "\x23\x53\x60\x28\x74\x71\x35\x26"
7326 "\x62\x49\x77\x57\x24\x70\x93\x69"
7327 "\x99\x59\x57\x49\x66\x96\x76\x27"
7328 "\x31\x41\x59\x26\x53\x58\x97\x93"
7329 "\x23\x84\x62\x64\x33\x83\x27\x95"
7330 "\x02\x88\x41\x97\x16\x93\x99\x37"
7331 "\x51\x05\x82\x09\x74\x94\x45\x92",
7332 .klen = 64,
7333 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
7334 "\x00\x00\x00\x00\x00\x00\x00\x00",
7335 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7336 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7337 "\x10\x11\x12\x13\x14\x15\x16\x17"
7338 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7339 "\x20\x21\x22\x23\x24\x25\x26\x27"
7340 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7341 "\x30\x31\x32\x33\x34\x35\x36\x37"
7342 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7343 "\x40\x41\x42\x43\x44\x45\x46\x47"
7344 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7345 "\x50\x51\x52\x53\x54\x55\x56\x57"
7346 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7347 "\x60\x61\x62\x63\x64\x65\x66\x67"
7348 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7349 "\x70\x71\x72\x73\x74\x75\x76\x77"
7350 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7351 "\x80\x81\x82\x83\x84\x85\x86\x87"
7352 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7353 "\x90\x91\x92\x93\x94\x95\x96\x97"
7354 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7355 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7356 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7357 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7358 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7359 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7360 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7361 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7362 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7363 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7364 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7365 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7366 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7367 "\x00\x01\x02\x03\x04\x05\x06\x07"
7368 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7369 "\x10\x11\x12\x13\x14\x15\x16\x17"
7370 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7371 "\x20\x21\x22\x23\x24\x25\x26\x27"
7372 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7373 "\x30\x31\x32\x33\x34\x35\x36\x37"
7374 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7375 "\x40\x41\x42\x43\x44\x45\x46\x47"
7376 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7377 "\x50\x51\x52\x53\x54\x55\x56\x57"
7378 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7379 "\x60\x61\x62\x63\x64\x65\x66\x67"
7380 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7381 "\x70\x71\x72\x73\x74\x75\x76\x77"
7382 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7383 "\x80\x81\x82\x83\x84\x85\x86\x87"
7384 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7385 "\x90\x91\x92\x93\x94\x95\x96\x97"
7386 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7387 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7388 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7389 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7390 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7391 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7392 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7393 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7394 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7395 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7396 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7397 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7398 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7399 .ilen = 512,
7400 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
7401 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
7402 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
7403 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
7404 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
7405 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
7406 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
7407 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
7408 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
7409 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
7410 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
7411 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
7412 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
7413 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
7414 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
7415 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
7416 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
7417 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
7418 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
7419 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
7420 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
7421 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
7422 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
7423 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
7424 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
7425 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
7426 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
7427 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
7428 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
7429 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
7430 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
7431 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
7432 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
7433 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
7434 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
7435 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
7436 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
7437 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
7438 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
7439 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
7440 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
7441 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
7442 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
7443 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
7444 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
7445 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
7446 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
7447 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
7448 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
7449 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
7450 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
7451 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
7452 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
7453 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
7454 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
7455 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
7456 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
7457 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
7458 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
7459 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
7460 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
7461 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
7462 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
7463 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
7464 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007465 .also_non_np = 1,
7466 .np = 2,
7467 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03007468 },
7469};
7470
7471static struct cipher_testvec serpent_xts_dec_tv_template[] = {
7472 /* Generated from AES-XTS test vectors */
7473 /* same as enc vectors with input and result reversed */
7474 {
7475 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
7476 "\x00\x00\x00\x00\x00\x00\x00\x00"
7477 "\x00\x00\x00\x00\x00\x00\x00\x00"
7478 "\x00\x00\x00\x00\x00\x00\x00\x00",
7479 .klen = 32,
7480 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7481 "\x00\x00\x00\x00\x00\x00\x00\x00",
7482 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
7483 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
7484 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
7485 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
7486 .ilen = 32,
7487 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
7488 "\x00\x00\x00\x00\x00\x00\x00\x00"
7489 "\x00\x00\x00\x00\x00\x00\x00\x00"
7490 "\x00\x00\x00\x00\x00\x00\x00\x00",
7491 .rlen = 32,
7492 }, {
7493 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
7494 "\x11\x11\x11\x11\x11\x11\x11\x11"
7495 "\x22\x22\x22\x22\x22\x22\x22\x22"
7496 "\x22\x22\x22\x22\x22\x22\x22\x22",
7497 .klen = 32,
7498 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7499 "\x00\x00\x00\x00\x00\x00\x00\x00",
7500 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
7501 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
7502 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
7503 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
7504 .ilen = 32,
7505 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
7506 "\x44\x44\x44\x44\x44\x44\x44\x44"
7507 "\x44\x44\x44\x44\x44\x44\x44\x44"
7508 "\x44\x44\x44\x44\x44\x44\x44\x44",
7509 .rlen = 32,
7510 }, {
7511 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7512 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7513 "\x22\x22\x22\x22\x22\x22\x22\x22"
7514 "\x22\x22\x22\x22\x22\x22\x22\x22",
7515 .klen = 32,
7516 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7517 "\x00\x00\x00\x00\x00\x00\x00\x00",
7518 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
7519 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
7520 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
7521 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
7522 .ilen = 32,
7523 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
7524 "\x44\x44\x44\x44\x44\x44\x44\x44"
7525 "\x44\x44\x44\x44\x44\x44\x44\x44"
7526 "\x44\x44\x44\x44\x44\x44\x44\x44",
7527 .rlen = 32,
7528 }, {
7529 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7530 "\x23\x53\x60\x28\x74\x71\x35\x26"
7531 "\x31\x41\x59\x26\x53\x58\x97\x93"
7532 "\x23\x84\x62\x64\x33\x83\x27\x95",
7533 .klen = 32,
7534 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7535 "\x00\x00\x00\x00\x00\x00\x00\x00",
7536 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
7537 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
7538 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
7539 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
7540 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
7541 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
7542 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
7543 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
7544 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
7545 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
7546 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
7547 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
7548 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
7549 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
7550 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
7551 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
7552 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
7553 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
7554 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
7555 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
7556 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
7557 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
7558 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
7559 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
7560 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
7561 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
7562 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
7563 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
7564 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
7565 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
7566 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
7567 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
7568 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
7569 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
7570 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
7571 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
7572 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
7573 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
7574 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
7575 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
7576 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
7577 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
7578 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
7579 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
7580 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
7581 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
7582 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
7583 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
7584 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
7585 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
7586 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
7587 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
7588 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
7589 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
7590 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
7591 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
7592 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
7593 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
7594 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
7595 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
7596 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
7597 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
7598 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
7599 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
7600 .ilen = 512,
7601 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7602 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7603 "\x10\x11\x12\x13\x14\x15\x16\x17"
7604 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7605 "\x20\x21\x22\x23\x24\x25\x26\x27"
7606 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7607 "\x30\x31\x32\x33\x34\x35\x36\x37"
7608 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7609 "\x40\x41\x42\x43\x44\x45\x46\x47"
7610 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7611 "\x50\x51\x52\x53\x54\x55\x56\x57"
7612 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7613 "\x60\x61\x62\x63\x64\x65\x66\x67"
7614 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7615 "\x70\x71\x72\x73\x74\x75\x76\x77"
7616 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7617 "\x80\x81\x82\x83\x84\x85\x86\x87"
7618 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7619 "\x90\x91\x92\x93\x94\x95\x96\x97"
7620 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7621 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7622 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7623 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7624 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7625 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7626 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7627 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7628 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7629 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7630 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7631 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7632 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7633 "\x00\x01\x02\x03\x04\x05\x06\x07"
7634 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7635 "\x10\x11\x12\x13\x14\x15\x16\x17"
7636 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7637 "\x20\x21\x22\x23\x24\x25\x26\x27"
7638 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7639 "\x30\x31\x32\x33\x34\x35\x36\x37"
7640 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7641 "\x40\x41\x42\x43\x44\x45\x46\x47"
7642 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7643 "\x50\x51\x52\x53\x54\x55\x56\x57"
7644 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7645 "\x60\x61\x62\x63\x64\x65\x66\x67"
7646 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7647 "\x70\x71\x72\x73\x74\x75\x76\x77"
7648 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7649 "\x80\x81\x82\x83\x84\x85\x86\x87"
7650 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7651 "\x90\x91\x92\x93\x94\x95\x96\x97"
7652 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7653 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7654 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7655 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7656 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7657 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7658 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7659 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7660 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7661 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7662 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7663 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7664 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7665 .rlen = 512,
7666 }, {
7667 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7668 "\x23\x53\x60\x28\x74\x71\x35\x26"
7669 "\x62\x49\x77\x57\x24\x70\x93\x69"
7670 "\x99\x59\x57\x49\x66\x96\x76\x27"
7671 "\x31\x41\x59\x26\x53\x58\x97\x93"
7672 "\x23\x84\x62\x64\x33\x83\x27\x95"
7673 "\x02\x88\x41\x97\x16\x93\x99\x37"
7674 "\x51\x05\x82\x09\x74\x94\x45\x92",
7675 .klen = 64,
7676 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
7677 "\x00\x00\x00\x00\x00\x00\x00\x00",
7678 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
7679 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
7680 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
7681 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
7682 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
7683 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
7684 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
7685 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
7686 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
7687 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
7688 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
7689 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
7690 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
7691 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
7692 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
7693 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
7694 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
7695 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
7696 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
7697 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
7698 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
7699 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
7700 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
7701 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
7702 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
7703 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
7704 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
7705 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
7706 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
7707 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
7708 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
7709 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
7710 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
7711 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
7712 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
7713 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
7714 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
7715 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
7716 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
7717 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
7718 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
7719 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
7720 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
7721 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
7722 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
7723 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
7724 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
7725 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
7726 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
7727 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
7728 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
7729 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
7730 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
7731 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
7732 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
7733 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
7734 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
7735 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
7736 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
7737 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
7738 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
7739 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
7740 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
7741 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
7742 .ilen = 512,
7743 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7744 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7745 "\x10\x11\x12\x13\x14\x15\x16\x17"
7746 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7747 "\x20\x21\x22\x23\x24\x25\x26\x27"
7748 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7749 "\x30\x31\x32\x33\x34\x35\x36\x37"
7750 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7751 "\x40\x41\x42\x43\x44\x45\x46\x47"
7752 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7753 "\x50\x51\x52\x53\x54\x55\x56\x57"
7754 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7755 "\x60\x61\x62\x63\x64\x65\x66\x67"
7756 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7757 "\x70\x71\x72\x73\x74\x75\x76\x77"
7758 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7759 "\x80\x81\x82\x83\x84\x85\x86\x87"
7760 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7761 "\x90\x91\x92\x93\x94\x95\x96\x97"
7762 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7763 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7764 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7765 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7766 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7767 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7768 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7769 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7770 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7771 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7772 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7773 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7774 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7775 "\x00\x01\x02\x03\x04\x05\x06\x07"
7776 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7777 "\x10\x11\x12\x13\x14\x15\x16\x17"
7778 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7779 "\x20\x21\x22\x23\x24\x25\x26\x27"
7780 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7781 "\x30\x31\x32\x33\x34\x35\x36\x37"
7782 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7783 "\x40\x41\x42\x43\x44\x45\x46\x47"
7784 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7785 "\x50\x51\x52\x53\x54\x55\x56\x57"
7786 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7787 "\x60\x61\x62\x63\x64\x65\x66\x67"
7788 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7789 "\x70\x71\x72\x73\x74\x75\x76\x77"
7790 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7791 "\x80\x81\x82\x83\x84\x85\x86\x87"
7792 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7793 "\x90\x91\x92\x93\x94\x95\x96\x97"
7794 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7795 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7796 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7797 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7798 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7799 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7800 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7801 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7802 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7803 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7804 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7805 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7806 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7807 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007808 .also_non_np = 1,
7809 .np = 2,
7810 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03007811 },
7812};
7813
Herbert Xuda7f0332008-07-31 17:08:25 +08007814/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02007815#define CAST6_ENC_TEST_VECTORS 4
7816#define CAST6_DEC_TEST_VECTORS 4
7817#define CAST6_CBC_ENC_TEST_VECTORS 1
7818#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03007819#define CAST6_CTR_ENC_TEST_VECTORS 2
7820#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02007821#define CAST6_LRW_ENC_TEST_VECTORS 1
7822#define CAST6_LRW_DEC_TEST_VECTORS 1
7823#define CAST6_XTS_ENC_TEST_VECTORS 1
7824#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +08007825
7826static struct cipher_testvec cast6_enc_tv_template[] = {
7827 {
7828 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7829 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
7830 .klen = 16,
7831 .input = zeroed_string,
7832 .ilen = 16,
7833 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
7834 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
7835 .rlen = 16,
7836 }, {
7837 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7838 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7839 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
7840 .klen = 24,
7841 .input = zeroed_string,
7842 .ilen = 16,
7843 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
7844 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
7845 .rlen = 16,
7846 }, {
7847 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7848 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7849 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
7850 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
7851 .klen = 32,
7852 .input = zeroed_string,
7853 .ilen = 16,
7854 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
7855 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
7856 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02007857 }, { /* Generated from TF test vectors */
7858 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7859 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7860 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7861 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7862 .klen = 32,
7863 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7864 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7865 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7866 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7867 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7868 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7869 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7870 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7871 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7872 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7873 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7874 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7875 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7876 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7877 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7878 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7879 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7880 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7881 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7882 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7883 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7884 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7885 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7886 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7887 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7888 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7889 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7890 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7891 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7892 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7893 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7894 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7895 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7896 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7897 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7898 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7899 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7900 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7901 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7902 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7903 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7904 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7905 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7906 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7907 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7908 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7909 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7910 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7911 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7912 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7913 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7914 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7915 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7916 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7917 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7918 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7919 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7920 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7921 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7922 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7923 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7924 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7925 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7926 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7927 .ilen = 496,
7928 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
7929 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
7930 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
7931 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
7932 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
7933 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
7934 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
7935 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
7936 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
7937 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
7938 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
7939 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
7940 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
7941 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
7942 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
7943 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
7944 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
7945 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
7946 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
7947 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
7948 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
7949 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
7950 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
7951 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
7952 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
7953 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
7954 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
7955 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
7956 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
7957 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
7958 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
7959 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
7960 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
7961 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
7962 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
7963 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
7964 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
7965 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
7966 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
7967 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
7968 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
7969 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
7970 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
7971 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
7972 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
7973 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
7974 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
7975 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
7976 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
7977 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
7978 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
7979 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
7980 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
7981 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
7982 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
7983 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
7984 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
7985 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
7986 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
7987 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
7988 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
7989 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
7990 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007991 .also_non_np = 1,
7992 .np = 2,
7993 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007994 },
7995};
7996
7997static struct cipher_testvec cast6_dec_tv_template[] = {
7998 {
7999 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8000 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
8001 .klen = 16,
8002 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
8003 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
8004 .ilen = 16,
8005 .result = zeroed_string,
8006 .rlen = 16,
8007 }, {
8008 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8009 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8010 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
8011 .klen = 24,
8012 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
8013 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
8014 .ilen = 16,
8015 .result = zeroed_string,
8016 .rlen = 16,
8017 }, {
8018 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8019 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8020 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
8021 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
8022 .klen = 32,
8023 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
8024 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
8025 .ilen = 16,
8026 .result = zeroed_string,
8027 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008028 }, { /* Generated from TF test vectors */
8029 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8030 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8031 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8032 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8033 .klen = 32,
8034 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8035 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8036 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
8037 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
8038 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
8039 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
8040 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
8041 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
8042 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
8043 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
8044 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
8045 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
8046 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
8047 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
8048 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
8049 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
8050 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
8051 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
8052 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
8053 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
8054 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
8055 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
8056 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
8057 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
8058 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
8059 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
8060 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
8061 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
8062 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
8063 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
8064 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
8065 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
8066 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
8067 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
8068 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
8069 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
8070 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
8071 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
8072 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
8073 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
8074 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
8075 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
8076 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
8077 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
8078 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
8079 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
8080 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
8081 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
8082 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
8083 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
8084 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
8085 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
8086 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
8087 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
8088 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
8089 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
8090 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
8091 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
8092 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
8093 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
8094 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
8095 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
8096 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
8097 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
8098 .ilen = 496,
8099 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8100 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8101 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8102 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8103 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8104 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8105 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8106 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8107 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8108 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8109 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8110 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8111 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8112 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8113 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8114 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8115 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8116 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8117 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8118 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8119 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8120 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8121 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8122 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8123 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8124 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8125 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8126 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8127 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8128 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8129 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8130 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8131 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8132 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8133 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8134 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8135 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8136 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8137 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8138 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8139 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8140 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8141 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8142 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8143 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8144 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8145 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8146 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8147 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8148 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8149 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8150 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8151 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8152 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8153 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8154 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8155 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8156 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8157 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8158 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8159 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8160 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8161 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008162 .also_non_np = 1,
8163 .np = 2,
8164 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008165 },
8166};
8167
8168static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
8169 { /* Generated from TF test vectors */
8170 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8171 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8172 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8173 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8174 .klen = 32,
8175 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8176 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8177 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8178 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8179 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8180 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8181 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8182 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8183 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8184 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8185 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8186 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8187 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8188 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8189 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8190 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8191 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8192 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8193 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8194 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8195 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8196 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8197 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8198 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8199 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8200 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8201 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8202 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8203 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8204 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8205 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8206 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8207 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8208 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8209 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8210 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8211 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8212 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8213 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8214 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8215 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8216 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8217 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8218 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8219 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8220 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8221 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8222 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8223 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8224 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8225 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8226 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8227 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8228 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8229 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8230 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8231 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8232 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8233 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8234 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8235 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8236 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8237 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8238 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8239 .ilen = 496,
8240 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
8241 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
8242 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
8243 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
8244 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
8245 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
8246 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
8247 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
8248 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
8249 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
8250 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
8251 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
8252 "\x23\x16\x47\x72\x81\x13\x3A\x72"
8253 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
8254 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
8255 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
8256 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
8257 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
8258 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
8259 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
8260 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
8261 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
8262 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
8263 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
8264 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
8265 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
8266 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
8267 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
8268 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
8269 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
8270 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
8271 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
8272 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
8273 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
8274 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
8275 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
8276 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
8277 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
8278 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
8279 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
8280 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
8281 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
8282 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
8283 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
8284 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
8285 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
8286 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
8287 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
8288 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
8289 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
8290 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
8291 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
8292 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
8293 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
8294 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
8295 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
8296 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
8297 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
8298 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
8299 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
8300 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
8301 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
8302 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008303 .also_non_np = 1,
8304 .np = 2,
8305 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008306 },
8307};
8308
8309static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
8310 { /* Generated from TF test vectors */
8311 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8312 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8313 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8314 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8315 .klen = 32,
8316 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8317 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8318 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
8319 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
8320 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
8321 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
8322 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
8323 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
8324 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
8325 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
8326 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
8327 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
8328 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
8329 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
8330 "\x23\x16\x47\x72\x81\x13\x3A\x72"
8331 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
8332 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
8333 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
8334 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
8335 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
8336 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
8337 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
8338 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
8339 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
8340 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
8341 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
8342 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
8343 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
8344 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
8345 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
8346 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
8347 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
8348 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
8349 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
8350 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
8351 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
8352 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
8353 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
8354 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
8355 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
8356 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
8357 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
8358 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
8359 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
8360 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
8361 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
8362 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
8363 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
8364 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
8365 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
8366 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
8367 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
8368 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
8369 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
8370 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
8371 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
8372 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
8373 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
8374 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
8375 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
8376 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
8377 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
8378 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
8379 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
8380 .ilen = 496,
8381 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8382 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8383 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8384 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8385 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8386 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8387 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8388 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8389 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8390 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8391 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8392 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8393 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8394 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8395 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8396 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8397 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8398 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8399 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8400 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8401 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8402 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8403 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8404 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8405 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8406 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8407 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8408 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8409 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8410 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8411 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8412 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8413 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8414 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8415 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8416 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8417 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8418 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8419 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8420 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8421 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8422 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8423 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8424 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8425 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8426 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8427 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8428 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8429 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8430 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8431 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8432 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8433 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8434 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8435 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8436 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8437 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8438 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8439 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8440 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8441 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8442 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8443 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008444 .also_non_np = 1,
8445 .np = 2,
8446 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008447 },
8448};
8449
8450static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
8451 { /* Generated from TF test vectors */
8452 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8453 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8454 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8455 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8456 .klen = 32,
8457 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8458 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8459 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8460 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03008461 "\x3A",
8462 .ilen = 17,
8463 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8464 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8465 "\x57",
8466 .rlen = 17,
8467 }, { /* Generated from TF test vectors */
8468 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8469 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8470 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8471 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8472 .klen = 32,
8473 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8474 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8475 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8476 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008477 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8478 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8479 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8480 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8481 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8482 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8483 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8484 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8485 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8486 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8487 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8488 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8489 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8490 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8491 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8492 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8493 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8494 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8495 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8496 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8497 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8498 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8499 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8500 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8501 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8502 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8503 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8504 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8505 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8506 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8507 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8508 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8509 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8510 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8511 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8512 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8513 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8514 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8515 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8516 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8517 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8518 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8519 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8520 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8521 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8522 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8523 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8524 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8525 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8526 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8527 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8528 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8529 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8530 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8531 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8532 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8533 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8534 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8535 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8536 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8537 .ilen = 496,
8538 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8539 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8540 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
8541 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
8542 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
8543 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
8544 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
8545 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
8546 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
8547 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
8548 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
8549 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
8550 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
8551 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
8552 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
8553 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
8554 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
8555 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
8556 "\x49\x61\x22\x52\x64\x8C\x46\x41"
8557 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
8558 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
8559 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
8560 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
8561 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
8562 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
8563 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
8564 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
8565 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
8566 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
8567 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
8568 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
8569 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
8570 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
8571 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
8572 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
8573 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
8574 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
8575 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
8576 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
8577 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
8578 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
8579 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
8580 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
8581 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
8582 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
8583 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
8584 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
8585 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
8586 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
8587 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
8588 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
8589 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
8590 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
8591 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
8592 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
8593 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
8594 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
8595 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
8596 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
8597 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
8598 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
8599 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
8600 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008601 .also_non_np = 1,
8602 .np = 2,
8603 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008604 },
8605};
8606
8607static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
8608 { /* Generated from TF test vectors */
8609 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8610 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8611 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8612 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8613 .klen = 32,
8614 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8615 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8616 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8617 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03008618 "\x57",
8619 .ilen = 17,
8620 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8621 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8622 "\x3A",
8623 .rlen = 17,
8624 }, { /* Generated from TF test vectors */
8625 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8626 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8627 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8628 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8629 .klen = 32,
8630 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8631 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8632 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8633 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008634 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
8635 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
8636 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
8637 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
8638 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
8639 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
8640 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
8641 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
8642 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
8643 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
8644 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
8645 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
8646 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
8647 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
8648 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
8649 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
8650 "\x49\x61\x22\x52\x64\x8C\x46\x41"
8651 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
8652 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
8653 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
8654 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
8655 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
8656 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
8657 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
8658 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
8659 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
8660 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
8661 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
8662 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
8663 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
8664 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
8665 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
8666 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
8667 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
8668 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
8669 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
8670 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
8671 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
8672 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
8673 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
8674 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
8675 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
8676 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
8677 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
8678 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
8679 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
8680 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
8681 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
8682 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
8683 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
8684 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
8685 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
8686 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
8687 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
8688 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
8689 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
8690 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
8691 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
8692 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
8693 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
8694 .ilen = 496,
8695 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8696 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8697 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8698 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8699 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8700 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8701 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8702 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8703 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8704 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8705 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8706 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8707 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8708 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8709 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8710 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8711 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8712 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8713 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8714 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8715 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8716 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8717 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8718 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8719 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8720 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8721 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8722 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8723 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8724 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8725 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8726 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8727 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8728 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8729 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8730 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8731 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8732 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8733 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8734 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8735 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8736 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8737 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8738 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8739 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8740 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8741 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8742 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8743 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8744 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8745 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8746 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8747 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8748 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8749 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8750 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8751 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8752 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8753 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8754 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8755 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8756 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8757 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008758 .also_non_np = 1,
8759 .np = 2,
8760 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008761 },
8762};
8763
8764static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
8765 { /* Generated from TF test vectors */
8766 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8767 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8768 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8769 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8770 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8771 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8772 .klen = 48,
8773 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8774 "\x00\x00\x00\x00\x00\x00\x00\x01",
8775 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8776 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8777 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8778 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8779 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8780 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8781 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8782 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8783 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8784 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8785 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8786 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8787 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8788 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8789 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8790 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8791 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8792 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8793 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8794 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8795 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8796 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8797 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8798 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8799 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8800 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8801 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8802 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8803 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8804 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8805 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8806 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8807 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8808 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8809 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8810 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8811 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8812 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8813 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8814 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8815 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8816 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8817 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8818 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8819 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8820 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8821 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8822 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8823 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8824 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8825 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8826 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8827 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8828 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8829 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8830 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8831 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8832 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8833 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8834 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8835 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8836 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8837 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8838 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8839 .ilen = 512,
8840 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8841 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8842 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8843 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8844 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8845 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8846 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8847 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8848 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8849 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8850 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8851 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8852 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8853 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8854 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8855 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8856 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8857 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8858 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8859 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8860 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8861 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8862 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8863 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8864 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8865 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8866 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8867 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8868 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8869 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8870 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8871 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8872 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8873 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8874 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8875 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8876 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8877 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8878 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8879 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8880 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8881 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8882 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8883 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8884 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8885 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8886 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8887 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8888 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8889 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8890 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8891 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8892 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8893 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8894 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8895 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8896 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8897 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8898 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8899 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8900 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8901 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8902 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8903 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8904 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008905 .also_non_np = 1,
8906 .np = 2,
8907 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008908 },
8909};
8910
8911static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
8912 { /* Generated from TF test vectors */
8913 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8914 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8915 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8916 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8917 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8918 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8919 .klen = 48,
8920 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8921 "\x00\x00\x00\x00\x00\x00\x00\x01",
8922 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8923 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8924 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8925 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8926 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8927 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8928 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8929 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8930 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8931 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8932 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8933 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8934 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8935 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8936 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8937 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8938 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8939 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8940 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8941 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8942 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8943 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8944 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8945 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8946 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8947 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8948 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8949 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8950 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8951 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8952 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8953 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8954 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8955 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8956 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8957 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8958 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8959 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8960 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8961 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8962 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8963 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8964 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8965 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8966 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8967 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8968 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8969 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8970 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8971 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8972 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8973 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8974 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8975 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8976 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8977 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8978 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8979 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8980 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8981 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8982 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8983 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8984 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8985 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8986 .ilen = 512,
8987 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8988 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8989 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8990 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8991 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8992 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8993 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8994 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8995 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8996 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8997 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8998 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8999 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9000 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9001 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9002 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9003 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9004 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9005 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9006 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9007 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9008 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9009 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9010 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9011 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9012 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9013 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9014 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9015 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9016 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9017 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9018 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9019 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9020 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9021 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9022 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9023 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9024 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9025 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9026 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9027 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9028 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9029 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9030 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9031 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9032 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9033 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9034 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9035 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9036 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9037 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9038 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9039 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9040 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9041 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9042 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9043 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9044 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9045 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9046 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9047 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9048 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9049 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9050 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9051 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009052 .also_non_np = 1,
9053 .np = 2,
9054 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009055 },
9056};
9057
9058static struct cipher_testvec cast6_xts_enc_tv_template[] = {
9059 { /* Generated from TF test vectors */
9060 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9061 "\x23\x53\x60\x28\x74\x71\x35\x26"
9062 "\x62\x49\x77\x57\x24\x70\x93\x69"
9063 "\x99\x59\x57\x49\x66\x96\x76\x27"
9064 "\x31\x41\x59\x26\x53\x58\x97\x93"
9065 "\x23\x84\x62\x64\x33\x83\x27\x95"
9066 "\x02\x88\x41\x97\x16\x93\x99\x37"
9067 "\x51\x05\x82\x09\x74\x94\x45\x92",
9068 .klen = 64,
9069 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9070 "\x00\x00\x00\x00\x00\x00\x00\x00",
9071 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9072 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9073 "\x10\x11\x12\x13\x14\x15\x16\x17"
9074 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9075 "\x20\x21\x22\x23\x24\x25\x26\x27"
9076 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9077 "\x30\x31\x32\x33\x34\x35\x36\x37"
9078 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9079 "\x40\x41\x42\x43\x44\x45\x46\x47"
9080 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9081 "\x50\x51\x52\x53\x54\x55\x56\x57"
9082 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9083 "\x60\x61\x62\x63\x64\x65\x66\x67"
9084 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9085 "\x70\x71\x72\x73\x74\x75\x76\x77"
9086 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9087 "\x80\x81\x82\x83\x84\x85\x86\x87"
9088 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9089 "\x90\x91\x92\x93\x94\x95\x96\x97"
9090 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9091 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9092 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9093 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9094 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9095 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9096 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9097 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9098 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9099 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9100 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9101 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9102 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9103 "\x00\x01\x02\x03\x04\x05\x06\x07"
9104 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9105 "\x10\x11\x12\x13\x14\x15\x16\x17"
9106 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9107 "\x20\x21\x22\x23\x24\x25\x26\x27"
9108 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9109 "\x30\x31\x32\x33\x34\x35\x36\x37"
9110 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9111 "\x40\x41\x42\x43\x44\x45\x46\x47"
9112 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9113 "\x50\x51\x52\x53\x54\x55\x56\x57"
9114 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9115 "\x60\x61\x62\x63\x64\x65\x66\x67"
9116 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9117 "\x70\x71\x72\x73\x74\x75\x76\x77"
9118 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9119 "\x80\x81\x82\x83\x84\x85\x86\x87"
9120 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9121 "\x90\x91\x92\x93\x94\x95\x96\x97"
9122 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9123 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9124 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9125 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9126 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9127 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9128 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9129 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9130 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9131 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9132 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9133 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9134 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9135 .ilen = 512,
9136 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
9137 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
9138 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
9139 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
9140 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
9141 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
9142 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
9143 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
9144 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
9145 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
9146 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
9147 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
9148 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
9149 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
9150 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
9151 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
9152 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
9153 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
9154 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
9155 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
9156 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
9157 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
9158 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
9159 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
9160 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
9161 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
9162 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
9163 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
9164 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
9165 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
9166 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
9167 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
9168 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
9169 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
9170 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
9171 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
9172 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
9173 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
9174 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
9175 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
9176 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
9177 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
9178 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
9179 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
9180 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
9181 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
9182 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
9183 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
9184 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
9185 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
9186 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
9187 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
9188 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
9189 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
9190 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
9191 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
9192 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
9193 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
9194 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
9195 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
9196 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
9197 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
9198 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
9199 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
9200 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009201 .also_non_np = 1,
9202 .np = 2,
9203 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009204 },
9205};
9206
9207static struct cipher_testvec cast6_xts_dec_tv_template[] = {
9208 { /* Generated from TF test vectors */
9209 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9210 "\x23\x53\x60\x28\x74\x71\x35\x26"
9211 "\x62\x49\x77\x57\x24\x70\x93\x69"
9212 "\x99\x59\x57\x49\x66\x96\x76\x27"
9213 "\x31\x41\x59\x26\x53\x58\x97\x93"
9214 "\x23\x84\x62\x64\x33\x83\x27\x95"
9215 "\x02\x88\x41\x97\x16\x93\x99\x37"
9216 "\x51\x05\x82\x09\x74\x94\x45\x92",
9217 .klen = 64,
9218 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9219 "\x00\x00\x00\x00\x00\x00\x00\x00",
9220 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
9221 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
9222 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
9223 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
9224 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
9225 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
9226 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
9227 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
9228 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
9229 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
9230 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
9231 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
9232 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
9233 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
9234 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
9235 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
9236 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
9237 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
9238 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
9239 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
9240 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
9241 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
9242 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
9243 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
9244 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
9245 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
9246 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
9247 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
9248 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
9249 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
9250 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
9251 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
9252 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
9253 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
9254 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
9255 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
9256 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
9257 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
9258 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
9259 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
9260 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
9261 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
9262 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
9263 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
9264 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
9265 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
9266 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
9267 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
9268 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
9269 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
9270 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
9271 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
9272 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
9273 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
9274 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
9275 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
9276 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
9277 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
9278 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
9279 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
9280 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
9281 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
9282 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
9283 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
9284 .ilen = 512,
9285 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9286 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9287 "\x10\x11\x12\x13\x14\x15\x16\x17"
9288 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9289 "\x20\x21\x22\x23\x24\x25\x26\x27"
9290 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9291 "\x30\x31\x32\x33\x34\x35\x36\x37"
9292 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9293 "\x40\x41\x42\x43\x44\x45\x46\x47"
9294 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9295 "\x50\x51\x52\x53\x54\x55\x56\x57"
9296 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9297 "\x60\x61\x62\x63\x64\x65\x66\x67"
9298 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9299 "\x70\x71\x72\x73\x74\x75\x76\x77"
9300 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9301 "\x80\x81\x82\x83\x84\x85\x86\x87"
9302 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9303 "\x90\x91\x92\x93\x94\x95\x96\x97"
9304 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9305 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9306 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9307 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9308 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9309 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9310 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9311 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9312 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9313 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9314 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9315 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9316 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9317 "\x00\x01\x02\x03\x04\x05\x06\x07"
9318 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9319 "\x10\x11\x12\x13\x14\x15\x16\x17"
9320 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9321 "\x20\x21\x22\x23\x24\x25\x26\x27"
9322 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9323 "\x30\x31\x32\x33\x34\x35\x36\x37"
9324 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9325 "\x40\x41\x42\x43\x44\x45\x46\x47"
9326 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9327 "\x50\x51\x52\x53\x54\x55\x56\x57"
9328 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9329 "\x60\x61\x62\x63\x64\x65\x66\x67"
9330 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9331 "\x70\x71\x72\x73\x74\x75\x76\x77"
9332 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9333 "\x80\x81\x82\x83\x84\x85\x86\x87"
9334 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9335 "\x90\x91\x92\x93\x94\x95\x96\x97"
9336 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9337 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9338 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9339 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9340 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9341 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9342 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9343 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9344 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9345 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9346 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9347 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9348 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9349 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009350 .also_non_np = 1,
9351 .np = 2,
9352 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08009353 },
9354};
9355
9356
9357/*
9358 * AES test vectors.
9359 */
9360#define AES_ENC_TEST_VECTORS 3
9361#define AES_DEC_TEST_VECTORS 3
9362#define AES_CBC_ENC_TEST_VECTORS 4
9363#define AES_CBC_DEC_TEST_VECTORS 4
Horia Geantae46e9a42012-07-03 19:16:54 +03009364#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
9365#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
9366#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +08009367#define AES_LRW_ENC_TEST_VECTORS 8
9368#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +10009369#define AES_XTS_ENC_TEST_VECTORS 5
9370#define AES_XTS_DEC_TEST_VECTORS 5
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08009371#define AES_CTR_ENC_TEST_VECTORS 3
9372#define AES_CTR_DEC_TEST_VECTORS 3
Puneet Saxenaba0e14a2011-05-04 15:04:10 +10009373#define AES_OFB_ENC_TEST_VECTORS 1
9374#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +08009375#define AES_CTR_3686_ENC_TEST_VECTORS 7
9376#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08009377#define AES_GCM_ENC_TEST_VECTORS 9
9378#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -04009379#define AES_GCM_4106_ENC_TEST_VECTORS 7
9380#define AES_GCM_4106_DEC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +08009381#define AES_CCM_ENC_TEST_VECTORS 7
9382#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +08009383#define AES_CCM_4309_ENC_TEST_VECTORS 7
9384#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +08009385
9386static struct cipher_testvec aes_enc_tv_template[] = {
9387 { /* From FIPS-197 */
9388 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9389 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9390 .klen = 16,
9391 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
9392 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9393 .ilen = 16,
9394 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
9395 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
9396 .rlen = 16,
9397 }, {
9398 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9399 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9400 "\x10\x11\x12\x13\x14\x15\x16\x17",
9401 .klen = 24,
9402 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
9403 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9404 .ilen = 16,
9405 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
9406 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
9407 .rlen = 16,
9408 }, {
9409 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9410 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9411 "\x10\x11\x12\x13\x14\x15\x16\x17"
9412 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9413 .klen = 32,
9414 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
9415 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9416 .ilen = 16,
9417 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
9418 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
9419 .rlen = 16,
9420 },
9421};
9422
9423static struct cipher_testvec aes_dec_tv_template[] = {
9424 { /* From FIPS-197 */
9425 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9426 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9427 .klen = 16,
9428 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
9429 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
9430 .ilen = 16,
9431 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9432 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9433 .rlen = 16,
9434 }, {
9435 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9436 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9437 "\x10\x11\x12\x13\x14\x15\x16\x17",
9438 .klen = 24,
9439 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
9440 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
9441 .ilen = 16,
9442 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9443 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9444 .rlen = 16,
9445 }, {
9446 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9447 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9448 "\x10\x11\x12\x13\x14\x15\x16\x17"
9449 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9450 .klen = 32,
9451 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
9452 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
9453 .ilen = 16,
9454 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9455 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9456 .rlen = 16,
9457 },
9458};
9459
9460static struct cipher_testvec aes_cbc_enc_tv_template[] = {
9461 { /* From RFC 3602 */
9462 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9463 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9464 .klen = 16,
9465 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9466 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9467 .input = "Single block msg",
9468 .ilen = 16,
9469 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9470 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
9471 .rlen = 16,
9472 }, {
9473 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9474 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9475 .klen = 16,
9476 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9477 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9478 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9479 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9480 "\x10\x11\x12\x13\x14\x15\x16\x17"
9481 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9482 .ilen = 32,
9483 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9484 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9485 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9486 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
9487 .rlen = 32,
9488 }, { /* From NIST SP800-38A */
9489 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9490 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9491 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9492 .klen = 24,
9493 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9494 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9495 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9496 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9497 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9498 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9499 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9500 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9501 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9502 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9503 .ilen = 64,
9504 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9505 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9506 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9507 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9508 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9509 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9510 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9511 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
9512 .rlen = 64,
9513 }, {
9514 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9515 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9516 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9517 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9518 .klen = 32,
9519 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9520 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9521 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9522 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9523 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9524 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9525 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9526 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9527 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9528 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9529 .ilen = 64,
9530 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9531 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9532 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9533 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9534 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9535 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9536 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9537 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
9538 .rlen = 64,
9539 },
9540};
9541
9542static struct cipher_testvec aes_cbc_dec_tv_template[] = {
9543 { /* From RFC 3602 */
9544 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9545 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9546 .klen = 16,
9547 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9548 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9549 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9550 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
9551 .ilen = 16,
9552 .result = "Single block msg",
9553 .rlen = 16,
9554 }, {
9555 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9556 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9557 .klen = 16,
9558 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9559 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9560 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9561 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9562 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9563 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
9564 .ilen = 32,
9565 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9566 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9567 "\x10\x11\x12\x13\x14\x15\x16\x17"
9568 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9569 .rlen = 32,
9570 }, { /* From NIST SP800-38A */
9571 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9572 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9573 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9574 .klen = 24,
9575 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9576 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9577 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9578 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9579 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9580 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9581 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9582 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9583 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9584 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
9585 .ilen = 64,
9586 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9587 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9588 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9589 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9590 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9591 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9592 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9593 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9594 .rlen = 64,
9595 }, {
9596 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9597 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9598 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9599 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9600 .klen = 32,
9601 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9602 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9603 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9604 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9605 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9606 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9607 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9608 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9609 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9610 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
9611 .ilen = 64,
9612 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9613 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9614 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9615 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9616 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9617 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9618 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9619 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9620 .rlen = 64,
9621 },
9622};
9623
Horia Geantae46e9a42012-07-03 19:16:54 +03009624static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
9625 { /* RFC 3602 Case 1 */
9626#ifdef __LITTLE_ENDIAN
9627 .key = "\x08\x00" /* rta length */
9628 "\x01\x00" /* rta type */
9629#else
9630 .key = "\x00\x08" /* rta length */
9631 "\x00\x01" /* rta type */
9632#endif
9633 "\x00\x00\x00\x10" /* enc key length */
9634 "\x00\x00\x00\x00\x00\x00\x00\x00"
9635 "\x00\x00\x00\x00\x00\x00\x00\x00"
9636 "\x00\x00\x00\x00"
9637 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9638 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9639 .klen = 8 + 20 + 16,
9640 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9641 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9642 .input = "Single block msg",
9643 .ilen = 16,
9644 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9645 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9646 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
9647 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
9648 "\x03\x71\xa2\x06",
9649 .rlen = 16 + 20,
9650 }, { /* RFC 3602 Case 2 */
9651#ifdef __LITTLE_ENDIAN
9652 .key = "\x08\x00" /* rta length */
9653 "\x01\x00" /* rta type */
9654#else
9655 .key = "\x00\x08" /* rta length */
9656 "\x00\x01" /* rta type */
9657#endif
9658 "\x00\x00\x00\x10" /* enc key length */
9659 "\x20\x21\x22\x23\x24\x25\x26\x27"
9660 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9661 "\x30\x31\x32\x33"
9662 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9663 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9664 .klen = 8 + 20 + 16,
9665 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9666 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9667 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9668 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9669 "\x10\x11\x12\x13\x14\x15\x16\x17"
9670 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9671 .ilen = 32,
9672 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9673 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9674 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9675 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9676 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
9677 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
9678 "\x65\x39\xf8\xde",
9679 .rlen = 32 + 20,
9680 }, { /* RFC 3602 Case 3 */
9681#ifdef __LITTLE_ENDIAN
9682 .key = "\x08\x00" /* rta length */
9683 "\x01\x00" /* rta type */
9684#else
9685 .key = "\x00\x08" /* rta length */
9686 "\x00\x01" /* rta type */
9687#endif
9688 "\x00\x00\x00\x10" /* enc key length */
9689 "\x11\x22\x33\x44\x55\x66\x77\x88"
9690 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9691 "\x22\x33\x44\x55"
9692 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9693 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9694 .klen = 8 + 20 + 16,
9695 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9696 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9697 .input = "This is a 48-byte message (exactly 3 AES blocks)",
9698 .ilen = 48,
9699 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9700 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9701 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9702 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9703 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9704 "\x85\x79\x69\x5d\x83\xba\x26\x84"
9705 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
9706 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
9707 "\x8d\x62\xf2\x1e",
9708 .rlen = 48 + 20,
9709 }, { /* RFC 3602 Case 4 */
9710#ifdef __LITTLE_ENDIAN
9711 .key = "\x08\x00" /* rta length */
9712 "\x01\x00" /* rta type */
9713#else
9714 .key = "\x00\x08" /* rta length */
9715 "\x00\x01" /* rta type */
9716#endif
9717 "\x00\x00\x00\x10" /* enc key length */
9718 "\x11\x22\x33\x44\x55\x66\x77\x88"
9719 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9720 "\x22\x33\x44\x55"
9721 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9722 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9723 .klen = 8 + 20 + 16,
9724 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9725 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9726 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9727 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9728 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9729 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9730 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9731 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9732 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9733 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9734 .ilen = 64,
9735 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9736 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9737 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9738 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9739 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9740 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9741 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9742 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9743 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
9744 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
9745 "\x1d\xbe\xc6\xe9",
9746 .rlen = 64 + 20,
9747 }, { /* RFC 3602 Case 5 */
9748#ifdef __LITTLE_ENDIAN
9749 .key = "\x08\x00" /* rta length */
9750 "\x01\x00" /* rta type */
9751#else
9752 .key = "\x00\x08" /* rta length */
9753 "\x00\x01" /* rta type */
9754#endif
9755 "\x00\x00\x00\x10" /* enc key length */
9756 "\x11\x22\x33\x44\x55\x66\x77\x88"
9757 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9758 "\x22\x33\x44\x55"
9759 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
9760 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
9761 .klen = 8 + 20 + 16,
9762 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
9763 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
9764 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
9765 .alen = 8,
9766 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
9767 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
9768 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9769 "\x10\x11\x12\x13\x14\x15\x16\x17"
9770 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9771 "\x20\x21\x22\x23\x24\x25\x26\x27"
9772 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9773 "\x30\x31\x32\x33\x34\x35\x36\x37"
9774 "\x01\x02\x03\x04\x05\x06\x07\x08"
9775 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
9776 .ilen = 80,
9777 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
9778 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
9779 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
9780 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
9781 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
9782 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
9783 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
9784 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
9785 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
9786 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
9787 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
9788 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
9789 "\x85\xe1\x59\xf7",
9790 .rlen = 80 + 20,
9791 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
9792#ifdef __LITTLE_ENDIAN
9793 .key = "\x08\x00" /* rta length */
9794 "\x01\x00" /* rta type */
9795#else
9796 .key = "\x00\x08" /* rta length */
9797 "\x00\x01" /* rta type */
9798#endif
9799 "\x00\x00\x00\x18" /* enc key length */
9800 "\x11\x22\x33\x44\x55\x66\x77\x88"
9801 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9802 "\x22\x33\x44\x55"
9803 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9804 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9805 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9806 .klen = 8 + 20 + 24,
9807 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9808 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9809 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9810 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9811 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9812 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9813 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9814 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9815 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9816 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9817 .ilen = 64,
9818 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9819 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9820 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9821 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9822 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9823 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9824 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9825 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
9826 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
9827 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
9828 "\x47\x4c\xfc\x36",
9829 .rlen = 64 + 20,
9830 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
9831#ifdef __LITTLE_ENDIAN
9832 .key = "\x08\x00" /* rta length */
9833 "\x01\x00" /* rta type */
9834#else
9835 .key = "\x00\x08" /* rta length */
9836 "\x00\x01" /* rta type */
9837#endif
9838 "\x00\x00\x00\x20" /* enc key length */
9839 "\x11\x22\x33\x44\x55\x66\x77\x88"
9840 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9841 "\x22\x33\x44\x55"
9842 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9843 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9844 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9845 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9846 .klen = 8 + 20 + 32,
9847 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
9848 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9849 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9850 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9851 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9852 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9853 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9854 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9855 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9856 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9857 .ilen = 64,
9858 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9859 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9860 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9861 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9862 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9863 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9864 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9865 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
9866 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
9867 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
9868 "\x51\xee\xd6\x4e",
9869 .rlen = 64 + 20,
9870 },
9871};
9872
9873static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
9874 { /* RFC 3602 Case 1 */
9875#ifdef __LITTLE_ENDIAN
9876 .key = "\x08\x00" /* rta length */
9877 "\x01\x00" /* rta type */
9878#else
9879 .key = "\x00\x08" /* rta length */
9880 "\x00\x01" /* rta type */
9881#endif
9882 "\x00\x00\x00\x10" /* enc key length */
9883 "\x00\x00\x00\x00\x00\x00\x00\x00"
9884 "\x00\x00\x00\x00\x00\x00\x00\x00"
9885 "\x00\x00\x00\x00\x00\x00\x00\x00"
9886 "\x00\x00\x00\x00\x00\x00\x00\x00"
9887 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9888 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9889 .klen = 8 + 32 + 16,
9890 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9891 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9892 .input = "Single block msg",
9893 .ilen = 16,
9894 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9895 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9896 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
9897 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
9898 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
9899 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
9900 .rlen = 16 + 32,
9901 }, { /* RFC 3602 Case 2 */
9902#ifdef __LITTLE_ENDIAN
9903 .key = "\x08\x00" /* rta length */
9904 "\x01\x00" /* rta type */
9905#else
9906 .key = "\x00\x08" /* rta length */
9907 "\x00\x01" /* rta type */
9908#endif
9909 "\x00\x00\x00\x10" /* enc key length */
9910 "\x20\x21\x22\x23\x24\x25\x26\x27"
9911 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9912 "\x30\x31\x32\x33\x34\x35\x36\x37"
9913 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9914 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9915 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9916 .klen = 8 + 32 + 16,
9917 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9918 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9919 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9920 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9921 "\x10\x11\x12\x13\x14\x15\x16\x17"
9922 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9923 .ilen = 32,
9924 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9925 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9926 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9927 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9928 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
9929 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
9930 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
9931 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
9932 .rlen = 32 + 32,
9933 }, { /* RFC 3602 Case 3 */
9934#ifdef __LITTLE_ENDIAN
9935 .key = "\x08\x00" /* rta length */
9936 "\x01\x00" /* rta type */
9937#else
9938 .key = "\x00\x08" /* rta length */
9939 "\x00\x01" /* rta type */
9940#endif
9941 "\x00\x00\x00\x10" /* enc key length */
9942 "\x11\x22\x33\x44\x55\x66\x77\x88"
9943 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9944 "\x22\x33\x44\x55\x66\x77\x88\x99"
9945 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9946 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9947 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9948 .klen = 8 + 32 + 16,
9949 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9950 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9951 .input = "This is a 48-byte message (exactly 3 AES blocks)",
9952 .ilen = 48,
9953 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9954 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9955 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9956 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9957 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9958 "\x85\x79\x69\x5d\x83\xba\x26\x84"
9959 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
9960 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
9961 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
9962 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
9963 .rlen = 48 + 32,
9964 }, { /* RFC 3602 Case 4 */
9965#ifdef __LITTLE_ENDIAN
9966 .key = "\x08\x00" /* rta length */
9967 "\x01\x00" /* rta type */
9968#else
9969 .key = "\x00\x08" /* rta length */
9970 "\x00\x01" /* rta type */
9971#endif
9972 "\x00\x00\x00\x10" /* enc key length */
9973 "\x11\x22\x33\x44\x55\x66\x77\x88"
9974 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9975 "\x22\x33\x44\x55\x66\x77\x88\x99"
9976 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9977 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9978 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9979 .klen = 8 + 32 + 16,
9980 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9981 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9982 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9983 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9984 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9985 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9986 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9987 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9988 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9989 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9990 .ilen = 64,
9991 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9992 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9993 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9994 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9995 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9996 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9997 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9998 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9999 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
10000 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
10001 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
10002 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
10003 .rlen = 64 + 32,
10004 }, { /* RFC 3602 Case 5 */
10005#ifdef __LITTLE_ENDIAN
10006 .key = "\x08\x00" /* rta length */
10007 "\x01\x00" /* rta type */
10008#else
10009 .key = "\x00\x08" /* rta length */
10010 "\x00\x01" /* rta type */
10011#endif
10012 "\x00\x00\x00\x10" /* enc key length */
10013 "\x11\x22\x33\x44\x55\x66\x77\x88"
10014 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10015 "\x22\x33\x44\x55\x66\x77\x88\x99"
10016 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10017 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
10018 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
10019 .klen = 8 + 32 + 16,
10020 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
10021 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
10022 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
10023 .alen = 8,
10024 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
10025 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
10026 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10027 "\x10\x11\x12\x13\x14\x15\x16\x17"
10028 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10029 "\x20\x21\x22\x23\x24\x25\x26\x27"
10030 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10031 "\x30\x31\x32\x33\x34\x35\x36\x37"
10032 "\x01\x02\x03\x04\x05\x06\x07\x08"
10033 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10034 .ilen = 80,
10035 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10036 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10037 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10038 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10039 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10040 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10041 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10042 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10043 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10044 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10045 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
10046 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
10047 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
10048 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
10049 .rlen = 80 + 32,
10050 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10051#ifdef __LITTLE_ENDIAN
10052 .key = "\x08\x00" /* rta length */
10053 "\x01\x00" /* rta type */
10054#else
10055 .key = "\x00\x08" /* rta length */
10056 "\x00\x01" /* rta type */
10057#endif
10058 "\x00\x00\x00\x18" /* enc key length */
10059 "\x11\x22\x33\x44\x55\x66\x77\x88"
10060 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10061 "\x22\x33\x44\x55\x66\x77\x88\x99"
10062 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10063 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10064 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10065 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10066 .klen = 8 + 32 + 24,
10067 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10068 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10069 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10070 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10071 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10072 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10073 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10074 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10075 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10076 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10077 .ilen = 64,
10078 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10079 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10080 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10081 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10082 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10083 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10084 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10085 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
10086 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
10087 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
10088 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
10089 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
10090 .rlen = 64 + 32,
10091 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
10092#ifdef __LITTLE_ENDIAN
10093 .key = "\x08\x00" /* rta length */
10094 "\x01\x00" /* rta type */
10095#else
10096 .key = "\x00\x08" /* rta length */
10097 "\x00\x01" /* rta type */
10098#endif
10099 "\x00\x00\x00\x20" /* enc key length */
10100 "\x11\x22\x33\x44\x55\x66\x77\x88"
10101 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10102 "\x22\x33\x44\x55\x66\x77\x88\x99"
10103 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10104 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10105 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10106 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10107 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10108 .klen = 8 + 32 + 32,
10109 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10110 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10111 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10112 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10113 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10114 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10115 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10116 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10117 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10118 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10119 .ilen = 64,
10120 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10121 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10122 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10123 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10124 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10125 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10126 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10127 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
10128 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
10129 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
10130 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
10131 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
10132 .rlen = 64 + 32,
10133 },
10134};
10135
10136static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
10137 { /* RFC 3602 Case 1 */
10138#ifdef __LITTLE_ENDIAN
10139 .key = "\x08\x00" /* rta length */
10140 "\x01\x00" /* rta type */
10141#else
10142 .key = "\x00\x08" /* rta length */
10143 "\x00\x01" /* rta type */
10144#endif
10145 "\x00\x00\x00\x10" /* enc key length */
10146 "\x00\x00\x00\x00\x00\x00\x00\x00"
10147 "\x00\x00\x00\x00\x00\x00\x00\x00"
10148 "\x00\x00\x00\x00\x00\x00\x00\x00"
10149 "\x00\x00\x00\x00\x00\x00\x00\x00"
10150 "\x00\x00\x00\x00\x00\x00\x00\x00"
10151 "\x00\x00\x00\x00\x00\x00\x00\x00"
10152 "\x00\x00\x00\x00\x00\x00\x00\x00"
10153 "\x00\x00\x00\x00\x00\x00\x00\x00"
10154 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10155 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10156 .klen = 8 + 64 + 16,
10157 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10158 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10159 .input = "Single block msg",
10160 .ilen = 16,
10161 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10162 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
10163 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
10164 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
10165 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
10166 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
10167 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
10168 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
10169 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
10170 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
10171 .rlen = 16 + 64,
10172 }, { /* RFC 3602 Case 2 */
10173#ifdef __LITTLE_ENDIAN
10174 .key = "\x08\x00" /* rta length */
10175 "\x01\x00" /* rta type */
10176#else
10177 .key = "\x00\x08" /* rta length */
10178 "\x00\x01" /* rta type */
10179#endif
10180 "\x00\x00\x00\x10" /* enc key length */
10181 "\x20\x21\x22\x23\x24\x25\x26\x27"
10182 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10183 "\x30\x31\x32\x33\x34\x35\x36\x37"
10184 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10185 "\x40\x41\x42\x43\x44\x45\x46\x47"
10186 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10187 "\x50\x51\x52\x53\x54\x55\x56\x57"
10188 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10189 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10190 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10191 .klen = 8 + 64 + 16,
10192 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10193 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10194 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10195 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10196 "\x10\x11\x12\x13\x14\x15\x16\x17"
10197 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10198 .ilen = 32,
10199 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10200 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10201 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10202 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
10203 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
10204 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
10205 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
10206 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
10207 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
10208 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
10209 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
10210 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
10211 .rlen = 32 + 64,
10212 }, { /* RFC 3602 Case 3 */
10213#ifdef __LITTLE_ENDIAN
10214 .key = "\x08\x00" /* rta length */
10215 "\x01\x00" /* rta type */
10216#else
10217 .key = "\x00\x08" /* rta length */
10218 "\x00\x01" /* rta type */
10219#endif
10220 "\x00\x00\x00\x10" /* enc key length */
10221 "\x11\x22\x33\x44\x55\x66\x77\x88"
10222 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10223 "\x22\x33\x44\x55\x66\x77\x88\x99"
10224 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10225 "\x33\x44\x55\x66\x77\x88\x99\xaa"
10226 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10227 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10228 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10229 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
10230 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
10231 .klen = 8 + 64 + 16,
10232 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
10233 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
10234 .input = "This is a 48-byte message (exactly 3 AES blocks)",
10235 .ilen = 48,
10236 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
10237 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
10238 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
10239 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
10240 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
10241 "\x85\x79\x69\x5d\x83\xba\x26\x84"
10242 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
10243 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
10244 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
10245 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
10246 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
10247 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
10248 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
10249 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
10250 .rlen = 48 + 64,
10251 }, { /* RFC 3602 Case 4 */
10252#ifdef __LITTLE_ENDIAN
10253 .key = "\x08\x00" /* rta length */
10254 "\x01\x00" /* rta type */
10255#else
10256 .key = "\x00\x08" /* rta length */
10257 "\x00\x01" /* rta type */
10258#endif
10259 "\x00\x00\x00\x10" /* enc key length */
10260 "\x11\x22\x33\x44\x55\x66\x77\x88"
10261 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10262 "\x22\x33\x44\x55\x66\x77\x88\x99"
10263 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10264 "\x33\x44\x55\x66\x77\x88\x99\xaa"
10265 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10266 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10267 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10268 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
10269 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
10270 .klen = 8 + 64 + 16,
10271 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
10272 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
10273 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10274 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10275 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10276 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10277 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10278 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10279 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10280 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
10281 .ilen = 64,
10282 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
10283 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
10284 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
10285 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
10286 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
10287 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
10288 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
10289 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
10290 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
10291 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
10292 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
10293 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
10294 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
10295 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
10296 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
10297 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
10298 .rlen = 64 + 64,
10299 }, { /* RFC 3602 Case 5 */
10300#ifdef __LITTLE_ENDIAN
10301 .key = "\x08\x00" /* rta length */
10302 "\x01\x00" /* rta type */
10303#else
10304 .key = "\x00\x08" /* rta length */
10305 "\x00\x01" /* rta type */
10306#endif
10307 "\x00\x00\x00\x10" /* enc key length */
10308 "\x11\x22\x33\x44\x55\x66\x77\x88"
10309 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10310 "\x22\x33\x44\x55\x66\x77\x88\x99"
10311 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10312 "\x33\x44\x55\x66\x77\x88\x99\xaa"
10313 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10314 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10315 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10316 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
10317 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
10318 .klen = 8 + 64 + 16,
10319 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
10320 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
10321 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
10322 .alen = 8,
10323 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
10324 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
10325 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10326 "\x10\x11\x12\x13\x14\x15\x16\x17"
10327 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10328 "\x20\x21\x22\x23\x24\x25\x26\x27"
10329 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10330 "\x30\x31\x32\x33\x34\x35\x36\x37"
10331 "\x01\x02\x03\x04\x05\x06\x07\x08"
10332 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10333 .ilen = 80,
10334 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10335 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10336 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10337 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10338 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10339 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10340 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10341 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10342 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10343 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10344 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
10345 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
10346 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
10347 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
10348 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
10349 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
10350 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
10351 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
10352 .rlen = 80 + 64,
10353 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10354#ifdef __LITTLE_ENDIAN
10355 .key = "\x08\x00" /* rta length */
10356 "\x01\x00" /* rta type */
10357#else
10358 .key = "\x00\x08" /* rta length */
10359 "\x00\x01" /* rta type */
10360#endif
10361 "\x00\x00\x00\x18" /* enc key length */
10362 "\x11\x22\x33\x44\x55\x66\x77\x88"
10363 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10364 "\x22\x33\x44\x55\x66\x77\x88\x99"
10365 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10366 "\x33\x44\x55\x66\x77\x88\x99\xaa"
10367 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10368 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10369 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10370 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10371 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10372 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10373 .klen = 8 + 64 + 24,
10374 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10375 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10376 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10377 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10378 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10379 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10380 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10381 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10382 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10383 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10384 .ilen = 64,
10385 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10386 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10387 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10388 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10389 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10390 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10391 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10392 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
10393 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
10394 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
10395 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
10396 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
10397 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
10398 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
10399 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
10400 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
10401 .rlen = 64 + 64,
10402 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
10403#ifdef __LITTLE_ENDIAN
10404 .key = "\x08\x00" /* rta length */
10405 "\x01\x00" /* rta type */
10406#else
10407 .key = "\x00\x08" /* rta length */
10408 "\x00\x01" /* rta type */
10409#endif
10410 "\x00\x00\x00\x20" /* enc key length */
10411 "\x11\x22\x33\x44\x55\x66\x77\x88"
10412 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10413 "\x22\x33\x44\x55\x66\x77\x88\x99"
10414 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10415 "\x33\x44\x55\x66\x77\x88\x99\xaa"
10416 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10417 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10418 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10419 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10420 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10421 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10422 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10423 .klen = 8 + 64 + 32,
10424 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10425 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10426 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10427 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10428 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10429 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10430 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10431 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10432 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10433 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10434 .ilen = 64,
10435 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10436 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10437 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10438 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10439 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10440 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10441 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10442 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
10443 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
10444 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
10445 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
10446 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
10447 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
10448 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
10449 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
10450 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
10451 .rlen = 64 + 64,
10452 },
10453};
10454
Herbert Xuda7f0332008-07-31 17:08:25 +080010455static struct cipher_testvec aes_lrw_enc_tv_template[] = {
10456 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
10457 { /* LRW-32-AES 1 */
10458 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10459 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10460 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10461 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10462 .klen = 32,
10463 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10464 "\x00\x00\x00\x00\x00\x00\x00\x01",
10465 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10466 "\x38\x39\x41\x42\x43\x44\x45\x46",
10467 .ilen = 16,
10468 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
10469 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
10470 .rlen = 16,
10471 }, { /* LRW-32-AES 2 */
10472 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10473 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10474 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10475 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10476 .klen = 32,
10477 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10478 "\x00\x00\x00\x00\x00\x00\x00\x02",
10479 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10480 "\x38\x39\x41\x42\x43\x44\x45\x46",
10481 .ilen = 16,
10482 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
10483 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
10484 .rlen = 16,
10485 }, { /* LRW-32-AES 3 */
10486 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10487 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10488 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10489 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10490 .klen = 32,
10491 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10492 "\x00\x00\x00\x02\x00\x00\x00\x00",
10493 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10494 "\x38\x39\x41\x42\x43\x44\x45\x46",
10495 .ilen = 16,
10496 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
10497 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
10498 .rlen = 16,
10499 }, { /* LRW-32-AES 4 */
10500 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10501 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10502 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10503 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10504 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10505 .klen = 40,
10506 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10507 "\x00\x00\x00\x00\x00\x00\x00\x01",
10508 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10509 "\x38\x39\x41\x42\x43\x44\x45\x46",
10510 .ilen = 16,
10511 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
10512 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
10513 .rlen = 16,
10514 }, { /* LRW-32-AES 5 */
10515 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10516 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10517 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10518 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10519 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10520 .klen = 40,
10521 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10522 "\x00\x00\x00\x02\x00\x00\x00\x00",
10523 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10524 "\x38\x39\x41\x42\x43\x44\x45\x46",
10525 .ilen = 16,
10526 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
10527 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
10528 .rlen = 16,
10529 }, { /* LRW-32-AES 6 */
10530 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10531 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10532 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10533 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10534 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10535 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10536 .klen = 48,
10537 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10538 "\x00\x00\x00\x00\x00\x00\x00\x01",
10539 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10540 "\x38\x39\x41\x42\x43\x44\x45\x46",
10541 .ilen = 16,
10542 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
10543 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
10544 .rlen = 16,
10545 }, { /* LRW-32-AES 7 */
10546 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10547 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10548 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10549 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10550 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10551 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10552 .klen = 48,
10553 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10554 "\x00\x00\x00\x02\x00\x00\x00\x00",
10555 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10556 "\x38\x39\x41\x42\x43\x44\x45\x46",
10557 .ilen = 16,
10558 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
10559 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
10560 .rlen = 16,
10561 }, {
10562/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
10563 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10564 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10565 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10566 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10567 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10568 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10569 .klen = 48,
10570 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10571 "\x00\x00\x00\x00\x00\x00\x00\x01",
10572 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10573 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10574 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10575 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10576 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10577 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10578 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10579 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10580 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10581 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10582 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10583 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10584 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10585 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10586 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10587 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10588 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10589 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10590 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10591 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10592 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10593 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10594 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10595 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10596 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10597 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10598 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10599 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10600 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10601 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10602 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10603 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10604 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10605 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10606 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10607 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10608 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10609 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10610 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10611 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10612 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10613 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10614 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10615 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10616 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10617 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10618 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10619 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10620 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10621 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10622 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10623 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10624 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10625 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10626 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10627 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10628 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10629 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10630 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10631 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10632 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10633 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10634 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10635 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10636 .ilen = 512,
10637 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
10638 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
10639 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
10640 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
10641 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
10642 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
10643 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
10644 "\xe8\x58\x46\x97\x39\x51\x07\xde"
10645 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
10646 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
10647 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
10648 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
10649 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
10650 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
10651 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
10652 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
10653 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
10654 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
10655 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
10656 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
10657 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
10658 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
10659 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
10660 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
10661 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
10662 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
10663 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
10664 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
10665 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
10666 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
10667 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
10668 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
10669 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
10670 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
10671 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
10672 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
10673 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
10674 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
10675 "\xb8\x79\x78\x97\x94\xff\x72\x13"
10676 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
10677 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
10678 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
10679 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
10680 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
10681 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
10682 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
10683 "\x1e\x86\x53\x11\x53\x94\x00\xee"
10684 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
10685 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
10686 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
10687 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
10688 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
10689 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
10690 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
10691 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
10692 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
10693 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
10694 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
10695 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
10696 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
10697 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
10698 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
10699 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
10700 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
10701 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010702 .also_non_np = 1,
10703 .np = 2,
10704 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010705 }
10706};
10707
10708static struct cipher_testvec aes_lrw_dec_tv_template[] = {
10709 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
10710 /* same as enc vectors with input and result reversed */
10711 { /* LRW-32-AES 1 */
10712 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10713 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10714 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10715 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10716 .klen = 32,
10717 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10718 "\x00\x00\x00\x00\x00\x00\x00\x01",
10719 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
10720 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
10721 .ilen = 16,
10722 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10723 "\x38\x39\x41\x42\x43\x44\x45\x46",
10724 .rlen = 16,
10725 }, { /* LRW-32-AES 2 */
10726 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10727 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10728 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10729 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10730 .klen = 32,
10731 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10732 "\x00\x00\x00\x00\x00\x00\x00\x02",
10733 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
10734 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
10735 .ilen = 16,
10736 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10737 "\x38\x39\x41\x42\x43\x44\x45\x46",
10738 .rlen = 16,
10739 }, { /* LRW-32-AES 3 */
10740 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10741 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10742 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10743 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10744 .klen = 32,
10745 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10746 "\x00\x00\x00\x02\x00\x00\x00\x00",
10747 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
10748 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
10749 .ilen = 16,
10750 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10751 "\x38\x39\x41\x42\x43\x44\x45\x46",
10752 .rlen = 16,
10753 }, { /* LRW-32-AES 4 */
10754 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10755 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10756 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10757 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10758 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10759 .klen = 40,
10760 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10761 "\x00\x00\x00\x00\x00\x00\x00\x01",
10762 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
10763 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
10764 .ilen = 16,
10765 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10766 "\x38\x39\x41\x42\x43\x44\x45\x46",
10767 .rlen = 16,
10768 }, { /* LRW-32-AES 5 */
10769 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10770 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10771 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10772 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10773 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10774 .klen = 40,
10775 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10776 "\x00\x00\x00\x02\x00\x00\x00\x00",
10777 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
10778 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
10779 .ilen = 16,
10780 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10781 "\x38\x39\x41\x42\x43\x44\x45\x46",
10782 .rlen = 16,
10783 }, { /* LRW-32-AES 6 */
10784 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10785 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10786 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10787 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10788 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10789 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10790 .klen = 48,
10791 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10792 "\x00\x00\x00\x00\x00\x00\x00\x01",
10793 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
10794 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
10795 .ilen = 16,
10796 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10797 "\x38\x39\x41\x42\x43\x44\x45\x46",
10798 .rlen = 16,
10799 }, { /* LRW-32-AES 7 */
10800 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10801 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10802 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10803 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10804 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10805 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10806 .klen = 48,
10807 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10808 "\x00\x00\x00\x02\x00\x00\x00\x00",
10809 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
10810 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
10811 .ilen = 16,
10812 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10813 "\x38\x39\x41\x42\x43\x44\x45\x46",
10814 .rlen = 16,
10815 }, {
10816/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
10817 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10818 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10819 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10820 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10821 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10822 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10823 .klen = 48,
10824 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10825 "\x00\x00\x00\x00\x00\x00\x00\x01",
10826 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
10827 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
10828 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
10829 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
10830 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
10831 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
10832 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
10833 "\xe8\x58\x46\x97\x39\x51\x07\xde"
10834 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
10835 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
10836 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
10837 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
10838 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
10839 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
10840 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
10841 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
10842 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
10843 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
10844 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
10845 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
10846 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
10847 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
10848 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
10849 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
10850 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
10851 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
10852 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
10853 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
10854 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
10855 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
10856 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
10857 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
10858 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
10859 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
10860 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
10861 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
10862 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
10863 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
10864 "\xb8\x79\x78\x97\x94\xff\x72\x13"
10865 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
10866 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
10867 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
10868 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
10869 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
10870 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
10871 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
10872 "\x1e\x86\x53\x11\x53\x94\x00\xee"
10873 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
10874 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
10875 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
10876 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
10877 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
10878 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
10879 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
10880 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
10881 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
10882 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
10883 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
10884 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
10885 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
10886 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
10887 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
10888 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
10889 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
10890 .ilen = 512,
10891 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10892 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10893 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10894 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10895 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10896 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10897 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10898 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10899 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10900 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10901 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10902 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10903 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10904 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10905 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10906 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10907 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10908 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10909 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10910 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10911 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10912 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10913 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10914 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10915 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10916 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10917 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10918 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10919 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10920 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10921 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10922 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10923 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10924 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10925 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10926 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10927 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10928 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10929 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10930 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10931 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10932 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10933 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10934 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10935 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10936 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10937 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10938 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10939 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10940 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10941 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10942 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10943 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10944 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10945 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10946 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10947 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10948 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10949 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10950 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10951 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10952 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10953 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10954 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10955 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010956 .also_non_np = 1,
10957 .np = 2,
10958 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010959 }
10960};
10961
10962static struct cipher_testvec aes_xts_enc_tv_template[] = {
10963 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
10964 { /* XTS-AES 1 */
10965 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10966 "\x00\x00\x00\x00\x00\x00\x00\x00"
10967 "\x00\x00\x00\x00\x00\x00\x00\x00"
10968 "\x00\x00\x00\x00\x00\x00\x00\x00",
10969 .klen = 32,
10970 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10971 "\x00\x00\x00\x00\x00\x00\x00\x00",
10972 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10973 "\x00\x00\x00\x00\x00\x00\x00\x00"
10974 "\x00\x00\x00\x00\x00\x00\x00\x00"
10975 "\x00\x00\x00\x00\x00\x00\x00\x00",
10976 .ilen = 32,
10977 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
10978 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
10979 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
10980 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
10981 .rlen = 32,
10982 }, { /* XTS-AES 2 */
10983 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10984 "\x11\x11\x11\x11\x11\x11\x11\x11"
10985 "\x22\x22\x22\x22\x22\x22\x22\x22"
10986 "\x22\x22\x22\x22\x22\x22\x22\x22",
10987 .klen = 32,
10988 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10989 "\x00\x00\x00\x00\x00\x00\x00\x00",
10990 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10991 "\x44\x44\x44\x44\x44\x44\x44\x44"
10992 "\x44\x44\x44\x44\x44\x44\x44\x44"
10993 "\x44\x44\x44\x44\x44\x44\x44\x44",
10994 .ilen = 32,
10995 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
10996 "\x39\x33\x40\x38\xac\xef\x83\x8b"
10997 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
10998 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
10999 .rlen = 32,
11000 }, { /* XTS-AES 3 */
11001 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11002 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11003 "\x22\x22\x22\x22\x22\x22\x22\x22"
11004 "\x22\x22\x22\x22\x22\x22\x22\x22",
11005 .klen = 32,
11006 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11007 "\x00\x00\x00\x00\x00\x00\x00\x00",
11008 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11009 "\x44\x44\x44\x44\x44\x44\x44\x44"
11010 "\x44\x44\x44\x44\x44\x44\x44\x44"
11011 "\x44\x44\x44\x44\x44\x44\x44\x44",
11012 .ilen = 32,
11013 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
11014 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
11015 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
11016 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
11017 .rlen = 32,
11018 }, { /* XTS-AES 4 */
11019 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11020 "\x23\x53\x60\x28\x74\x71\x35\x26"
11021 "\x31\x41\x59\x26\x53\x58\x97\x93"
11022 "\x23\x84\x62\x64\x33\x83\x27\x95",
11023 .klen = 32,
11024 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11025 "\x00\x00\x00\x00\x00\x00\x00\x00",
11026 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11027 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11028 "\x10\x11\x12\x13\x14\x15\x16\x17"
11029 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11030 "\x20\x21\x22\x23\x24\x25\x26\x27"
11031 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11032 "\x30\x31\x32\x33\x34\x35\x36\x37"
11033 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11034 "\x40\x41\x42\x43\x44\x45\x46\x47"
11035 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11036 "\x50\x51\x52\x53\x54\x55\x56\x57"
11037 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11038 "\x60\x61\x62\x63\x64\x65\x66\x67"
11039 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11040 "\x70\x71\x72\x73\x74\x75\x76\x77"
11041 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11042 "\x80\x81\x82\x83\x84\x85\x86\x87"
11043 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11044 "\x90\x91\x92\x93\x94\x95\x96\x97"
11045 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11046 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11047 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11048 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11049 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11050 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11051 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11052 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11053 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11054 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11055 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11056 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11057 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11058 "\x00\x01\x02\x03\x04\x05\x06\x07"
11059 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11060 "\x10\x11\x12\x13\x14\x15\x16\x17"
11061 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11062 "\x20\x21\x22\x23\x24\x25\x26\x27"
11063 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11064 "\x30\x31\x32\x33\x34\x35\x36\x37"
11065 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11066 "\x40\x41\x42\x43\x44\x45\x46\x47"
11067 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11068 "\x50\x51\x52\x53\x54\x55\x56\x57"
11069 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11070 "\x60\x61\x62\x63\x64\x65\x66\x67"
11071 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11072 "\x70\x71\x72\x73\x74\x75\x76\x77"
11073 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11074 "\x80\x81\x82\x83\x84\x85\x86\x87"
11075 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11076 "\x90\x91\x92\x93\x94\x95\x96\x97"
11077 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11078 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11079 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11080 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11081 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11082 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11083 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11084 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11085 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11086 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11087 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11088 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11089 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11090 .ilen = 512,
11091 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
11092 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
11093 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
11094 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
11095 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
11096 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
11097 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
11098 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
11099 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
11100 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
11101 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
11102 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
11103 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
11104 "\x22\x97\x61\x46\xae\x20\xce\x84"
11105 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
11106 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
11107 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
11108 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
11109 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
11110 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
11111 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
11112 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
11113 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
11114 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
11115 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
11116 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
11117 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
11118 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
11119 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
11120 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
11121 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
11122 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
11123 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
11124 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
11125 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
11126 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
11127 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
11128 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
11129 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
11130 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
11131 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
11132 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
11133 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
11134 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
11135 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
11136 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
11137 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
11138 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
11139 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
11140 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
11141 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
11142 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
11143 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
11144 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
11145 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
11146 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
11147 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
11148 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
11149 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
11150 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
11151 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
11152 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
11153 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
11154 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
11155 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100011156 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
11157 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11158 "\x23\x53\x60\x28\x74\x71\x35\x26"
11159 "\x62\x49\x77\x57\x24\x70\x93\x69"
11160 "\x99\x59\x57\x49\x66\x96\x76\x27"
11161 "\x31\x41\x59\x26\x53\x58\x97\x93"
11162 "\x23\x84\x62\x64\x33\x83\x27\x95"
11163 "\x02\x88\x41\x97\x16\x93\x99\x37"
11164 "\x51\x05\x82\x09\x74\x94\x45\x92",
11165 .klen = 64,
11166 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11167 "\x00\x00\x00\x00\x00\x00\x00\x00",
11168 "\x00\x00\x00\x00\x00\x00\x00\x00",
11169 "\x00\x00\x00\x00\x00\x00\x00\x00",
11170 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11171 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11172 "\x10\x11\x12\x13\x14\x15\x16\x17"
11173 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11174 "\x20\x21\x22\x23\x24\x25\x26\x27"
11175 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11176 "\x30\x31\x32\x33\x34\x35\x36\x37"
11177 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11178 "\x40\x41\x42\x43\x44\x45\x46\x47"
11179 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11180 "\x50\x51\x52\x53\x54\x55\x56\x57"
11181 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11182 "\x60\x61\x62\x63\x64\x65\x66\x67"
11183 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11184 "\x70\x71\x72\x73\x74\x75\x76\x77"
11185 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11186 "\x80\x81\x82\x83\x84\x85\x86\x87"
11187 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11188 "\x90\x91\x92\x93\x94\x95\x96\x97"
11189 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11190 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11191 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11192 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11193 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11194 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11195 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11196 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11197 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11198 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11199 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11200 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11201 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11202 "\x00\x01\x02\x03\x04\x05\x06\x07"
11203 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11204 "\x10\x11\x12\x13\x14\x15\x16\x17"
11205 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11206 "\x20\x21\x22\x23\x24\x25\x26\x27"
11207 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11208 "\x30\x31\x32\x33\x34\x35\x36\x37"
11209 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11210 "\x40\x41\x42\x43\x44\x45\x46\x47"
11211 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11212 "\x50\x51\x52\x53\x54\x55\x56\x57"
11213 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11214 "\x60\x61\x62\x63\x64\x65\x66\x67"
11215 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11216 "\x70\x71\x72\x73\x74\x75\x76\x77"
11217 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11218 "\x80\x81\x82\x83\x84\x85\x86\x87"
11219 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11220 "\x90\x91\x92\x93\x94\x95\x96\x97"
11221 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11222 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11223 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11224 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11225 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11226 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11227 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11228 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11229 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11230 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11231 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11232 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11233 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11234 .ilen = 512,
11235 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
11236 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
11237 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
11238 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
11239 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
11240 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
11241 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
11242 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
11243 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
11244 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
11245 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
11246 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
11247 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
11248 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
11249 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
11250 "\x00\x02\x08\x87\x89\x14\x29\xca"
11251 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
11252 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
11253 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
11254 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
11255 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
11256 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
11257 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
11258 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
11259 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
11260 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
11261 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
11262 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
11263 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
11264 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
11265 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
11266 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
11267 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
11268 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
11269 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
11270 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
11271 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
11272 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
11273 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
11274 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
11275 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
11276 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
11277 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
11278 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
11279 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
11280 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
11281 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
11282 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
11283 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
11284 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
11285 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
11286 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
11287 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
11288 "\x94\x30\x54\xff\x84\x01\x14\x93"
11289 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
11290 "\x53\x76\x44\x1a\x77\xed\x43\x85"
11291 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
11292 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
11293 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
11294 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
11295 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
11296 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
11297 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
11298 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
11299 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011300 .also_non_np = 1,
11301 .np = 2,
11302 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011303 }
11304};
11305
11306static struct cipher_testvec aes_xts_dec_tv_template[] = {
11307 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
11308 { /* XTS-AES 1 */
11309 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11310 "\x00\x00\x00\x00\x00\x00\x00\x00"
11311 "\x00\x00\x00\x00\x00\x00\x00\x00"
11312 "\x00\x00\x00\x00\x00\x00\x00\x00",
11313 .klen = 32,
11314 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11315 "\x00\x00\x00\x00\x00\x00\x00\x00",
11316 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
11317 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
11318 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
11319 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
11320 .ilen = 32,
11321 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
11322 "\x00\x00\x00\x00\x00\x00\x00\x00"
11323 "\x00\x00\x00\x00\x00\x00\x00\x00"
11324 "\x00\x00\x00\x00\x00\x00\x00\x00",
11325 .rlen = 32,
11326 }, { /* XTS-AES 2 */
11327 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11328 "\x11\x11\x11\x11\x11\x11\x11\x11"
11329 "\x22\x22\x22\x22\x22\x22\x22\x22"
11330 "\x22\x22\x22\x22\x22\x22\x22\x22",
11331 .klen = 32,
11332 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11333 "\x00\x00\x00\x00\x00\x00\x00\x00",
11334 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
11335 "\x39\x33\x40\x38\xac\xef\x83\x8b"
11336 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
11337 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
11338 .ilen = 32,
11339 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
11340 "\x44\x44\x44\x44\x44\x44\x44\x44"
11341 "\x44\x44\x44\x44\x44\x44\x44\x44"
11342 "\x44\x44\x44\x44\x44\x44\x44\x44",
11343 .rlen = 32,
11344 }, { /* XTS-AES 3 */
11345 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11346 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11347 "\x22\x22\x22\x22\x22\x22\x22\x22"
11348 "\x22\x22\x22\x22\x22\x22\x22\x22",
11349 .klen = 32,
11350 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11351 "\x00\x00\x00\x00\x00\x00\x00\x00",
11352 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
11353 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
11354 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
11355 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
11356 .ilen = 32,
11357 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
11358 "\x44\x44\x44\x44\x44\x44\x44\x44"
11359 "\x44\x44\x44\x44\x44\x44\x44\x44"
11360 "\x44\x44\x44\x44\x44\x44\x44\x44",
11361 .rlen = 32,
11362 }, { /* XTS-AES 4 */
11363 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11364 "\x23\x53\x60\x28\x74\x71\x35\x26"
11365 "\x31\x41\x59\x26\x53\x58\x97\x93"
11366 "\x23\x84\x62\x64\x33\x83\x27\x95",
11367 .klen = 32,
11368 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11369 "\x00\x00\x00\x00\x00\x00\x00\x00",
11370 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
11371 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
11372 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
11373 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
11374 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
11375 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
11376 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
11377 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
11378 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
11379 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
11380 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
11381 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
11382 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
11383 "\x22\x97\x61\x46\xae\x20\xce\x84"
11384 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
11385 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
11386 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
11387 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
11388 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
11389 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
11390 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
11391 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
11392 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
11393 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
11394 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
11395 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
11396 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
11397 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
11398 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
11399 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
11400 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
11401 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
11402 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
11403 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
11404 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
11405 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
11406 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
11407 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
11408 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
11409 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
11410 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
11411 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
11412 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
11413 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
11414 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
11415 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
11416 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
11417 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
11418 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
11419 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
11420 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
11421 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
11422 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
11423 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
11424 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
11425 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
11426 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
11427 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
11428 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
11429 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
11430 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
11431 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
11432 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
11433 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
11434 .ilen = 512,
11435 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11436 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11437 "\x10\x11\x12\x13\x14\x15\x16\x17"
11438 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11439 "\x20\x21\x22\x23\x24\x25\x26\x27"
11440 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11441 "\x30\x31\x32\x33\x34\x35\x36\x37"
11442 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11443 "\x40\x41\x42\x43\x44\x45\x46\x47"
11444 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11445 "\x50\x51\x52\x53\x54\x55\x56\x57"
11446 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11447 "\x60\x61\x62\x63\x64\x65\x66\x67"
11448 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11449 "\x70\x71\x72\x73\x74\x75\x76\x77"
11450 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11451 "\x80\x81\x82\x83\x84\x85\x86\x87"
11452 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11453 "\x90\x91\x92\x93\x94\x95\x96\x97"
11454 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11455 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11456 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11457 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11458 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11459 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11460 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11461 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11462 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11463 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11464 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11465 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11466 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11467 "\x00\x01\x02\x03\x04\x05\x06\x07"
11468 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11469 "\x10\x11\x12\x13\x14\x15\x16\x17"
11470 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11471 "\x20\x21\x22\x23\x24\x25\x26\x27"
11472 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11473 "\x30\x31\x32\x33\x34\x35\x36\x37"
11474 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11475 "\x40\x41\x42\x43\x44\x45\x46\x47"
11476 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11477 "\x50\x51\x52\x53\x54\x55\x56\x57"
11478 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11479 "\x60\x61\x62\x63\x64\x65\x66\x67"
11480 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11481 "\x70\x71\x72\x73\x74\x75\x76\x77"
11482 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11483 "\x80\x81\x82\x83\x84\x85\x86\x87"
11484 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11485 "\x90\x91\x92\x93\x94\x95\x96\x97"
11486 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11487 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11488 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11489 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11490 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11491 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11492 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11493 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11494 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11495 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11496 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11497 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11498 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11499 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100011500 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
11501 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11502 "\x23\x53\x60\x28\x74\x71\x35\x26"
11503 "\x62\x49\x77\x57\x24\x70\x93\x69"
11504 "\x99\x59\x57\x49\x66\x96\x76\x27"
11505 "\x31\x41\x59\x26\x53\x58\x97\x93"
11506 "\x23\x84\x62\x64\x33\x83\x27\x95"
11507 "\x02\x88\x41\x97\x16\x93\x99\x37"
11508 "\x51\x05\x82\x09\x74\x94\x45\x92",
11509 .klen = 64,
11510 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11511 "\x00\x00\x00\x00\x00\x00\x00\x00",
11512 "\x00\x00\x00\x00\x00\x00\x00\x00",
11513 "\x00\x00\x00\x00\x00\x00\x00\x00",
11514 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
11515 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
11516 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
11517 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
11518 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
11519 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
11520 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
11521 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
11522 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
11523 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
11524 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
11525 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
11526 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
11527 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
11528 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
11529 "\x00\x02\x08\x87\x89\x14\x29\xca"
11530 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
11531 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
11532 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
11533 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
11534 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
11535 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
11536 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
11537 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
11538 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
11539 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
11540 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
11541 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
11542 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
11543 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
11544 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
11545 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
11546 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
11547 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
11548 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
11549 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
11550 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
11551 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
11552 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
11553 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
11554 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
11555 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
11556 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
11557 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
11558 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
11559 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
11560 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
11561 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
11562 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
11563 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
11564 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
11565 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
11566 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
11567 "\x94\x30\x54\xff\x84\x01\x14\x93"
11568 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
11569 "\x53\x76\x44\x1a\x77\xed\x43\x85"
11570 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
11571 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
11572 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
11573 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
11574 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
11575 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
11576 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
11577 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
11578 .ilen = 512,
11579 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11580 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11581 "\x10\x11\x12\x13\x14\x15\x16\x17"
11582 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11583 "\x20\x21\x22\x23\x24\x25\x26\x27"
11584 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11585 "\x30\x31\x32\x33\x34\x35\x36\x37"
11586 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11587 "\x40\x41\x42\x43\x44\x45\x46\x47"
11588 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11589 "\x50\x51\x52\x53\x54\x55\x56\x57"
11590 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11591 "\x60\x61\x62\x63\x64\x65\x66\x67"
11592 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11593 "\x70\x71\x72\x73\x74\x75\x76\x77"
11594 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11595 "\x80\x81\x82\x83\x84\x85\x86\x87"
11596 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11597 "\x90\x91\x92\x93\x94\x95\x96\x97"
11598 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11599 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11600 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11601 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11602 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11603 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11604 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11605 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11606 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11607 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11608 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11609 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11610 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11611 "\x00\x01\x02\x03\x04\x05\x06\x07"
11612 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11613 "\x10\x11\x12\x13\x14\x15\x16\x17"
11614 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11615 "\x20\x21\x22\x23\x24\x25\x26\x27"
11616 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11617 "\x30\x31\x32\x33\x34\x35\x36\x37"
11618 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11619 "\x40\x41\x42\x43\x44\x45\x46\x47"
11620 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11621 "\x50\x51\x52\x53\x54\x55\x56\x57"
11622 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11623 "\x60\x61\x62\x63\x64\x65\x66\x67"
11624 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11625 "\x70\x71\x72\x73\x74\x75\x76\x77"
11626 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11627 "\x80\x81\x82\x83\x84\x85\x86\x87"
11628 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11629 "\x90\x91\x92\x93\x94\x95\x96\x97"
11630 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11631 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11632 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11633 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11634 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11635 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11636 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11637 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11638 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11639 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11640 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11641 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11642 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11643 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011644 .also_non_np = 1,
11645 .np = 2,
11646 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011647 }
11648};
11649
11650
11651static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080011652 { /* From NIST Special Publication 800-38A, Appendix F.5 */
11653 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
11654 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
11655 .klen = 16,
11656 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11657 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11658 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11659 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11660 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11661 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11662 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11663 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11664 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11665 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11666 .ilen = 64,
11667 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
11668 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
11669 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
11670 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
11671 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
11672 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
11673 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
11674 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
11675 .rlen = 64,
11676 }, {
11677 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
11678 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
11679 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
11680 .klen = 24,
11681 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11682 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11683 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11684 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11685 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11686 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11687 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11688 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11689 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11690 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11691 .ilen = 64,
11692 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
11693 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
11694 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
11695 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
11696 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
11697 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
11698 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
11699 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
11700 .rlen = 64,
11701 }, {
11702 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11703 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11704 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11705 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11706 .klen = 32,
11707 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11708 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11709 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11710 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11711 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11712 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11713 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11714 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11715 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11716 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11717 .ilen = 64,
11718 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
11719 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
11720 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
11721 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
11722 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
11723 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
11724 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
11725 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
11726 .rlen = 64,
11727 }
11728};
11729
11730static struct cipher_testvec aes_ctr_dec_tv_template[] = {
11731 { /* From NIST Special Publication 800-38A, Appendix F.5 */
11732 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
11733 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
11734 .klen = 16,
11735 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11736 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11737 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
11738 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
11739 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
11740 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
11741 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
11742 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
11743 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
11744 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
11745 .ilen = 64,
11746 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11747 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11748 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11749 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11750 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11751 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11752 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11753 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11754 .rlen = 64,
11755 }, {
11756 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
11757 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
11758 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
11759 .klen = 24,
11760 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11761 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11762 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
11763 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
11764 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
11765 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
11766 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
11767 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
11768 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
11769 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
11770 .ilen = 64,
11771 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11772 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11773 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11774 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11775 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11776 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11777 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11778 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11779 .rlen = 64,
11780 }, {
11781 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11782 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11783 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11784 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11785 .klen = 32,
11786 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11787 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11788 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
11789 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
11790 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
11791 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
11792 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
11793 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
11794 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
11795 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
11796 .ilen = 64,
11797 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11798 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11799 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11800 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11801 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11802 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11803 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11804 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11805 .rlen = 64,
11806 }
11807};
11808
11809static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080011810 { /* From RFC 3686 */
11811 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
11812 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
11813 "\x00\x00\x00\x30",
11814 .klen = 20,
11815 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
11816 .input = "Single block msg",
11817 .ilen = 16,
11818 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
11819 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
11820 .rlen = 16,
11821 }, {
11822 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
11823 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
11824 "\x00\x6c\xb6\xdb",
11825 .klen = 20,
11826 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
11827 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11828 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11829 "\x10\x11\x12\x13\x14\x15\x16\x17"
11830 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11831 .ilen = 32,
11832 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
11833 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
11834 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
11835 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
11836 .rlen = 32,
11837 }, {
11838 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
11839 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
11840 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
11841 "\x00\x00\x00\x48",
11842 .klen = 28,
11843 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
11844 .input = "Single block msg",
11845 .ilen = 16,
11846 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
11847 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
11848 .rlen = 16,
11849 }, {
11850 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
11851 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
11852 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
11853 "\x00\x96\xb0\x3b",
11854 .klen = 28,
11855 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
11856 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11857 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11858 "\x10\x11\x12\x13\x14\x15\x16\x17"
11859 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11860 .ilen = 32,
11861 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
11862 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
11863 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
11864 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
11865 .rlen = 32,
11866 }, {
11867 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
11868 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
11869 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
11870 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
11871 "\x00\x00\x00\x60",
11872 .klen = 36,
11873 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
11874 .input = "Single block msg",
11875 .ilen = 16,
11876 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
11877 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
11878 .rlen = 16,
11879 }, {
11880 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
11881 "\x07\x96\x36\x58\x79\xef\xf8\x86"
11882 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
11883 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
11884 "\x00\xfa\xac\x24",
11885 .klen = 36,
11886 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
11887 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11888 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11889 "\x10\x11\x12\x13\x14\x15\x16\x17"
11890 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11891 .ilen = 32,
11892 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
11893 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
11894 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
11895 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
11896 .rlen = 32,
11897 }, {
11898 // generated using Crypto++
11899 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
11900 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11901 "\x10\x11\x12\x13\x14\x15\x16\x17"
11902 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11903 "\x00\x00\x00\x00",
11904 .klen = 32 + 4,
11905 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
11906 .input =
11907 "\x00\x01\x02\x03\x04\x05\x06\x07"
11908 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11909 "\x10\x11\x12\x13\x14\x15\x16\x17"
11910 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11911 "\x20\x21\x22\x23\x24\x25\x26\x27"
11912 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11913 "\x30\x31\x32\x33\x34\x35\x36\x37"
11914 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11915 "\x40\x41\x42\x43\x44\x45\x46\x47"
11916 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11917 "\x50\x51\x52\x53\x54\x55\x56\x57"
11918 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11919 "\x60\x61\x62\x63\x64\x65\x66\x67"
11920 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11921 "\x70\x71\x72\x73\x74\x75\x76\x77"
11922 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11923 "\x80\x81\x82\x83\x84\x85\x86\x87"
11924 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11925 "\x90\x91\x92\x93\x94\x95\x96\x97"
11926 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11927 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11928 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11929 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11930 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11931 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11932 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11933 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11934 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11935 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11936 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11937 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11938 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11939 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
11940 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
11941 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
11942 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
11943 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
11944 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
11945 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
11946 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
11947 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
11948 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
11949 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
11950 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
11951 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
11952 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
11953 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
11954 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
11955 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
11956 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
11957 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
11958 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
11959 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
11960 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
11961 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
11962 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
11963 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
11964 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
11965 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
11966 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
11967 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
11968 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
11969 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
11970 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
11971 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
11972 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
11973 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
11974 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
11975 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
11976 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
11977 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
11978 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
11979 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
11980 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
11981 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
11982 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
11983 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
11984 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
11985 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
11986 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
11987 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
11988 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
11989 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
11990 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
11991 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
11992 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
11993 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
11994 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
11995 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
11996 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
11997 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
11998 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
11999 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
12000 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
12001 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
12002 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
12003 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
12004 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
12005 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
12006 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
12007 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
12008 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
12009 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
12010 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
12011 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
12012 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
12013 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
12014 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
12015 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
12016 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
12017 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
12018 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
12019 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
12020 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
12021 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
12022 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
12023 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
12024 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
12025 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
12026 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
12027 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
12028 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
12029 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
12030 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
12031 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
12032 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
12033 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
12034 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
12035 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
12036 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
12037 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
12038 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
12039 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
12040 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
12041 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
12042 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
12043 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
12044 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
12045 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
12046 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
12047 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
12048 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
12049 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
12050 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
12051 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
12052 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
12053 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
12054 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
12055 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
12056 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
12057 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
12058 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
12059 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
12060 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
12061 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
12062 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
12063 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
12064 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
12065 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
12066 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
12067 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
12068 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
12069 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
12070 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
12071 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
12072 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
12073 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
12074 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
12075 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
12076 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
12077 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
12078 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
12079 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
12080 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
12081 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
12082 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
12083 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
12084 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
12085 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
12086 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
12087 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
12088 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
12089 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
12090 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
12091 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
12092 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
12093 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
12094 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
12095 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
12096 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
12097 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
12098 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
12099 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
12100 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
12101 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
12102 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
12103 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
12104 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
12105 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
12106 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
12107 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
12108 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
12109 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
12110 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
12111 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
12112 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
12113 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
12114 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
12115 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
12116 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
12117 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
12118 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
12119 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
12120 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
12121 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
12122 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
12123 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
12124 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
12125 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
12126 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
12127 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
12128 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
12129 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
12130 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
12131 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
12132 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
12133 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
12134 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
12135 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
12136 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
12137 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
12138 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
12139 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
12140 "\x38\x47\x56\x65\x74\x83\x92\xa1"
12141 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
12142 "\x28\x37\x46\x55\x64\x73\x82\x91"
12143 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
12144 "\x18\x27\x36\x45\x54\x63\x72\x81"
12145 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
12146 "\x08\x17\x26\x35\x44\x53\x62\x71"
12147 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
12148 "\xf8\x07\x16\x25\x34\x43\x52\x61"
12149 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
12150 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
12151 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
12152 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
12153 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
12154 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
12155 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
12156 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
12157 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
12158 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
12159 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
12160 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
12161 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
12162 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
12163 "\x00\x11\x22\x33\x44\x55\x66\x77"
12164 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
12165 "\x10\x21\x32\x43\x54\x65\x76\x87"
12166 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
12167 "\x20\x31\x42\x53\x64\x75\x86\x97"
12168 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
12169 "\x30\x41\x52\x63\x74\x85\x96\xa7"
12170 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
12171 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
12172 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
12173 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
12174 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
12175 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
12176 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
12177 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
12178 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
12179 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
12180 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
12181 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
12182 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
12183 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
12184 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
12185 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
12186 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
12187 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
12188 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
12189 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
12190 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
12191 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
12192 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
12193 "\xf0\x01\x12\x23\x34\x45\x56\x67"
12194 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
12195 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
12196 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
12197 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
12198 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
12199 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
12200 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
12201 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
12202 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
12203 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
12204 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
12205 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
12206 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
12207 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
12208 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
12209 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
12210 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
12211 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
12212 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
12213 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
12214 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
12215 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
12216 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
12217 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
12218 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
12219 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
12220 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
12221 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
12222 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
12223 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
12224 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
12225 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
12226 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
12227 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
12228 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
12229 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
12230 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
12231 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
12232 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
12233 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
12234 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
12235 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
12236 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
12237 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
12238 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
12239 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
12240 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
12241 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
12242 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
12243 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
12244 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
12245 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
12246 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
12247 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
12248 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
12249 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
12250 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
12251 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
12252 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
12253 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
12254 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
12255 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
12256 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
12257 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
12258 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
12259 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
12260 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
12261 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
12262 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
12263 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
12264 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
12265 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
12266 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
12267 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
12268 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
12269 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
12270 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
12271 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
12272 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
12273 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
12274 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
12275 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
12276 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
12277 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
12278 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
12279 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
12280 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
12281 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
12282 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
12283 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
12284 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
12285 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
12286 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
12287 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
12288 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
12289 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
12290 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
12291 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
12292 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
12293 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
12294 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
12295 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
12296 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
12297 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
12298 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
12299 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
12300 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
12301 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
12302 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
12303 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
12304 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
12305 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
12306 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
12307 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
12308 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
12309 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
12310 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
12311 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
12312 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
12313 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
12314 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
12315 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
12316 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
12317 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
12318 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
12319 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
12320 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
12321 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
12322 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
12323 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
12324 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
12325 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
12326 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
12327 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
12328 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
12329 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
12330 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
12331 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
12332 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
12333 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
12334 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
12335 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
12336 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
12337 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
12338 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
12339 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
12340 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
12341 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
12342 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
12343 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
12344 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
12345 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
12346 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
12347 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
12348 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
12349 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
12350 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
12351 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
12352 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
12353 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
12354 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
12355 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
12356 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
12357 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
12358 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
12359 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
12360 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
12361 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
12362 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
12363 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
12364 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
12365 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
12366 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
12367 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
12368 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
12369 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
12370 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
12371 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
12372 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
12373 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
12374 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
12375 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
12376 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
12377 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
12378 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
12379 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
12380 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
12381 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
12382 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
12383 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
12384 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
12385 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
12386 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
12387 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
12388 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
12389 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
12390 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
12391 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
12392 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
12393 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
12394 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
12395 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
12396 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
12397 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
12398 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
12399 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
12400 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
12401 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
12402 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
12403 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
12404 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
12405 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
12406 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
12407 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
12408 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
12409 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
12410 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
12411 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
12412 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
12413 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
12414 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
12415 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
12416 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
12417 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
12418 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
12419 "\x00\x21\x42\x63",
12420 .ilen = 4100,
12421 .result =
12422 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
12423 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
12424 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
12425 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
12426 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
12427 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
12428 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
12429 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
12430 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
12431 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
12432 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
12433 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
12434 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
12435 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
12436 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
12437 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
12438 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
12439 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
12440 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
12441 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
12442 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
12443 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
12444 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
12445 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
12446 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
12447 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
12448 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
12449 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
12450 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
12451 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
12452 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
12453 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
12454 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
12455 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
12456 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
12457 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
12458 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
12459 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
12460 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
12461 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
12462 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
12463 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
12464 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
12465 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
12466 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
12467 "\x04\x02\xef\xd3\x44\xde\x76\x31"
12468 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
12469 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
12470 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
12471 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
12472 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
12473 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
12474 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
12475 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
12476 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
12477 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
12478 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
12479 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
12480 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
12481 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
12482 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
12483 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
12484 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
12485 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
12486 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
12487 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
12488 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
12489 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
12490 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
12491 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
12492 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
12493 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
12494 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
12495 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
12496 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
12497 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
12498 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
12499 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
12500 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
12501 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
12502 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
12503 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
12504 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
12505 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
12506 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
12507 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
12508 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
12509 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
12510 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
12511 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
12512 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
12513 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
12514 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
12515 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
12516 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
12517 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
12518 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
12519 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
12520 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
12521 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
12522 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
12523 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
12524 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
12525 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
12526 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
12527 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
12528 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
12529 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
12530 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
12531 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
12532 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
12533 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
12534 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
12535 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
12536 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
12537 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
12538 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
12539 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
12540 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
12541 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
12542 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
12543 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
12544 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
12545 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
12546 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
12547 "\x26\x39\x83\x94\xef\x27\xd8\x53"
12548 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
12549 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
12550 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
12551 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
12552 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
12553 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
12554 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
12555 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
12556 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
12557 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
12558 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
12559 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
12560 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
12561 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
12562 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
12563 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
12564 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
12565 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
12566 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
12567 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
12568 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
12569 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
12570 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
12571 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
12572 "\x35\x12\xe3\x36\x28\x27\x36\x58"
12573 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
12574 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
12575 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
12576 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
12577 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
12578 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
12579 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
12580 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
12581 "\x89\xf3\x78\x35\x44\x62\x78\x72"
12582 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
12583 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
12584 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
12585 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
12586 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
12587 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
12588 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
12589 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
12590 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
12591 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
12592 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
12593 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
12594 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
12595 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
12596 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
12597 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
12598 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
12599 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
12600 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
12601 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
12602 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
12603 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
12604 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
12605 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
12606 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
12607 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
12608 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
12609 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
12610 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
12611 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
12612 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
12613 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
12614 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
12615 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
12616 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
12617 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
12618 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
12619 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
12620 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
12621 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
12622 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
12623 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
12624 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
12625 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
12626 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
12627 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
12628 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
12629 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
12630 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
12631 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
12632 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
12633 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
12634 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
12635 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
12636 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
12637 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
12638 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
12639 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
12640 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
12641 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
12642 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
12643 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
12644 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
12645 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
12646 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
12647 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
12648 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
12649 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
12650 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
12651 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
12652 "\x29\x90\x46\x30\x92\x69\x7d\x13"
12653 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
12654 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
12655 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
12656 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
12657 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
12658 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
12659 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
12660 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
12661 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
12662 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
12663 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
12664 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
12665 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
12666 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
12667 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
12668 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
12669 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
12670 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
12671 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
12672 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
12673 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
12674 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
12675 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
12676 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
12677 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
12678 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
12679 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
12680 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
12681 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
12682 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
12683 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
12684 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
12685 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
12686 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
12687 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
12688 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
12689 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
12690 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
12691 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
12692 "\x73\x02\x3b\x78\x21\x72\x43\x00"
12693 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
12694 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
12695 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
12696 "\x11\x94\x13\x69\x51\x09\x28\xde"
12697 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
12698 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
12699 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
12700 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
12701 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
12702 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
12703 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
12704 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
12705 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
12706 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
12707 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
12708 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
12709 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
12710 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
12711 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
12712 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
12713 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
12714 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
12715 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
12716 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
12717 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
12718 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
12719 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
12720 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
12721 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
12722 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
12723 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
12724 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
12725 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
12726 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
12727 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
12728 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
12729 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
12730 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
12731 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
12732 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
12733 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
12734 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
12735 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
12736 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
12737 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
12738 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
12739 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
12740 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
12741 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
12742 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
12743 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
12744 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
12745 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
12746 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
12747 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
12748 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
12749 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
12750 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
12751 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
12752 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
12753 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
12754 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
12755 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
12756 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
12757 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
12758 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
12759 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
12760 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
12761 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
12762 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
12763 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
12764 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
12765 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
12766 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
12767 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
12768 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
12769 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
12770 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
12771 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
12772 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
12773 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
12774 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
12775 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
12776 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
12777 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
12778 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
12779 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
12780 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
12781 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
12782 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
12783 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
12784 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
12785 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
12786 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
12787 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
12788 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
12789 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
12790 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
12791 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
12792 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
12793 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
12794 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
12795 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
12796 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
12797 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
12798 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
12799 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
12800 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
12801 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
12802 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
12803 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
12804 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
12805 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
12806 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
12807 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
12808 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
12809 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
12810 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
12811 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
12812 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
12813 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
12814 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
12815 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
12816 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
12817 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
12818 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
12819 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
12820 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
12821 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
12822 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
12823 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
12824 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
12825 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
12826 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
12827 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
12828 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
12829 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
12830 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
12831 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
12832 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
12833 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
12834 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
12835 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
12836 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
12837 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
12838 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
12839 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
12840 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
12841 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
12842 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
12843 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
12844 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
12845 "\xae\xed\x39\x88\x42\x11\x3c\xed"
12846 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
12847 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
12848 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
12849 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
12850 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
12851 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
12852 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
12853 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
12854 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
12855 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
12856 "\x34\x17\xde\xba\x47\xf1\x06\x18"
12857 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
12858 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
12859 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
12860 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
12861 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
12862 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
12863 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
12864 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
12865 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
12866 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
12867 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
12868 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
12869 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
12870 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
12871 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
12872 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
12873 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
12874 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
12875 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
12876 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
12877 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
12878 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
12879 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
12880 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
12881 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
12882 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
12883 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
12884 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
12885 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
12886 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
12887 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
12888 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
12889 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
12890 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
12891 "\x74\x56\x58\x40\x02\x37\x52\x2c"
12892 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
12893 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
12894 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
12895 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
12896 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
12897 "\xed\x38\x80\x36\x72\x43\x27\x49"
12898 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
12899 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
12900 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
12901 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
12902 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
12903 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
12904 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
12905 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
12906 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
12907 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
12908 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
12909 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
12910 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
12911 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
12912 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
12913 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
12914 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
12915 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
12916 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
12917 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
12918 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
12919 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
12920 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
12921 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
12922 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
12923 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
12924 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
12925 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
12926 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
12927 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
12928 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
12929 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
12930 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
12931 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
12932 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
12933 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
12934 "\x21\xed\xda\x86",
12935 .rlen = 4100,
12936 .np = 2,
12937 .tap = { 4064, 36 },
12938 },
12939};
12940
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080012941static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080012942 { /* From RFC 3686 */
12943 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
12944 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
12945 "\x00\x00\x00\x30",
12946 .klen = 20,
12947 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
12948 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
12949 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
12950 .ilen = 16,
12951 .result = "Single block msg",
12952 .rlen = 16,
12953 }, {
12954 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
12955 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
12956 "\x00\x6c\xb6\xdb",
12957 .klen = 20,
12958 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
12959 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
12960 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
12961 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
12962 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
12963 .ilen = 32,
12964 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12965 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12966 "\x10\x11\x12\x13\x14\x15\x16\x17"
12967 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12968 .rlen = 32,
12969 }, {
12970 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
12971 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
12972 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
12973 "\x00\x00\x00\x48",
12974 .klen = 28,
12975 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
12976 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
12977 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
12978 .ilen = 16,
12979 .result = "Single block msg",
12980 .rlen = 16,
12981 }, {
12982 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
12983 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
12984 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
12985 "\x00\x96\xb0\x3b",
12986 .klen = 28,
12987 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
12988 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
12989 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
12990 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
12991 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
12992 .ilen = 32,
12993 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12994 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12995 "\x10\x11\x12\x13\x14\x15\x16\x17"
12996 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12997 .rlen = 32,
12998 }, {
12999 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
13000 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
13001 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
13002 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
13003 "\x00\x00\x00\x60",
13004 .klen = 36,
13005 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
13006 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
13007 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
13008 .ilen = 16,
13009 .result = "Single block msg",
13010 .rlen = 16,
13011 }, {
13012 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
13013 "\x07\x96\x36\x58\x79\xef\xf8\x86"
13014 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
13015 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
13016 "\x00\xfa\xac\x24",
13017 .klen = 36,
13018 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
13019 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
13020 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
13021 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
13022 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
13023 .ilen = 32,
13024 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13025 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13026 "\x10\x11\x12\x13\x14\x15\x16\x17"
13027 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13028 .rlen = 32,
13029 },
13030};
13031
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100013032static struct cipher_testvec aes_ofb_enc_tv_template[] = {
13033 /* From NIST Special Publication 800-38A, Appendix F.5 */
13034 {
13035 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13036 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13037 .klen = 16,
13038 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13039 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13040 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13041 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13042 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13043 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13044 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13045 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13046 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13047 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13048 .ilen = 64,
13049 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13050 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13051 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13052 "\x3c\x52\xda\xc5\x4e\xd8\x25"
13053 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13054 "\x44\xf7\xa8\x22\x60\xed\xcc"
13055 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
13056 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
13057 .rlen = 64,
13058 }
13059};
13060
13061static struct cipher_testvec aes_ofb_dec_tv_template[] = {
13062 /* From NIST Special Publication 800-38A, Appendix F.5 */
13063 {
13064 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13065 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13066 .klen = 16,
13067 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13068 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13069 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13070 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13071 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13072 "\x3c\x52\xda\xc5\x4e\xd8\x25"
13073 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13074 "\x44\xf7\xa8\x22\x60\xed\xcc"
13075 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
13076 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
13077 .ilen = 64,
13078 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13079 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13080 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13081 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13082 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13083 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13084 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13085 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13086 .rlen = 64,
13087 }
13088};
13089
Herbert Xuda7f0332008-07-31 17:08:25 +080013090static struct aead_testvec aes_gcm_enc_tv_template[] = {
13091 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
13092 .key = zeroed_string,
13093 .klen = 16,
13094 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
13095 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
13096 .rlen = 16,
13097 }, {
13098 .key = zeroed_string,
13099 .klen = 16,
13100 .input = zeroed_string,
13101 .ilen = 16,
13102 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
13103 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
13104 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
13105 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
13106 .rlen = 32,
13107 }, {
13108 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13109 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13110 .klen = 16,
13111 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13112 "\xde\xca\xf8\x88",
13113 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13114 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13115 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13116 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13117 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13118 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13119 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13120 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13121 .ilen = 64,
13122 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13123 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13124 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13125 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13126 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13127 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13128 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13129 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
13130 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
13131 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
13132 .rlen = 80,
13133 }, {
13134 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13135 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13136 .klen = 16,
13137 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13138 "\xde\xca\xf8\x88",
13139 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13140 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13141 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13142 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13143 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13144 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13145 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13146 "\xba\x63\x7b\x39",
13147 .ilen = 60,
13148 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13149 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13150 "\xab\xad\xda\xd2",
13151 .alen = 20,
13152 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13153 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13154 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13155 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13156 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13157 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13158 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13159 "\x3d\x58\xe0\x91"
13160 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
13161 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
13162 .rlen = 76,
13163 }, {
13164 .key = zeroed_string,
13165 .klen = 24,
13166 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
13167 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
13168 .rlen = 16,
13169 }, {
13170 .key = zeroed_string,
13171 .klen = 24,
13172 .input = zeroed_string,
13173 .ilen = 16,
13174 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
13175 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
13176 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
13177 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
13178 .rlen = 32,
13179 }, {
13180 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13181 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13182 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13183 .klen = 24,
13184 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13185 "\xde\xca\xf8\x88",
13186 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13187 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13188 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13189 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13190 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13191 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13192 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13193 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13194 .ilen = 64,
13195 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13196 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13197 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13198 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13199 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13200 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13201 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13202 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
13203 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
13204 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
13205 .rlen = 80,
13206 }, {
13207 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13208 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13209 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13210 .klen = 24,
13211 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13212 "\xde\xca\xf8\x88",
13213 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13214 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13215 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13216 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13217 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13218 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13219 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13220 "\xba\x63\x7b\x39",
13221 .ilen = 60,
13222 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13223 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13224 "\xab\xad\xda\xd2",
13225 .alen = 20,
13226 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13227 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13228 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13229 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13230 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13231 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13232 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13233 "\xcc\xda\x27\x10"
13234 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
13235 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
13236 .rlen = 76,
13237 .np = 2,
13238 .tap = { 32, 28 },
13239 .anp = 2,
13240 .atap = { 8, 12 }
13241 }, {
13242 .key = zeroed_string,
13243 .klen = 32,
13244 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
13245 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
13246 .rlen = 16,
13247 }
13248};
13249
13250static struct aead_testvec aes_gcm_dec_tv_template[] = {
13251 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
13252 .key = zeroed_string,
13253 .klen = 32,
13254 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
13255 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
13256 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
13257 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
13258 .ilen = 32,
13259 .result = zeroed_string,
13260 .rlen = 16,
13261 }, {
13262 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13263 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13264 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13265 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13266 .klen = 32,
13267 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13268 "\xde\xca\xf8\x88",
13269 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
13270 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
13271 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
13272 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
13273 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
13274 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
13275 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
13276 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
13277 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
13278 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
13279 .ilen = 80,
13280 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13281 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13282 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13283 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13284 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13285 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13286 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13287 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13288 .rlen = 64,
13289 }, {
13290 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13291 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13292 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13293 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13294 .klen = 32,
13295 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13296 "\xde\xca\xf8\x88",
13297 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
13298 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
13299 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
13300 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
13301 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
13302 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
13303 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
13304 "\xbc\xc9\xf6\x62"
13305 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
13306 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
13307 .ilen = 76,
13308 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13309 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13310 "\xab\xad\xda\xd2",
13311 .alen = 20,
13312 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13313 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13314 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13315 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13316 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13317 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13318 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13319 "\xba\x63\x7b\x39",
13320 .rlen = 60,
13321 .np = 2,
13322 .tap = { 48, 28 },
13323 .anp = 3,
13324 .atap = { 8, 8, 4 }
13325 }, {
13326 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13327 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13328 .klen = 16,
13329 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13330 "\xde\xca\xf8\x88",
13331 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13332 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13333 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13334 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13335 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13336 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13337 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13338 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
13339 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
13340 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
13341 .ilen = 80,
13342 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13343 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13344 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13345 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13346 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13347 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13348 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13349 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13350 .rlen = 64,
13351 }, {
13352 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13353 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13354 .klen = 16,
13355 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13356 "\xde\xca\xf8\x88",
13357 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13358 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13359 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13360 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13361 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13362 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13363 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13364 "\x3d\x58\xe0\x91"
13365 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
13366 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
13367 .ilen = 76,
13368 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13369 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13370 "\xab\xad\xda\xd2",
13371 .alen = 20,
13372 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13373 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13374 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13375 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13376 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13377 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13378 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13379 "\xba\x63\x7b\x39",
13380 .rlen = 60,
13381 }, {
13382 .key = zeroed_string,
13383 .klen = 24,
13384 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
13385 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
13386 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
13387 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
13388 .ilen = 32,
13389 .result = zeroed_string,
13390 .rlen = 16,
13391 }, {
13392 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13393 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13394 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13395 .klen = 24,
13396 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13397 "\xde\xca\xf8\x88",
13398 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13399 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13400 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13401 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13402 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13403 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13404 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13405 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
13406 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
13407 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
13408 .ilen = 80,
13409 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13410 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13411 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13412 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13413 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13414 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13415 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13416 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13417 .rlen = 64,
13418 }, {
13419 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13420 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13421 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13422 .klen = 24,
13423 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13424 "\xde\xca\xf8\x88",
13425 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13426 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13427 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13428 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13429 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13430 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13431 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13432 "\xcc\xda\x27\x10"
13433 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
13434 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
13435 .ilen = 76,
13436 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13437 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13438 "\xab\xad\xda\xd2",
13439 .alen = 20,
13440 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13441 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13442 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13443 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13444 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13445 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13446 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13447 "\xba\x63\x7b\x39",
13448 .rlen = 60,
13449 }
13450};
13451
Adrian Hoban69435b92010-11-04 15:02:04 -040013452static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
13453 { /* Generated using Crypto++ */
13454 .key = zeroed_string,
13455 .klen = 20,
13456 .iv = zeroed_string,
13457 .input = zeroed_string,
13458 .ilen = 16,
13459 .assoc = zeroed_string,
13460 .alen = 8,
13461 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
13462 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
13463 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
13464 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
13465 .rlen = 32,
13466 },{
13467 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13468 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13469 "\x00\x00\x00\x00",
13470 .klen = 20,
13471 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13472 "\x00\x00\x00\x00",
13473 .input = zeroed_string,
13474 .ilen = 16,
13475 .assoc = zeroed_string,
13476 .alen = 8,
13477 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
13478 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
13479 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
13480 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
13481 .rlen = 32,
13482
13483 }, {
13484 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13485 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13486 "\x00\x00\x00\x00",
13487 .klen = 20,
13488 .iv = zeroed_string,
13489 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
13490 "\x01\x01\x01\x01\x01\x01\x01\x01",
13491 .ilen = 16,
13492 .assoc = zeroed_string,
13493 .alen = 8,
13494 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13495 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13496 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
13497 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
13498 .rlen = 32,
13499 }, {
13500 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13501 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13502 "\x00\x00\x00\x00",
13503 .klen = 20,
13504 .iv = zeroed_string,
13505 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
13506 "\x01\x01\x01\x01\x01\x01\x01\x01",
13507 .ilen = 16,
13508 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13509 .alen = 8,
13510 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13511 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13512 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
13513 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
13514 .rlen = 32,
13515 }, {
13516 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13517 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13518 "\x00\x00\x00\x00",
13519 .klen = 20,
13520 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13521 "\x00\x00\x00\x00",
13522 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
13523 "\x01\x01\x01\x01\x01\x01\x01\x01",
13524 .ilen = 16,
13525 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13526 .alen = 8,
13527 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13528 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13529 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
13530 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
13531 .rlen = 32,
13532 }, {
13533 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13534 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13535 "\x00\x00\x00\x00",
13536 .klen = 20,
13537 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13538 "\x00\x00\x00\x00",
13539 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
13540 "\x01\x01\x01\x01\x01\x01\x01\x01"
13541 "\x01\x01\x01\x01\x01\x01\x01\x01"
13542 "\x01\x01\x01\x01\x01\x01\x01\x01"
13543 "\x01\x01\x01\x01\x01\x01\x01\x01"
13544 "\x01\x01\x01\x01\x01\x01\x01\x01"
13545 "\x01\x01\x01\x01\x01\x01\x01\x01"
13546 "\x01\x01\x01\x01\x01\x01\x01\x01",
13547 .ilen = 64,
13548 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13549 .alen = 8,
13550 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13551 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13552 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
13553 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
13554 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
13555 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
13556 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
13557 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
13558 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
13559 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
13560 .rlen = 80,
13561 }, {
13562 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13563 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13564 "\x00\x00\x00\x00",
13565 .klen = 20,
13566 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
13567 "\x00\x00\x00\x00",
13568 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
13569 "\xff\xff\xff\xff\xff\xff\xff\xff"
13570 "\xff\xff\xff\xff\xff\xff\xff\xff"
13571 "\xff\xff\xff\xff\xff\xff\xff\xff"
13572 "\xff\xff\xff\xff\xff\xff\xff\xff"
13573 "\xff\xff\xff\xff\xff\xff\xff\xff"
13574 "\xff\xff\xff\xff\xff\xff\xff\xff"
13575 "\xff\xff\xff\xff\xff\xff\xff\xff"
13576 "\xff\xff\xff\xff\xff\xff\xff\xff"
13577 "\xff\xff\xff\xff\xff\xff\xff\xff"
13578 "\xff\xff\xff\xff\xff\xff\xff\xff"
13579 "\xff\xff\xff\xff\xff\xff\xff\xff"
13580 "\xff\xff\xff\xff\xff\xff\xff\xff"
13581 "\xff\xff\xff\xff\xff\xff\xff\xff"
13582 "\xff\xff\xff\xff\xff\xff\xff\xff"
13583 "\xff\xff\xff\xff\xff\xff\xff\xff"
13584 "\xff\xff\xff\xff\xff\xff\xff\xff"
13585 "\xff\xff\xff\xff\xff\xff\xff\xff"
13586 "\xff\xff\xff\xff\xff\xff\xff\xff"
13587 "\xff\xff\xff\xff\xff\xff\xff\xff"
13588 "\xff\xff\xff\xff\xff\xff\xff\xff"
13589 "\xff\xff\xff\xff\xff\xff\xff\xff"
13590 "\xff\xff\xff\xff\xff\xff\xff\xff"
13591 "\xff\xff\xff\xff\xff\xff\xff\xff",
13592 .ilen = 192,
13593 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
13594 "\xaa\xaa\xaa\xaa",
13595 .alen = 12,
13596 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
13597 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
13598 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
13599 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
13600 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
13601 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
13602 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
13603 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
13604 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
13605 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
13606 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
13607 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
13608 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
13609 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
13610 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
13611 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
13612 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
13613 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
13614 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
13615 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
13616 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
13617 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
13618 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
13619 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
13620 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
13621 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
13622 .rlen = 208,
13623 }
13624};
13625
13626static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
13627 { /* Generated using Crypto++ */
13628 .key = zeroed_string,
13629 .klen = 20,
13630 .iv = zeroed_string,
13631 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
13632 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
13633 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
13634 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
13635 .ilen = 32,
13636 .assoc = zeroed_string,
13637 .alen = 8,
13638 .result = zeroed_string,
13639 .rlen = 16,
13640
13641 },{
13642 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13643 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13644 "\x00\x00\x00\x00",
13645 .klen = 20,
13646 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13647 "\x00\x00\x00\x00",
13648 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
13649 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
13650 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
13651 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
13652 .ilen = 32,
13653 .assoc = zeroed_string,
13654 .alen = 8,
13655 .result = zeroed_string,
13656 .rlen = 16,
13657 }, {
13658 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13659 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13660 "\x00\x00\x00\x00",
13661 .klen = 20,
13662 .iv = zeroed_string,
13663 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13664 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13665 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
13666 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
13667 .ilen = 32,
13668 .assoc = zeroed_string,
13669 .alen = 8,
13670 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13671 "\x01\x01\x01\x01\x01\x01\x01\x01",
13672 .rlen = 16,
13673 }, {
13674 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13675 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13676 "\x00\x00\x00\x00",
13677 .klen = 20,
13678 .iv = zeroed_string,
13679 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13680 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13681 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
13682 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
13683 .ilen = 32,
13684 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13685 .alen = 8,
13686 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13687 "\x01\x01\x01\x01\x01\x01\x01\x01",
13688 .rlen = 16,
13689
13690 }, {
13691 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13692 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13693 "\x00\x00\x00\x00",
13694 .klen = 20,
13695 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13696 "\x00\x00\x00\x00",
13697 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13698 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13699 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
13700 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
13701 .ilen = 32,
13702 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13703 .alen = 8,
13704 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13705 "\x01\x01\x01\x01\x01\x01\x01\x01",
13706 .rlen = 16,
13707 }, {
13708 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13709 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13710 "\x00\x00\x00\x00",
13711 .klen = 20,
13712 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
13713 "\x00\x00\x00\x00",
13714 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13715 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13716 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
13717 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
13718 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
13719 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
13720 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
13721 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
13722 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
13723 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
13724 .ilen = 80,
13725 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
13726 .alen = 8,
13727 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13728 "\x01\x01\x01\x01\x01\x01\x01\x01"
13729 "\x01\x01\x01\x01\x01\x01\x01\x01"
13730 "\x01\x01\x01\x01\x01\x01\x01\x01"
13731 "\x01\x01\x01\x01\x01\x01\x01\x01"
13732 "\x01\x01\x01\x01\x01\x01\x01\x01"
13733 "\x01\x01\x01\x01\x01\x01\x01\x01"
13734 "\x01\x01\x01\x01\x01\x01\x01\x01",
13735 .rlen = 64,
13736 }, {
13737 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13738 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13739 "\x00\x00\x00\x00",
13740 .klen = 20,
13741 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
13742 "\x00\x00\x00\x00",
13743 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
13744 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
13745 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
13746 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
13747 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
13748 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
13749 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
13750 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
13751 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
13752 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
13753 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
13754 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
13755 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
13756 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
13757 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
13758 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
13759 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
13760 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
13761 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
13762 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
13763 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
13764 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
13765 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
13766 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
13767 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
13768 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
13769 .ilen = 208,
13770 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
13771 "\xaa\xaa\xaa\xaa",
13772 .alen = 12,
13773 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
13774 "\xff\xff\xff\xff\xff\xff\xff\xff"
13775 "\xff\xff\xff\xff\xff\xff\xff\xff"
13776 "\xff\xff\xff\xff\xff\xff\xff\xff"
13777 "\xff\xff\xff\xff\xff\xff\xff\xff"
13778 "\xff\xff\xff\xff\xff\xff\xff\xff"
13779 "\xff\xff\xff\xff\xff\xff\xff\xff"
13780 "\xff\xff\xff\xff\xff\xff\xff\xff"
13781 "\xff\xff\xff\xff\xff\xff\xff\xff"
13782 "\xff\xff\xff\xff\xff\xff\xff\xff"
13783 "\xff\xff\xff\xff\xff\xff\xff\xff"
13784 "\xff\xff\xff\xff\xff\xff\xff\xff"
13785 "\xff\xff\xff\xff\xff\xff\xff\xff"
13786 "\xff\xff\xff\xff\xff\xff\xff\xff"
13787 "\xff\xff\xff\xff\xff\xff\xff\xff"
13788 "\xff\xff\xff\xff\xff\xff\xff\xff"
13789 "\xff\xff\xff\xff\xff\xff\xff\xff"
13790 "\xff\xff\xff\xff\xff\xff\xff\xff"
13791 "\xff\xff\xff\xff\xff\xff\xff\xff"
13792 "\xff\xff\xff\xff\xff\xff\xff\xff"
13793 "\xff\xff\xff\xff\xff\xff\xff\xff"
13794 "\xff\xff\xff\xff\xff\xff\xff\xff"
13795 "\xff\xff\xff\xff\xff\xff\xff\xff"
13796 "\xff\xff\xff\xff\xff\xff\xff\xff",
13797 .rlen = 192,
13798
13799 }
13800};
13801
Herbert Xuda7f0332008-07-31 17:08:25 +080013802static struct aead_testvec aes_ccm_enc_tv_template[] = {
13803 { /* From RFC 3610 */
13804 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13805 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13806 .klen = 16,
13807 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
13808 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13809 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13810 .alen = 8,
13811 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13812 "\x10\x11\x12\x13\x14\x15\x16\x17"
13813 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
13814 .ilen = 23,
13815 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
13816 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
13817 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
13818 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
13819 .rlen = 31,
13820 }, {
13821 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13822 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13823 .klen = 16,
13824 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
13825 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13826 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13827 "\x08\x09\x0a\x0b",
13828 .alen = 12,
13829 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13830 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13831 "\x1c\x1d\x1e\x1f",
13832 .ilen = 20,
13833 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
13834 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
13835 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
13836 "\x7d\x9c\x2d\x93",
13837 .rlen = 28,
13838 }, {
13839 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13840 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13841 .klen = 16,
13842 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13843 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13844 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13845 .alen = 8,
13846 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13847 "\x10\x11\x12\x13\x14\x15\x16\x17"
13848 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13849 "\x20",
13850 .ilen = 25,
13851 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13852 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13853 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13854 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13855 "\x7e\x5f\x4e",
13856 .rlen = 35,
13857 }, {
13858 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13859 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13860 .klen = 16,
13861 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13862 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13863 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13864 "\x08\x09\x0a\x0b",
13865 .alen = 12,
13866 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13867 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13868 "\x1c\x1d\x1e",
13869 .ilen = 19,
13870 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
13871 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13872 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13873 "\x4d\x99\x99\x88\xdd",
13874 .rlen = 29,
13875 }, {
13876 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13877 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13878 .klen = 16,
13879 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
13880 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13881 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
13882 .alen = 8,
13883 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
13884 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
13885 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
13886 .ilen = 24,
13887 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
13888 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
13889 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
13890 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
13891 .rlen = 32,
13892 }, {
13893 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13894 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13895 .klen = 16,
13896 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
13897 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13898 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
13899 "\x20\xea\x60\xc0",
13900 .alen = 12,
13901 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
13902 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
13903 "\x3a\x80\x3b\xa8\x7f",
13904 .ilen = 21,
13905 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
13906 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
13907 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
13908 "\x5a\xe0\x70\x45\x51",
13909 .rlen = 29,
13910 }, {
13911 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13912 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13913 .klen = 16,
13914 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
13915 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13916 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
13917 .alen = 8,
13918 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
13919 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
13920 "\x98\x09\xd6\x7d\xbe\xdd\x18",
13921 .ilen = 23,
13922 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
13923 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
13924 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
13925 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
13926 "\xba",
13927 .rlen = 33,
13928 },
13929};
13930
13931static struct aead_testvec aes_ccm_dec_tv_template[] = {
13932 { /* From RFC 3610 */
13933 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13934 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13935 .klen = 16,
13936 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
13937 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13938 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13939 .alen = 8,
13940 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
13941 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
13942 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
13943 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
13944 .ilen = 31,
13945 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13946 "\x10\x11\x12\x13\x14\x15\x16\x17"
13947 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
13948 .rlen = 23,
13949 }, {
13950 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13951 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13952 .klen = 16,
13953 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
13954 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13955 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13956 "\x08\x09\x0a\x0b",
13957 .alen = 12,
13958 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
13959 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
13960 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
13961 "\x7d\x9c\x2d\x93",
13962 .ilen = 28,
13963 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13964 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13965 "\x1c\x1d\x1e\x1f",
13966 .rlen = 20,
13967 }, {
13968 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13969 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13970 .klen = 16,
13971 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13972 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13973 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
13974 .alen = 8,
13975 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13976 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13977 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13978 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13979 "\x7e\x5f\x4e",
13980 .ilen = 35,
13981 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13982 "\x10\x11\x12\x13\x14\x15\x16\x17"
13983 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13984 "\x20",
13985 .rlen = 25,
13986 }, {
13987 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13988 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13989 .klen = 16,
13990 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13991 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13992 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
13993 "\x08\x09\x0a\x0b",
13994 .alen = 12,
13995 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
13996 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13997 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13998 "\x4d\x99\x99\x88\xdd",
13999 .ilen = 29,
14000 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
14001 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
14002 "\x1c\x1d\x1e",
14003 .rlen = 19,
14004 }, {
14005 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14006 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14007 .klen = 16,
14008 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
14009 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14010 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
14011 .alen = 8,
14012 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
14013 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
14014 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
14015 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
14016 .ilen = 32,
14017 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
14018 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
14019 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
14020 .rlen = 24,
14021 }, {
14022 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14023 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14024 .klen = 16,
14025 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
14026 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14027 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
14028 "\x20\xea\x60\xc0",
14029 .alen = 12,
14030 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
14031 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
14032 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
14033 "\x5a\xe0\x70\x45\x51",
14034 .ilen = 29,
14035 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
14036 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
14037 "\x3a\x80\x3b\xa8\x7f",
14038 .rlen = 21,
14039 }, {
14040 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14041 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14042 .klen = 16,
14043 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
14044 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14045 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
14046 .alen = 8,
14047 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
14048 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
14049 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
14050 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
14051 "\xba",
14052 .ilen = 33,
14053 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
14054 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
14055 "\x98\x09\xd6\x7d\xbe\xdd\x18",
14056 .rlen = 23,
14057 },
14058};
14059
Jarod Wilson5d667322009-05-04 19:23:40 +080014060/*
14061 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
14062 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
14063 * Special Publication 800-38C's test vectors also use nonce lengths our
14064 * implementation doesn't support. The following are taken from fips cavs
14065 * fax files on hand at Red Hat.
14066 *
14067 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
14068 * part of the nonce which combine w/the iv, but need to be input this way.
14069 */
14070static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
14071 {
14072 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
14073 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
14074 "\x96\xac\x59",
14075 .klen = 19,
14076 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
14077 .alen = 0,
14078 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
14079 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
14080 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
14081 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
14082 .ilen = 32,
14083 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
14084 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
14085 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
14086 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
14087 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
14088 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
14089 .rlen = 48,
14090 }, {
14091 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
14092 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
14093 "\x4f\xa3\x19",
14094 .klen = 19,
14095 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
14096 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
14097 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
14098 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
14099 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
14100 .alen = 32,
14101 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
14102 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
14103 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
14104 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
14105 .ilen = 32,
14106 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
14107 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
14108 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
14109 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
14110 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
14111 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
14112 .rlen = 48,
14113 }, {
14114 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
14115 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
14116 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
14117 "\xa0\x20\x35",
14118 .klen = 27,
14119 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
14120 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
14121 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
14122 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
14123 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
14124 .alen = 32,
14125 .ilen = 0,
14126 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
14127 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
14128 .rlen = 16,
14129 }, {
14130 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
14131 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
14132 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
14133 "\xd6\x3c\x8c",
14134 .klen = 27,
14135 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
14136 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
14137 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
14138 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
14139 "\xe3\x00\x73\x69\x84\x69\x87\x79",
14140 .alen = 32,
14141 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
14142 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
14143 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
14144 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
14145 .ilen = 32,
14146 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
14147 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
14148 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
14149 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
14150 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
14151 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
14152 .rlen = 48,
14153 }, {
14154 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
14155 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
14156 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
14157 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
14158 "\x1e\x29\x91",
14159 .klen = 35,
14160 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
14161 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
14162 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
14163 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
14164 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
14165 .alen = 32,
14166 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
14167 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
14168 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
14169 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
14170 .ilen = 32,
14171 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
14172 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
14173 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
14174 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
14175 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
14176 .rlen = 40,
14177 }, {
14178 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
14179 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
14180 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
14181 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
14182 "\xf9\xd9\x4e",
14183 .klen = 35,
14184 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
14185 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
14186 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
14187 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
14188 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
14189 .alen = 32,
14190 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
14191 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
14192 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
14193 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
14194 .ilen = 32,
14195 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
14196 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
14197 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
14198 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
14199 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
14200 "\x7b\x72\x8a\xf7",
14201 .rlen = 44,
14202 }, {
14203 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
14204 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
14205 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
14206 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
14207 "\x24\xa7\x8b",
14208 .klen = 35,
14209 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
14210 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
14211 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
14212 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
14213 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
14214 .alen = 32,
14215 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
14216 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
14217 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
14218 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
14219 .ilen = 32,
14220 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
14221 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
14222 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
14223 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
14224 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
14225 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
14226 .rlen = 48,
14227 },
14228};
14229
14230static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
14231 {
14232 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
14233 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
14234 "\xc6\xfb\x7d",
14235 .klen = 19,
14236 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
14237 .alen = 0,
14238 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
14239 .ilen = 8,
14240 .result = "\x00",
14241 .rlen = 0,
14242 .novrfy = 1,
14243 }, {
14244 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
14245 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
14246 "\xaf\x94\x87",
14247 .klen = 19,
14248 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
14249 .alen = 0,
14250 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
14251 .ilen = 8,
14252 .result = "\x00",
14253 .rlen = 0,
14254 }, {
14255 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
14256 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
14257 "\xc6\xfb\x7d",
14258 .klen = 19,
14259 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
14260 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
14261 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
14262 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
14263 "\xd8\x94\x99\x91\x81\x54\x62\x57",
14264 .alen = 32,
14265 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
14266 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
14267 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
14268 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
14269 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
14270 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
14271 .ilen = 48,
14272 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
14273 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
14274 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
14275 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
14276 .rlen = 32,
14277 .novrfy = 1,
14278 }, {
14279 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
14280 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
14281 "\x05\xe0\xc9",
14282 .klen = 19,
14283 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
14284 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
14285 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
14286 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
14287 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
14288 .alen = 32,
14289 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
14290 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
14291 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
14292 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
14293 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
14294 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
14295 .ilen = 48,
14296 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
14297 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
14298 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
14299 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
14300 .rlen = 32,
14301 }, {
14302 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
14303 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
14304 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
14305 "\xee\x49\x83",
14306 .klen = 27,
14307 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14308 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
14309 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
14310 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
14311 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
14312 .alen = 32,
14313 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
14314 .ilen = 8,
14315 .result = "\x00",
14316 .rlen = 0,
14317 }, {
14318 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14319 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14320 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14321 "\xee\x49\x83",
14322 .klen = 27,
14323 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14324 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
14325 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
14326 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
14327 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
14328 .alen = 32,
14329 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
14330 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
14331 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
14332 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
14333 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
14334 .ilen = 40,
14335 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
14336 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
14337 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
14338 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
14339 .rlen = 32,
14340 }, {
14341 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14342 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14343 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14344 "\xd1\xfc\x57",
14345 .klen = 27,
14346 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
14347 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
14348 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
14349 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
14350 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
14351 .alen = 32,
14352 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
14353 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
14354 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
14355 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
14356 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
14357 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
14358 .ilen = 48,
14359 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
14360 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
14361 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
14362 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
14363 .rlen = 32,
14364 .novrfy = 1,
14365 }, {
14366 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
14367 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
14368 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
14369 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
14370 "\xee\x49\x83",
14371 .klen = 35,
14372 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14373 .alen = 0,
14374 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
14375 .ilen = 8,
14376 .result = "\x00",
14377 .rlen = 0,
14378 }, {
14379 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
14380 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
14381 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
14382 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
14383 "\x85\x34\x66",
14384 .klen = 35,
14385 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
14386 .alen = 0,
14387 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
14388 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
14389 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
14390 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
14391 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
14392 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
14393 .ilen = 48,
14394 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
14395 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
14396 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
14397 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
14398 .rlen = 32,
14399 .novrfy = 1,
14400 }, {
14401 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14402 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14403 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14404 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
14405 "\xcf\x76\x3f",
14406 .klen = 35,
14407 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
14408 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
14409 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
14410 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
14411 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
14412 .alen = 32,
14413 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
14414 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
14415 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
14416 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
14417 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
14418 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
14419 .ilen = 48,
14420 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
14421 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
14422 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
14423 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
14424 .rlen = 32,
14425 },
14426};
14427
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080014428/*
14429 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
14430 * test vectors, taken from Appendix B.2.9 and B.2.10:
14431 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
14432 * Only AES-128 is supported at this time.
14433 */
14434#define ANSI_CPRNG_AES_TEST_VECTORS 6
14435
14436static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
14437 {
14438 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14439 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14440 .klen = 16,
14441 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14442 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
14443 .dtlen = 16,
14444 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
14445 "\x00\x00\x00\x00\x00\x00\x00\x00",
14446 .vlen = 16,
14447 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
14448 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
14449 .rlen = 16,
14450 .loops = 1,
14451 }, {
14452 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14453 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14454 .klen = 16,
14455 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14456 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
14457 .dtlen = 16,
14458 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
14459 "\x00\x00\x00\x00\x00\x00\x00\x00",
14460 .vlen = 16,
14461 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
14462 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
14463 .rlen = 16,
14464 .loops = 1,
14465 }, {
14466 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14467 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14468 .klen = 16,
14469 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14470 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
14471 .dtlen = 16,
14472 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
14473 "\x00\x00\x00\x00\x00\x00\x00\x00",
14474 .vlen = 16,
14475 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
14476 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
14477 .rlen = 16,
14478 .loops = 1,
14479 }, {
14480 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14481 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14482 .klen = 16,
14483 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14484 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
14485 .dtlen = 16,
14486 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
14487 "\x00\x00\x00\x00\x00\x00\x00\x00",
14488 .vlen = 16,
14489 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
14490 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
14491 .rlen = 16,
14492 .loops = 1,
14493 }, {
14494 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14495 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14496 .klen = 16,
14497 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14498 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
14499 .dtlen = 16,
14500 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
14501 "\x00\x00\x00\x00\x00\x00\x00\x00",
14502 .vlen = 16,
14503 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
14504 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
14505 .rlen = 16,
14506 .loops = 1,
14507 }, { /* Monte Carlo Test */
14508 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
14509 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
14510 .klen = 16,
14511 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
14512 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
14513 .dtlen = 16,
14514 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
14515 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
14516 .vlen = 16,
14517 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
14518 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
14519 .rlen = 16,
14520 .loops = 10000,
14521 },
14522};
14523
Herbert Xuda7f0332008-07-31 17:08:25 +080014524/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020014525#define CAST5_ENC_TEST_VECTORS 4
14526#define CAST5_DEC_TEST_VECTORS 4
14527#define CAST5_CBC_ENC_TEST_VECTORS 1
14528#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030014529#define CAST5_CTR_ENC_TEST_VECTORS 2
14530#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080014531
14532static struct cipher_testvec cast5_enc_tv_template[] = {
14533 {
14534 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
14535 "\x23\x45\x67\x89\x34\x56\x78\x9a",
14536 .klen = 16,
14537 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14538 .ilen = 8,
14539 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
14540 .rlen = 8,
14541 }, {
14542 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
14543 "\x23\x45",
14544 .klen = 10,
14545 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14546 .ilen = 8,
14547 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
14548 .rlen = 8,
14549 }, {
14550 .key = "\x01\x23\x45\x67\x12",
14551 .klen = 5,
14552 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14553 .ilen = 8,
14554 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
14555 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020014556 }, { /* Generated from TF test vectors */
14557 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14558 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14559 .klen = 16,
14560 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14561 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14562 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14563 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14564 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14565 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14566 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14567 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14568 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14569 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14570 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14571 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14572 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14573 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14574 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14575 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14576 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14577 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14578 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14579 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14580 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14581 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14582 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14583 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14584 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14585 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14586 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14587 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14588 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14589 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14590 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14591 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14592 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14593 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14594 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14595 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14596 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14597 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14598 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14599 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14600 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14601 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14602 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14603 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14604 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14605 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14606 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14607 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14608 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14609 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14610 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14611 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14612 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14613 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14614 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14615 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14616 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14617 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14618 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14619 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14620 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14621 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14622 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14623 .ilen = 496,
14624 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
14625 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
14626 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
14627 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
14628 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
14629 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
14630 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
14631 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
14632 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
14633 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
14634 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
14635 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
14636 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
14637 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
14638 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
14639 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
14640 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
14641 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
14642 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
14643 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
14644 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
14645 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
14646 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
14647 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
14648 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
14649 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
14650 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
14651 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
14652 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
14653 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
14654 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
14655 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
14656 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
14657 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
14658 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
14659 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
14660 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
14661 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
14662 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
14663 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
14664 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
14665 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
14666 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
14667 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
14668 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
14669 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
14670 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
14671 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
14672 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
14673 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
14674 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
14675 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
14676 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
14677 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
14678 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
14679 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
14680 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
14681 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
14682 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
14683 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
14684 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
14685 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
14686 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014687 .also_non_np = 1,
14688 .np = 2,
14689 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014690 },
14691};
14692
14693static struct cipher_testvec cast5_dec_tv_template[] = {
14694 {
14695 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
14696 "\x23\x45\x67\x89\x34\x56\x78\x9a",
14697 .klen = 16,
14698 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
14699 .ilen = 8,
14700 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14701 .rlen = 8,
14702 }, {
14703 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
14704 "\x23\x45",
14705 .klen = 10,
14706 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
14707 .ilen = 8,
14708 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14709 .rlen = 8,
14710 }, {
14711 .key = "\x01\x23\x45\x67\x12",
14712 .klen = 5,
14713 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
14714 .ilen = 8,
14715 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14716 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020014717 }, { /* Generated from TF test vectors */
14718 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14719 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14720 .klen = 16,
14721 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14722 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
14723 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
14724 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
14725 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
14726 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
14727 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
14728 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
14729 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
14730 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
14731 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
14732 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
14733 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
14734 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
14735 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
14736 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
14737 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
14738 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
14739 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
14740 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
14741 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
14742 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
14743 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
14744 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
14745 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
14746 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
14747 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
14748 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
14749 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
14750 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
14751 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
14752 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
14753 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
14754 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
14755 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
14756 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
14757 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
14758 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
14759 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
14760 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
14761 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
14762 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
14763 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
14764 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
14765 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
14766 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
14767 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
14768 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
14769 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
14770 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
14771 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
14772 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
14773 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
14774 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
14775 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
14776 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
14777 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
14778 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
14779 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
14780 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
14781 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
14782 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
14783 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
14784 .ilen = 496,
14785 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14786 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14787 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14788 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14789 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14790 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14791 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14792 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14793 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14794 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14795 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14796 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14797 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14798 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14799 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14800 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14801 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14802 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14803 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14804 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14805 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14806 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14807 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14808 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14809 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14810 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14811 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14812 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14813 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14814 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14815 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14816 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14817 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14818 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14819 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14820 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14821 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14822 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14823 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14824 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14825 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14826 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14827 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14828 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14829 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14830 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14831 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14832 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14833 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14834 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14835 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14836 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14837 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14838 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14839 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14840 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14841 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14842 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14843 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14844 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14845 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14846 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14847 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014848 .also_non_np = 1,
14849 .np = 2,
14850 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020014851 },
14852};
14853
14854static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
14855 { /* Generated from TF test vectors */
14856 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14857 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14858 .klen = 16,
14859 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14860 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14861 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14862 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14863 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14864 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14865 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14866 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14867 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14868 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14869 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14870 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14871 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14872 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14873 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14874 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14875 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14876 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14877 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14878 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14879 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14880 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14881 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14882 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14883 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14884 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14885 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14886 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14887 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14888 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14889 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14890 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14891 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14892 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14893 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14894 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14895 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14896 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14897 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14898 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14899 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14900 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14901 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14902 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14903 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14904 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14905 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14906 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14907 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14908 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14909 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14910 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14911 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14912 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14913 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14914 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14915 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14916 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14917 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14918 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14919 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14920 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14921 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14922 .ilen = 496,
14923 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14924 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
14925 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
14926 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
14927 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
14928 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
14929 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
14930 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
14931 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
14932 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
14933 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
14934 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
14935 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
14936 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
14937 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
14938 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
14939 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
14940 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
14941 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
14942 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
14943 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
14944 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
14945 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
14946 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
14947 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
14948 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
14949 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
14950 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
14951 "\x90\x12\x37\x49\x27\x98\x69\x18"
14952 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
14953 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
14954 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
14955 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
14956 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
14957 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
14958 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
14959 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
14960 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
14961 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
14962 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
14963 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
14964 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
14965 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
14966 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
14967 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
14968 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
14969 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
14970 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
14971 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
14972 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
14973 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
14974 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
14975 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
14976 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
14977 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
14978 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
14979 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
14980 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
14981 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
14982 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
14983 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
14984 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
14985 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014986 .also_non_np = 1,
14987 .np = 2,
14988 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020014989 },
14990};
14991
14992static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
14993 { /* Generated from TF test vectors */
14994 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14995 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14996 .klen = 16,
14997 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14998 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14999 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
15000 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
15001 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
15002 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
15003 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
15004 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
15005 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
15006 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
15007 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
15008 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
15009 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
15010 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
15011 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
15012 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
15013 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
15014 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
15015 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
15016 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
15017 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
15018 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
15019 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
15020 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
15021 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
15022 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
15023 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
15024 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
15025 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
15026 "\x90\x12\x37\x49\x27\x98\x69\x18"
15027 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
15028 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
15029 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
15030 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
15031 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
15032 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
15033 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
15034 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
15035 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
15036 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
15037 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
15038 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
15039 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
15040 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
15041 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
15042 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
15043 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
15044 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
15045 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
15046 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
15047 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
15048 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
15049 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
15050 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
15051 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
15052 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
15053 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
15054 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
15055 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
15056 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
15057 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
15058 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
15059 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
15060 .ilen = 496,
15061 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15062 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15063 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15064 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15065 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15066 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15067 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15068 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15069 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15070 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15071 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15072 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15073 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15074 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15075 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15076 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15077 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15078 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15079 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15080 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15081 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15082 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15083 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15084 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15085 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15086 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15087 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15088 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15089 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15090 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15091 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15092 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15093 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15094 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15095 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15096 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15097 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15098 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15099 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15100 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15101 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15102 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15103 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15104 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15105 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15106 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15107 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15108 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15109 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15110 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15111 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15112 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15113 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15114 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15115 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15116 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15117 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15118 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15119 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15120 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15121 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15122 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15123 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015124 .also_non_np = 1,
15125 .np = 2,
15126 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015127 },
15128};
15129
15130static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
15131 { /* Generated from TF test vectors */
15132 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15133 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15134 .klen = 16,
15135 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15136 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15137 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030015138 "\x3A",
15139 .ilen = 17,
15140 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15141 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15142 "\x0C",
15143 .rlen = 17,
15144 }, { /* Generated from TF test vectors */
15145 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15146 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15147 .klen = 16,
15148 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15149 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15150 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015151 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15152 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15153 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15154 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15155 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15156 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15157 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15158 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15159 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15160 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15161 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15162 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15163 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15164 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15165 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15166 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15167 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15168 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15169 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15170 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15171 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15172 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15173 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15174 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15175 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15176 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15177 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15178 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15179 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15180 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15181 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15182 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15183 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15184 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15185 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15186 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15187 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15188 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15189 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15190 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15191 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15192 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15193 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15194 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15195 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15196 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15197 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15198 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15199 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15200 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15201 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15202 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15203 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15204 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15205 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15206 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15207 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15208 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15209 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15210 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15211 .ilen = 496,
15212 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15213 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15214 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
15215 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
15216 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
15217 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
15218 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
15219 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
15220 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
15221 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
15222 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
15223 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
15224 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
15225 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
15226 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
15227 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
15228 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
15229 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
15230 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
15231 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
15232 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
15233 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
15234 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
15235 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
15236 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
15237 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
15238 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
15239 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
15240 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
15241 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
15242 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
15243 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
15244 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
15245 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
15246 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
15247 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
15248 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
15249 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
15250 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
15251 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
15252 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
15253 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
15254 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
15255 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
15256 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
15257 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
15258 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
15259 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
15260 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
15261 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
15262 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
15263 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
15264 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
15265 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
15266 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
15267 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
15268 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
15269 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
15270 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
15271 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
15272 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
15273 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
15274 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015275 .also_non_np = 1,
15276 .np = 2,
15277 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015278 },
15279};
15280
15281static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
15282 { /* Generated from TF test vectors */
15283 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15284 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15285 .klen = 16,
15286 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15287 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15288 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030015289 "\x0C",
15290 .ilen = 17,
15291 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15292 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15293 "\x3A",
15294 .rlen = 17,
15295 }, { /* Generated from TF test vectors */
15296 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15297 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15298 .klen = 16,
15299 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15300 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15301 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015302 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
15303 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
15304 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
15305 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
15306 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
15307 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
15308 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
15309 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
15310 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
15311 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
15312 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
15313 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
15314 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
15315 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
15316 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
15317 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
15318 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
15319 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
15320 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
15321 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
15322 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
15323 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
15324 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
15325 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
15326 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
15327 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
15328 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
15329 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
15330 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
15331 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
15332 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
15333 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
15334 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
15335 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
15336 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
15337 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
15338 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
15339 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
15340 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
15341 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
15342 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
15343 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
15344 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
15345 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
15346 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
15347 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
15348 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
15349 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
15350 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
15351 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
15352 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
15353 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
15354 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
15355 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
15356 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
15357 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
15358 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
15359 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
15360 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
15361 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
15362 .ilen = 496,
15363 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15364 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15365 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15366 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15367 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15368 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15369 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15370 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15371 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15372 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15373 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15374 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15375 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15376 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15377 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15378 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15379 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15380 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15381 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15382 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15383 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15384 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15385 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15386 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15387 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15388 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15389 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15390 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15391 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15392 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15393 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15394 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15395 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15396 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15397 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15398 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15399 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15400 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15401 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15402 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15403 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15404 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15405 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15406 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15407 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15408 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15409 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15410 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15411 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15412 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15413 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15414 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15415 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15416 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15417 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15418 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15419 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15420 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15421 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15422 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15423 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15424 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15425 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015426 .also_non_np = 1,
15427 .np = 2,
15428 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015429 },
15430};
15431
15432/*
15433 * ARC4 test vectors from OpenSSL
15434 */
15435#define ARC4_ENC_TEST_VECTORS 7
15436#define ARC4_DEC_TEST_VECTORS 7
15437
15438static struct cipher_testvec arc4_enc_tv_template[] = {
15439 {
15440 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15441 .klen = 8,
15442 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15443 .ilen = 8,
15444 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
15445 .rlen = 8,
15446 }, {
15447 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15448 .klen = 8,
15449 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
15450 .ilen = 8,
15451 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
15452 .rlen = 8,
15453 }, {
15454 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
15455 .klen = 8,
15456 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
15457 .ilen = 8,
15458 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
15459 .rlen = 8,
15460 }, {
15461 .key = "\xef\x01\x23\x45",
15462 .klen = 4,
15463 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
15464 "\x00\x00\x00\x00\x00\x00\x00\x00"
15465 "\x00\x00\x00\x00",
15466 .ilen = 20,
15467 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15468 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
15469 "\x36\xb6\x78\x58",
15470 .rlen = 20,
15471 }, {
15472 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15473 .klen = 8,
15474 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15475 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15476 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15477 "\x12\x34\x56\x78",
15478 .ilen = 28,
15479 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
15480 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
15481 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
15482 "\x40\x01\x1e\xcf",
15483 .rlen = 28,
15484 }, {
15485 .key = "\xef\x01\x23\x45",
15486 .klen = 4,
15487 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
15488 "\x00\x00",
15489 .ilen = 10,
15490 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15491 "\xbd\x61",
15492 .rlen = 10,
15493 }, {
15494 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
15495 "\x00\x00\x00\x00\x00\x00\x00\x00",
15496 .klen = 16,
15497 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
15498 .ilen = 8,
15499 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
15500 .rlen = 8,
15501 },
15502};
15503
15504static struct cipher_testvec arc4_dec_tv_template[] = {
15505 {
15506 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15507 .klen = 8,
15508 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
15509 .ilen = 8,
15510 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15511 .rlen = 8,
15512 }, {
15513 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15514 .klen = 8,
15515 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
15516 .ilen = 8,
15517 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15518 .rlen = 8,
15519 }, {
15520 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
15521 .klen = 8,
15522 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
15523 .ilen = 8,
15524 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15525 .rlen = 8,
15526 }, {
15527 .key = "\xef\x01\x23\x45",
15528 .klen = 4,
15529 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15530 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
15531 "\x36\xb6\x78\x58",
15532 .ilen = 20,
15533 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15534 "\x00\x00\x00\x00\x00\x00\x00\x00"
15535 "\x00\x00\x00\x00",
15536 .rlen = 20,
15537 }, {
15538 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15539 .klen = 8,
15540 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
15541 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
15542 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
15543 "\x40\x01\x1e\xcf",
15544 .ilen = 28,
15545 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15546 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15547 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15548 "\x12\x34\x56\x78",
15549 .rlen = 28,
15550 }, {
15551 .key = "\xef\x01\x23\x45",
15552 .klen = 4,
15553 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15554 "\xbd\x61",
15555 .ilen = 10,
15556 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15557 "\x00\x00",
15558 .rlen = 10,
15559 }, {
15560 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
15561 "\x00\x00\x00\x00\x00\x00\x00\x00",
15562 .klen = 16,
15563 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
15564 .ilen = 8,
15565 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
15566 .rlen = 8,
15567 },
15568};
15569
15570/*
15571 * TEA test vectors
15572 */
15573#define TEA_ENC_TEST_VECTORS 4
15574#define TEA_DEC_TEST_VECTORS 4
15575
15576static struct cipher_testvec tea_enc_tv_template[] = {
15577 {
15578 .key = zeroed_string,
15579 .klen = 16,
15580 .input = zeroed_string,
15581 .ilen = 8,
15582 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
15583 .rlen = 8,
15584 }, {
15585 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15586 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15587 .klen = 16,
15588 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15589 .ilen = 8,
15590 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
15591 .rlen = 8,
15592 }, {
15593 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15594 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15595 .klen = 16,
15596 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15597 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15598 .ilen = 16,
15599 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
15600 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
15601 .rlen = 16,
15602 }, {
15603 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15604 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15605 .klen = 16,
15606 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
15607 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15608 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15609 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15610 .ilen = 32,
15611 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
15612 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
15613 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
15614 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
15615 .rlen = 32,
15616 }
15617};
15618
15619static struct cipher_testvec tea_dec_tv_template[] = {
15620 {
15621 .key = zeroed_string,
15622 .klen = 16,
15623 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
15624 .ilen = 8,
15625 .result = zeroed_string,
15626 .rlen = 8,
15627 }, {
15628 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15629 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15630 .klen = 16,
15631 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
15632 .ilen = 8,
15633 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15634 .rlen = 8,
15635 }, {
15636 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15637 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15638 .klen = 16,
15639 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
15640 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
15641 .ilen = 16,
15642 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15643 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15644 .rlen = 16,
15645 }, {
15646 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15647 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15648 .klen = 16,
15649 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
15650 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
15651 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
15652 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
15653 .ilen = 32,
15654 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
15655 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15656 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15657 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15658 .rlen = 32,
15659 }
15660};
15661
15662/*
15663 * XTEA test vectors
15664 */
15665#define XTEA_ENC_TEST_VECTORS 4
15666#define XTEA_DEC_TEST_VECTORS 4
15667
15668static struct cipher_testvec xtea_enc_tv_template[] = {
15669 {
15670 .key = zeroed_string,
15671 .klen = 16,
15672 .input = zeroed_string,
15673 .ilen = 8,
15674 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
15675 .rlen = 8,
15676 }, {
15677 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15678 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15679 .klen = 16,
15680 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15681 .ilen = 8,
15682 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
15683 .rlen = 8,
15684 }, {
15685 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15686 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15687 .klen = 16,
15688 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15689 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15690 .ilen = 16,
15691 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
15692 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
15693 .rlen = 16,
15694 }, {
15695 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15696 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15697 .klen = 16,
15698 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
15699 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15700 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15701 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15702 .ilen = 32,
15703 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
15704 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
15705 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
15706 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
15707 .rlen = 32,
15708 }
15709};
15710
15711static struct cipher_testvec xtea_dec_tv_template[] = {
15712 {
15713 .key = zeroed_string,
15714 .klen = 16,
15715 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
15716 .ilen = 8,
15717 .result = zeroed_string,
15718 .rlen = 8,
15719 }, {
15720 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15721 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15722 .klen = 16,
15723 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
15724 .ilen = 8,
15725 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15726 .rlen = 8,
15727 }, {
15728 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
15729 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15730 .klen = 16,
15731 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
15732 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
15733 .ilen = 16,
15734 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15735 "\x65\x73\x74\x5f\x76\x65\x63\x74",
15736 .rlen = 16,
15737 }, {
15738 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15739 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15740 .klen = 16,
15741 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
15742 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
15743 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
15744 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
15745 .ilen = 32,
15746 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
15747 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15748 "\x79\x6f\x75\x21\x21\x21\x20\x72"
15749 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15750 .rlen = 32,
15751 }
15752};
15753
15754/*
15755 * KHAZAD test vectors.
15756 */
15757#define KHAZAD_ENC_TEST_VECTORS 5
15758#define KHAZAD_DEC_TEST_VECTORS 5
15759
15760static struct cipher_testvec khazad_enc_tv_template[] = {
15761 {
15762 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
15763 "\x00\x00\x00\x00\x00\x00\x00\x00",
15764 .klen = 16,
15765 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
15766 .ilen = 8,
15767 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
15768 .rlen = 8,
15769 }, {
15770 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
15771 "\x38\x38\x38\x38\x38\x38\x38\x38",
15772 .klen = 16,
15773 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
15774 .ilen = 8,
15775 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
15776 .rlen = 8,
15777 }, {
15778 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
15779 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15780 .klen = 16,
15781 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15782 .ilen = 8,
15783 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
15784 .rlen = 8,
15785 }, {
15786 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15787 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15788 .klen = 16,
15789 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15790 .ilen = 8,
15791 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15792 .rlen = 8,
15793 }, {
15794 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15795 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15796 .klen = 16,
15797 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15798 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15799 .ilen = 16,
15800 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
15801 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15802 .rlen = 16,
15803 },
15804};
15805
15806static struct cipher_testvec khazad_dec_tv_template[] = {
15807 {
15808 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
15809 "\x00\x00\x00\x00\x00\x00\x00\x00",
15810 .klen = 16,
15811 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
15812 .ilen = 8,
15813 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15814 .rlen = 8,
15815 }, {
15816 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
15817 "\x38\x38\x38\x38\x38\x38\x38\x38",
15818 .klen = 16,
15819 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
15820 .ilen = 8,
15821 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
15822 .rlen = 8,
15823 }, {
15824 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
15825 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15826 .klen = 16,
15827 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
15828 .ilen = 8,
15829 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15830 .rlen = 8,
15831 }, {
15832 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15833 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15834 .klen = 16,
15835 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15836 .ilen = 8,
15837 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15838 .rlen = 8,
15839 }, {
15840 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15841 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15842 .klen = 16,
15843 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
15844 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15845 .ilen = 16,
15846 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15847 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15848 .rlen = 16,
15849 },
15850};
15851
15852/*
15853 * Anubis test vectors.
15854 */
15855
15856#define ANUBIS_ENC_TEST_VECTORS 5
15857#define ANUBIS_DEC_TEST_VECTORS 5
15858#define ANUBIS_CBC_ENC_TEST_VECTORS 2
15859#define ANUBIS_CBC_DEC_TEST_VECTORS 2
15860
15861static struct cipher_testvec anubis_enc_tv_template[] = {
15862 {
15863 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15864 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15865 .klen = 16,
15866 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15867 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15868 .ilen = 16,
15869 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15870 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15871 .rlen = 16,
15872 }, {
15873
15874 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
15875 "\x03\x03\x03\x03\x03\x03\x03\x03"
15876 "\x03\x03\x03\x03",
15877 .klen = 20,
15878 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
15879 "\x03\x03\x03\x03\x03\x03\x03\x03",
15880 .ilen = 16,
15881 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15882 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15883 .rlen = 16,
15884 }, {
15885 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
15886 "\x24\x24\x24\x24\x24\x24\x24\x24"
15887 "\x24\x24\x24\x24\x24\x24\x24\x24"
15888 "\x24\x24\x24\x24",
15889 .klen = 28,
15890 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
15891 "\x24\x24\x24\x24\x24\x24\x24\x24",
15892 .ilen = 16,
15893 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15894 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15895 .rlen = 16,
15896 }, {
15897 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
15898 "\x25\x25\x25\x25\x25\x25\x25\x25"
15899 "\x25\x25\x25\x25\x25\x25\x25\x25"
15900 "\x25\x25\x25\x25\x25\x25\x25\x25",
15901 .klen = 32,
15902 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
15903 "\x25\x25\x25\x25\x25\x25\x25\x25",
15904 .ilen = 16,
15905 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15906 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15907 .rlen = 16,
15908 }, {
15909 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15910 "\x35\x35\x35\x35\x35\x35\x35\x35"
15911 "\x35\x35\x35\x35\x35\x35\x35\x35"
15912 "\x35\x35\x35\x35\x35\x35\x35\x35"
15913 "\x35\x35\x35\x35\x35\x35\x35\x35",
15914 .klen = 40,
15915 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
15916 "\x35\x35\x35\x35\x35\x35\x35\x35",
15917 .ilen = 16,
15918 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15919 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15920 .rlen = 16,
15921 },
15922};
15923
15924static struct cipher_testvec anubis_dec_tv_template[] = {
15925 {
15926 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15927 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15928 .klen = 16,
15929 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15930 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15931 .ilen = 16,
15932 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15933 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15934 .rlen = 16,
15935 }, {
15936
15937 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
15938 "\x03\x03\x03\x03\x03\x03\x03\x03"
15939 "\x03\x03\x03\x03",
15940 .klen = 20,
15941 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15942 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15943 .ilen = 16,
15944 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
15945 "\x03\x03\x03\x03\x03\x03\x03\x03",
15946 .rlen = 16,
15947 }, {
15948 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
15949 "\x24\x24\x24\x24\x24\x24\x24\x24"
15950 "\x24\x24\x24\x24\x24\x24\x24\x24"
15951 "\x24\x24\x24\x24",
15952 .klen = 28,
15953 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15954 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15955 .ilen = 16,
15956 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
15957 "\x24\x24\x24\x24\x24\x24\x24\x24",
15958 .rlen = 16,
15959 }, {
15960 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
15961 "\x25\x25\x25\x25\x25\x25\x25\x25"
15962 "\x25\x25\x25\x25\x25\x25\x25\x25"
15963 "\x25\x25\x25\x25\x25\x25\x25\x25",
15964 .klen = 32,
15965 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15966 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15967 .ilen = 16,
15968 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
15969 "\x25\x25\x25\x25\x25\x25\x25\x25",
15970 .rlen = 16,
15971 }, {
15972 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
15973 "\x35\x35\x35\x35\x35\x35\x35\x35"
15974 "\x35\x35\x35\x35\x35\x35\x35\x35"
15975 "\x35\x35\x35\x35\x35\x35\x35\x35"
15976 "\x35\x35\x35\x35\x35\x35\x35\x35",
15977 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15978 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15979 .klen = 40,
15980 .ilen = 16,
15981 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
15982 "\x35\x35\x35\x35\x35\x35\x35\x35",
15983 .rlen = 16,
15984 },
15985};
15986
15987static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
15988 {
15989 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15990 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15991 .klen = 16,
15992 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15993 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15994 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15995 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15996 .ilen = 32,
15997 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15998 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
15999 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
16000 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
16001 .rlen = 32,
16002 }, {
16003 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16004 "\x35\x35\x35\x35\x35\x35\x35\x35"
16005 "\x35\x35\x35\x35\x35\x35\x35\x35"
16006 "\x35\x35\x35\x35\x35\x35\x35\x35"
16007 "\x35\x35\x35\x35\x35\x35\x35\x35",
16008 .klen = 40,
16009 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
16010 "\x35\x35\x35\x35\x35\x35\x35\x35"
16011 "\x35\x35\x35\x35\x35\x35\x35\x35"
16012 "\x35\x35\x35\x35\x35\x35\x35\x35",
16013 .ilen = 32,
16014 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16015 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
16016 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
16017 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
16018 .rlen = 32,
16019 },
16020};
16021
16022static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
16023 {
16024 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16025 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16026 .klen = 16,
16027 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
16028 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
16029 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
16030 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
16031 .ilen = 32,
16032 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16033 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16034 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16035 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16036 .rlen = 32,
16037 }, {
16038 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16039 "\x35\x35\x35\x35\x35\x35\x35\x35"
16040 "\x35\x35\x35\x35\x35\x35\x35\x35"
16041 "\x35\x35\x35\x35\x35\x35\x35\x35"
16042 "\x35\x35\x35\x35\x35\x35\x35\x35",
16043 .klen = 40,
16044 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16045 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
16046 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
16047 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
16048 .ilen = 32,
16049 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
16050 "\x35\x35\x35\x35\x35\x35\x35\x35"
16051 "\x35\x35\x35\x35\x35\x35\x35\x35"
16052 "\x35\x35\x35\x35\x35\x35\x35\x35",
16053 .rlen = 32,
16054 },
16055};
16056
16057/*
16058 * XETA test vectors
16059 */
16060#define XETA_ENC_TEST_VECTORS 4
16061#define XETA_DEC_TEST_VECTORS 4
16062
16063static struct cipher_testvec xeta_enc_tv_template[] = {
16064 {
16065 .key = zeroed_string,
16066 .klen = 16,
16067 .input = zeroed_string,
16068 .ilen = 8,
16069 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
16070 .rlen = 8,
16071 }, {
16072 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16073 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16074 .klen = 16,
16075 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16076 .ilen = 8,
16077 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
16078 .rlen = 8,
16079 }, {
16080 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16081 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16082 .klen = 16,
16083 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16084 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16085 .ilen = 16,
16086 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
16087 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
16088 .rlen = 16,
16089 }, {
16090 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16091 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16092 .klen = 16,
16093 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
16094 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16095 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16096 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16097 .ilen = 32,
16098 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
16099 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
16100 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
16101 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
16102 .rlen = 32,
16103 }
16104};
16105
16106static struct cipher_testvec xeta_dec_tv_template[] = {
16107 {
16108 .key = zeroed_string,
16109 .klen = 16,
16110 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
16111 .ilen = 8,
16112 .result = zeroed_string,
16113 .rlen = 8,
16114 }, {
16115 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16116 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16117 .klen = 16,
16118 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
16119 .ilen = 8,
16120 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16121 .rlen = 8,
16122 }, {
16123 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16124 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16125 .klen = 16,
16126 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
16127 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
16128 .ilen = 16,
16129 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16130 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16131 .rlen = 16,
16132 }, {
16133 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16134 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16135 .klen = 16,
16136 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
16137 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
16138 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
16139 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
16140 .ilen = 32,
16141 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
16142 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16143 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16144 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16145 .rlen = 32,
16146 }
16147};
16148
16149/*
16150 * FCrypt test vectors
16151 */
16152#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
16153#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
16154
16155static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
16156 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
16157 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
16158 .klen = 8,
16159 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16160 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
16161 .ilen = 8,
16162 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
16163 .rlen = 8,
16164 }, {
16165 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
16166 .klen = 8,
16167 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16168 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
16169 .ilen = 8,
16170 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
16171 .rlen = 8,
16172 }, { /* From Arla */
16173 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16174 .klen = 8,
16175 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16176 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
16177 .ilen = 48,
16178 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
16179 "\xee\xac\x98\x62\x44\x51\xe4\x84"
16180 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
16181 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
16182 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
16183 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
16184 .rlen = 48,
16185 }, {
16186 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16187 .klen = 8,
16188 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16189 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
16190 .ilen = 48,
16191 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16192 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16193 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16194 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16195 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16196 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16197 .rlen = 48,
16198 }, { /* split-page version */
16199 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16200 .klen = 8,
16201 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16202 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
16203 .ilen = 48,
16204 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16205 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16206 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16207 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16208 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16209 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16210 .rlen = 48,
16211 .np = 2,
16212 .tap = { 20, 28 },
16213 }
16214};
16215
16216static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
16217 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
16218 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
16219 .klen = 8,
16220 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16221 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
16222 .ilen = 8,
16223 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
16224 .rlen = 8,
16225 }, {
16226 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
16227 .klen = 8,
16228 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16229 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
16230 .ilen = 8,
16231 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
16232 .rlen = 8,
16233 }, { /* From Arla */
16234 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16235 .klen = 8,
16236 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16237 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
16238 "\xee\xac\x98\x62\x44\x51\xe4\x84"
16239 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
16240 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
16241 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
16242 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
16243 .ilen = 48,
16244 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16245 .rlen = 48,
16246 }, {
16247 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16248 .klen = 8,
16249 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16250 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16251 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16252 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16253 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16254 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16255 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16256 .ilen = 48,
16257 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16258 .rlen = 48,
16259 }, { /* split-page version */
16260 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16261 .klen = 8,
16262 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16263 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16264 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16265 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16266 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16267 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16268 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16269 .ilen = 48,
16270 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16271 .rlen = 48,
16272 .np = 2,
16273 .tap = { 20, 28 },
16274 }
16275};
16276
16277/*
16278 * CAMELLIA test vectors.
16279 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020016280#define CAMELLIA_ENC_TEST_VECTORS 4
16281#define CAMELLIA_DEC_TEST_VECTORS 4
16282#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
16283#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
16284#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
16285#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
16286#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
16287#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
16288#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
16289#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080016290
16291static struct cipher_testvec camellia_enc_tv_template[] = {
16292 {
16293 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16294 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16295 .klen = 16,
16296 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16297 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16298 .ilen = 16,
16299 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
16300 "\x08\x57\x06\x56\x48\xea\xbe\x43",
16301 .rlen = 16,
16302 }, {
16303 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16304 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16305 "\x00\x11\x22\x33\x44\x55\x66\x77",
16306 .klen = 24,
16307 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16308 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16309 .ilen = 16,
16310 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
16311 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
16312 .rlen = 16,
16313 }, {
16314 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16315 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16316 "\x00\x11\x22\x33\x44\x55\x66\x77"
16317 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
16318 .klen = 32,
16319 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16320 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16321 .ilen = 16,
16322 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
16323 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
16324 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016325 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020016326 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
16327 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
16328 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
16329 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
16330 .klen = 32,
16331 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16332 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16333 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16334 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16335 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016336 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16337 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16338 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16339 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16340 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16341 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16342 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16343 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16344 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16345 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16346 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16347 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16348 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16349 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16350 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16351 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16352 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16353 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16354 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16355 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16356 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16357 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16358 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16359 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16360 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16361 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16362 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16363 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16364 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16365 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16366 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16367 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16368 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16369 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16370 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16371 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16372 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16373 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16374 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16375 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16376 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16377 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16378 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16379 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16380 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16381 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16382 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16383 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16384 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16385 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16386 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16387 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16388 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16389 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16390 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16391 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16392 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16393 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020016394 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
16395 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
16396 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
16397 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
16398 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016399 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
16400 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
16401 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
16402 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
16403 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
16404 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
16405 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
16406 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
16407 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
16408 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
16409 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
16410 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
16411 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
16412 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
16413 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
16414 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
16415 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
16416 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
16417 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
16418 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
16419 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
16420 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
16421 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
16422 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
16423 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
16424 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
16425 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
16426 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
16427 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
16428 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
16429 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
16430 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
16431 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
16432 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
16433 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
16434 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
16435 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
16436 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
16437 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
16438 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
16439 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
16440 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
16441 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
16442 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
16443 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
16444 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
16445 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
16446 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
16447 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
16448 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
16449 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
16450 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
16451 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
16452 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
16453 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
16454 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
16455 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
16456 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016457 .also_non_np = 1,
16458 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016459 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020016460 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016461};
16462
16463static struct cipher_testvec camellia_dec_tv_template[] = {
16464 {
16465 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16466 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16467 .klen = 16,
16468 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
16469 "\x08\x57\x06\x56\x48\xea\xbe\x43",
16470 .ilen = 16,
16471 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16472 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16473 .rlen = 16,
16474 }, {
16475 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16476 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16477 "\x00\x11\x22\x33\x44\x55\x66\x77",
16478 .klen = 24,
16479 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
16480 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
16481 .ilen = 16,
16482 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16483 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16484 .rlen = 16,
16485 }, {
16486 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16487 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16488 "\x00\x11\x22\x33\x44\x55\x66\x77"
16489 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
16490 .klen = 32,
16491 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
16492 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
16493 .ilen = 16,
16494 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16495 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16496 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016497 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020016498 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
16499 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
16500 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
16501 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
16502 .klen = 32,
16503 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
16504 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
16505 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
16506 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
16507 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016508 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
16509 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
16510 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
16511 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
16512 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
16513 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
16514 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
16515 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
16516 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
16517 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
16518 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
16519 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
16520 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
16521 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
16522 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
16523 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
16524 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
16525 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
16526 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
16527 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
16528 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
16529 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
16530 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
16531 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
16532 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
16533 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
16534 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
16535 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
16536 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
16537 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
16538 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
16539 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
16540 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
16541 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
16542 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
16543 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
16544 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
16545 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
16546 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
16547 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
16548 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
16549 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
16550 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
16551 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
16552 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
16553 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
16554 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
16555 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
16556 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
16557 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
16558 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
16559 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
16560 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
16561 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
16562 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
16563 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
16564 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
16565 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020016566 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16567 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16568 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16569 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16570 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016571 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16572 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16573 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16574 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16575 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16576 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16577 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16578 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16579 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16580 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16581 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16582 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16583 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16584 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16585 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16586 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16587 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16588 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16589 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16590 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16591 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16592 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16593 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16594 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16595 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16596 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16597 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16598 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16599 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16600 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16601 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16602 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16603 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16604 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16605 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16606 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16607 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16608 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16609 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16610 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16611 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16612 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16613 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16614 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16615 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16616 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16617 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16618 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16619 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16620 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16621 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16622 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16623 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16624 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16625 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16626 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16627 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16628 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016629 .also_non_np = 1,
16630 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016631 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020016632 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016633};
16634
16635static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
16636 {
16637 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
16638 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
16639 .klen = 16,
16640 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16641 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
16642 .input = "Single block msg",
16643 .ilen = 16,
16644 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
16645 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
16646 .rlen = 16,
16647 }, {
16648 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
16649 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
16650 .klen = 16,
16651 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16652 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
16653 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16655 "\x10\x11\x12\x13\x14\x15\x16\x17"
16656 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16657 .ilen = 32,
16658 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
16659 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
16660 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
16661 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
16662 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016663 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020016664 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16665 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16666 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16667 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16668 .klen = 32,
16669 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16670 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16671 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16672 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16673 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16674 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16675 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016676 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16677 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16678 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16679 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16680 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16681 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16682 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16683 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16684 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16685 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16686 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16687 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16688 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16689 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16690 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16691 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16692 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16693 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16694 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16695 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16696 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16697 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16698 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16699 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16700 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16701 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16702 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16703 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16704 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16705 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16706 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16707 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16708 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16709 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16710 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16711 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16712 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16713 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16714 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16715 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16716 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16717 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16718 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16719 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16720 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16721 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16722 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16723 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16724 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16725 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16726 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16727 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16728 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16729 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16730 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16731 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16732 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16733 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020016734 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
16735 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
16736 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
16737 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
16738 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016739 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
16740 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
16741 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
16742 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
16743 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
16744 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
16745 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
16746 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
16747 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
16748 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
16749 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
16750 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
16751 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
16752 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
16753 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
16754 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
16755 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
16756 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
16757 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
16758 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
16759 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
16760 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
16761 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
16762 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
16763 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
16764 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
16765 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
16766 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
16767 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
16768 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
16769 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
16770 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
16771 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
16772 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
16773 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
16774 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
16775 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
16776 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
16777 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
16778 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
16779 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
16780 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
16781 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
16782 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
16783 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
16784 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
16785 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
16786 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
16787 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
16788 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
16789 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
16790 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
16791 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
16792 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
16793 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
16794 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
16795 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
16796 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016797 .also_non_np = 1,
16798 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016799 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020016800 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016801};
16802
16803static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
16804 {
16805 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
16806 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
16807 .klen = 16,
16808 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16809 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
16810 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
16811 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
16812 .ilen = 16,
16813 .result = "Single block msg",
16814 .rlen = 16,
16815 }, {
16816 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
16817 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
16818 .klen = 16,
16819 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16820 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
16821 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
16822 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
16823 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
16824 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
16825 .ilen = 32,
16826 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
16827 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16828 "\x10\x11\x12\x13\x14\x15\x16\x17"
16829 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16830 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016831 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020016832 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16833 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16834 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16835 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16836 .klen = 32,
16837 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16838 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16839 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
16840 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
16841 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
16842 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
16843 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016844 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
16845 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
16846 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
16847 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
16848 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
16849 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
16850 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
16851 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
16852 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
16853 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
16854 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
16855 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
16856 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
16857 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
16858 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
16859 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
16860 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
16861 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
16862 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
16863 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
16864 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
16865 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
16866 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
16867 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
16868 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
16869 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
16870 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
16871 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
16872 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
16873 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
16874 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
16875 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
16876 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
16877 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
16878 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
16879 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
16880 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
16881 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
16882 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
16883 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
16884 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
16885 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
16886 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
16887 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
16888 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
16889 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
16890 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
16891 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
16892 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
16893 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
16894 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
16895 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
16896 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
16897 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
16898 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
16899 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
16900 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
16901 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020016902 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16903 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16904 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16905 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16906 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016907 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16908 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16909 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16910 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16911 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16912 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16913 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16914 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16915 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16916 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16917 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16918 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16919 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16920 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16921 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16922 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16923 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16924 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16925 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16926 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16927 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16928 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16929 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16930 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16931 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16932 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16933 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16934 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16935 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16936 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16937 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16938 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16939 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16940 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16941 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16942 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16943 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16944 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16945 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16946 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16947 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16948 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16949 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16950 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16951 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16952 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16953 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16954 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16955 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16956 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16957 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16958 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16959 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16960 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16961 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16962 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16963 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16964 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016965 .also_non_np = 1,
16966 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016967 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020016968 },
16969};
16970
16971static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
16972 { /* Generated with Crypto++ */
16973 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16974 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16975 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16976 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16977 .klen = 32,
16978 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16979 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16980 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16981 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16982 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16983 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16984 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030016985 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16986 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16987 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16988 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16989 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16990 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16991 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16992 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16993 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16994 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16995 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16996 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16997 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16998 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16999 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17000 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17001 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17002 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17003 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17004 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17005 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17006 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17007 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17008 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17009 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17010 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17011 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17012 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17013 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17014 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17015 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17016 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17017 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17018 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17019 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17020 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17021 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17022 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17023 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17024 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17025 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17026 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17027 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17028 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17029 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17030 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17031 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17032 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17033 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17034 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17035 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17036 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17037 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17038 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17039 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17040 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17041 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17042 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017043 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
17044 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
17045 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
17046 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
17047 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017048 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
17049 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
17050 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
17051 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
17052 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
17053 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
17054 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
17055 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
17056 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
17057 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
17058 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
17059 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
17060 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
17061 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
17062 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
17063 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
17064 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
17065 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
17066 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
17067 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
17068 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
17069 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
17070 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
17071 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
17072 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
17073 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
17074 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
17075 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
17076 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
17077 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
17078 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
17079 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
17080 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
17081 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
17082 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
17083 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
17084 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
17085 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
17086 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
17087 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
17088 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
17089 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
17090 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
17091 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
17092 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
17093 "\x76\x44\x45\xF3\x24\x11\x57\x98"
17094 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
17095 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
17096 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
17097 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
17098 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
17099 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
17100 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
17101 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
17102 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
17103 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
17104 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
17105 .rlen = 496,
17106 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017107 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17108 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17109 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17110 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17111 .klen = 32,
17112 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17113 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17114 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17115 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17116 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17117 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17118 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
17119 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017120 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17121 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17122 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17123 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17124 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17125 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17126 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17127 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17128 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17129 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17130 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17131 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17132 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17133 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17134 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17135 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17136 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17137 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17138 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17139 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17140 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17141 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17142 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17143 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17144 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17145 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17146 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17147 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17148 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17149 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17150 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17151 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17152 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17153 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17154 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17155 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17156 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17157 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17158 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17159 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17160 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17161 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17162 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17163 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17164 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17165 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17166 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17167 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17168 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17169 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17170 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17171 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17172 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17173 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17174 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17175 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
17176 "\x2B\xC2\x59",
17177 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017178 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
17179 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
17180 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
17181 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
17182 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
17183 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017184 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
17185 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
17186 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
17187 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
17188 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
17189 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
17190 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
17191 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
17192 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
17193 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
17194 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
17195 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
17196 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
17197 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
17198 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
17199 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
17200 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
17201 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
17202 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
17203 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
17204 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
17205 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
17206 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
17207 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
17208 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
17209 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
17210 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
17211 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
17212 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
17213 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
17214 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
17215 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
17216 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
17217 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
17218 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
17219 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
17220 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
17221 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
17222 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
17223 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
17224 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
17225 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
17226 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
17227 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
17228 "\x76\x44\x45\xF3\x24\x11\x57\x98"
17229 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
17230 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
17231 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
17232 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
17233 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
17234 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
17235 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
17236 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
17237 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
17238 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
17239 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
17240 "\x93\x11\x1C",
17241 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017242 .also_non_np = 1,
17243 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017244 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030017245 }, { /* Generated with Crypto++ */
17246 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17247 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17248 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17249 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17250 .klen = 32,
17251 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17252 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17253 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17254 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17255 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17256 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17257 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
17258 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17259 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17260 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17261 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17262 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17263 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17264 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17265 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17266 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17267 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17268 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17269 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17270 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17271 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17272 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17273 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17274 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17275 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17276 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17277 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17278 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17279 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17280 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17281 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17282 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17283 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17284 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17285 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17286 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17287 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17288 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17289 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17290 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17291 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17292 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17293 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17294 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17295 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17296 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17297 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17298 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17299 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17300 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17301 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17302 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17303 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17304 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17305 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17306 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17307 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17308 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17309 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17310 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17311 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17312 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17313 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17314 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17315 .ilen = 496,
17316 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
17317 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
17318 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
17319 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
17320 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
17321 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
17322 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
17323 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
17324 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
17325 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
17326 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
17327 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
17328 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
17329 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
17330 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
17331 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
17332 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
17333 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
17334 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
17335 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
17336 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
17337 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
17338 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
17339 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
17340 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
17341 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
17342 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
17343 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
17344 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
17345 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
17346 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
17347 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
17348 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
17349 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
17350 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
17351 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
17352 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
17353 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
17354 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
17355 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
17356 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
17357 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
17358 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
17359 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
17360 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
17361 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
17362 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
17363 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
17364 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
17365 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
17366 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
17367 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
17368 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
17369 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
17370 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
17371 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
17372 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
17373 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
17374 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
17375 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
17376 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
17377 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
17378 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017379 },
17380};
17381
17382static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
17383 { /* Generated with Crypto++ */
17384 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17385 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17386 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17387 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17388 .klen = 32,
17389 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17390 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17391 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
17392 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
17393 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
17394 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
17395 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017396 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
17397 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
17398 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
17399 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
17400 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
17401 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
17402 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
17403 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
17404 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
17405 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
17406 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
17407 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
17408 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
17409 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
17410 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
17411 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
17412 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
17413 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
17414 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
17415 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
17416 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
17417 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
17418 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
17419 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
17420 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
17421 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
17422 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
17423 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
17424 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
17425 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
17426 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
17427 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
17428 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
17429 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
17430 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
17431 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
17432 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
17433 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
17434 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
17435 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
17436 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
17437 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
17438 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
17439 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
17440 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
17441 "\x76\x44\x45\xF3\x24\x11\x57\x98"
17442 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
17443 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
17444 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
17445 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
17446 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
17447 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
17448 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
17449 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
17450 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
17451 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
17452 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
17453 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017454 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17455 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17456 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17457 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17458 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017459 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17460 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17461 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17462 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17463 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17464 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17465 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17466 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17467 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17468 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17469 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17470 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17471 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17472 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17473 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17474 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17475 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17476 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17477 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17478 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17479 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17480 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17481 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17482 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17483 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17484 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17485 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17486 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17487 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17488 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17489 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17490 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17491 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17492 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17493 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17494 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17495 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17496 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17497 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17498 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17499 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17500 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17501 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17502 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17503 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17504 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17505 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17506 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17507 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17508 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17509 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17510 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17511 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17512 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17513 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17514 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17515 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17516 .rlen = 496,
17517 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017518 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17519 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17520 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17521 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17522 .klen = 32,
17523 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17524 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17525 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
17526 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
17527 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
17528 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
17529 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
17530 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017531 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
17532 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
17533 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
17534 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
17535 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
17536 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
17537 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
17538 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
17539 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
17540 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
17541 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
17542 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
17543 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
17544 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
17545 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
17546 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
17547 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
17548 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
17549 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
17550 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
17551 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
17552 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
17553 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
17554 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
17555 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
17556 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
17557 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
17558 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
17559 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
17560 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
17561 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
17562 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
17563 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
17564 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
17565 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
17566 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
17567 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
17568 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
17569 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
17570 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
17571 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
17572 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
17573 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
17574 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
17575 "\x76\x44\x45\xF3\x24\x11\x57\x98"
17576 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
17577 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
17578 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
17579 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
17580 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
17581 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
17582 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
17583 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
17584 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
17585 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
17586 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
17587 "\x93\x11\x1C",
17588 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017589 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17590 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17591 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17592 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17593 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
17594 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017595 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17596 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17597 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17598 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17599 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17600 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17601 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17602 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17603 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17604 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17605 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17606 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17607 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17608 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17609 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17610 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17611 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17612 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17613 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17614 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17615 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17616 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17617 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17618 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17619 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17620 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17621 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17622 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17623 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17624 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17625 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17626 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17627 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17628 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17629 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17630 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17631 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17632 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17633 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17634 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17635 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17636 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17637 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17638 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17639 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17640 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17641 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17642 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17643 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17644 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17645 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17646 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17647 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17648 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17649 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17650 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
17651 "\x2B\xC2\x59",
17652 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017653 .also_non_np = 1,
17654 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017655 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030017656 }, { /* Generated with Crypto++ */
17657 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17658 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17659 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17660 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17661 .klen = 32,
17662 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17663 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17664 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
17665 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
17666 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
17667 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
17668 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
17669 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
17670 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
17671 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
17672 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
17673 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
17674 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
17675 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
17676 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
17677 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
17678 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
17679 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
17680 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
17681 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
17682 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
17683 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
17684 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
17685 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
17686 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
17687 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
17688 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
17689 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
17690 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
17691 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
17692 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
17693 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
17694 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
17695 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
17696 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
17697 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
17698 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
17699 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
17700 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
17701 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
17702 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
17703 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
17704 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
17705 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
17706 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
17707 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
17708 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
17709 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
17710 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
17711 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
17712 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
17713 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
17714 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
17715 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
17716 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
17717 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
17718 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
17719 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
17720 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
17721 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
17722 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
17723 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
17724 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
17725 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
17726 .ilen = 496,
17727 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17728 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17729 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17730 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17731 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
17732 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17733 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17734 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17735 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17736 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17737 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17738 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17739 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17740 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17741 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17742 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17743 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17744 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17745 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17746 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17747 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17748 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17749 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17750 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17751 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17752 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17753 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17754 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17755 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17756 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17757 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17758 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17759 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17760 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17761 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17762 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17763 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17764 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17765 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17766 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17767 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17768 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17769 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17770 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17771 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17772 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17773 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17774 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17775 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17776 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17777 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17778 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17779 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17780 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17781 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17782 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17783 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17784 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17785 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17786 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17787 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17788 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17789 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017790 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020017791};
17792
17793static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
17794 /* Generated from AES-LRW test vectors */
17795 {
17796 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
17797 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
17798 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
17799 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
17800 .klen = 32,
17801 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17802 "\x00\x00\x00\x00\x00\x00\x00\x01",
17803 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17804 "\x38\x39\x41\x42\x43\x44\x45\x46",
17805 .ilen = 16,
17806 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
17807 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
17808 .rlen = 16,
17809 }, {
17810 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
17811 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
17812 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
17813 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
17814 .klen = 32,
17815 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17816 "\x00\x00\x00\x00\x00\x00\x00\x02",
17817 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17818 "\x38\x39\x41\x42\x43\x44\x45\x46",
17819 .ilen = 16,
17820 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
17821 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
17822 .rlen = 16,
17823 }, {
17824 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
17825 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
17826 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
17827 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
17828 .klen = 32,
17829 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17830 "\x00\x00\x00\x02\x00\x00\x00\x00",
17831 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17832 "\x38\x39\x41\x42\x43\x44\x45\x46",
17833 .ilen = 16,
17834 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
17835 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
17836 .rlen = 16,
17837 }, {
17838 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
17839 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
17840 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
17841 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
17842 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
17843 .klen = 40,
17844 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17845 "\x00\x00\x00\x00\x00\x00\x00\x01",
17846 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17847 "\x38\x39\x41\x42\x43\x44\x45\x46",
17848 .ilen = 16,
17849 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
17850 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
17851 .rlen = 16,
17852 }, {
17853 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
17854 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
17855 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
17856 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
17857 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
17858 .klen = 40,
17859 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17860 "\x00\x00\x00\x02\x00\x00\x00\x00",
17861 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17862 "\x38\x39\x41\x42\x43\x44\x45\x46",
17863 .ilen = 16,
17864 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
17865 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
17866 .rlen = 16,
17867 }, {
17868 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17869 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17870 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17871 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17872 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17873 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17874 .klen = 48,
17875 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17876 "\x00\x00\x00\x00\x00\x00\x00\x01",
17877 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17878 "\x38\x39\x41\x42\x43\x44\x45\x46",
17879 .ilen = 16,
17880 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
17881 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
17882 .rlen = 16,
17883 }, {
17884 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17885 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17886 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17887 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17888 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17889 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17890 .klen = 48,
17891 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17892 "\x00\x00\x00\x02\x00\x00\x00\x00",
17893 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
17894 "\x38\x39\x41\x42\x43\x44\x45\x46",
17895 .ilen = 16,
17896 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
17897 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
17898 .rlen = 16,
17899 }, {
17900 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17901 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17902 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17903 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17904 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17905 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17906 .klen = 48,
17907 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17908 "\x00\x00\x00\x00\x00\x00\x00\x01",
17909 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17910 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17911 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17912 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17913 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17914 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17915 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17916 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17917 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17918 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17919 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17920 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17921 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17922 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17923 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17924 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17925 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17926 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17927 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17928 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17929 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17930 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17931 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17932 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17933 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17934 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17935 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17936 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17937 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17938 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17939 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17940 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17941 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17942 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17943 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17944 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17945 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17946 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17947 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17948 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17949 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17950 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17951 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17952 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17953 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17954 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17955 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17956 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17957 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17958 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17959 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17960 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17961 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17962 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17963 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17964 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17965 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17966 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17967 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17968 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17969 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17970 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17971 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17972 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17973 .ilen = 512,
17974 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
17975 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
17976 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
17977 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
17978 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
17979 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
17980 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
17981 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
17982 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
17983 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
17984 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
17985 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
17986 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
17987 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
17988 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
17989 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
17990 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
17991 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
17992 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
17993 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
17994 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
17995 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
17996 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
17997 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
17998 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
17999 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
18000 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
18001 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
18002 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
18003 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
18004 "\xed\x14\xa9\x57\x19\x63\x40\x04"
18005 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
18006 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
18007 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
18008 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
18009 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
18010 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
18011 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
18012 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
18013 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
18014 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
18015 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
18016 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
18017 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
18018 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
18019 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
18020 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
18021 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
18022 "\x35\xa5\x83\x04\x84\x01\x99\x56"
18023 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
18024 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
18025 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
18026 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
18027 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
18028 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
18029 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
18030 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
18031 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
18032 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
18033 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
18034 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
18035 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
18036 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
18037 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
18038 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018039 .also_non_np = 1,
18040 .np = 2,
18041 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018042 },
18043};
18044
18045static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
18046 /* Generated from AES-LRW test vectors */
18047 /* same as enc vectors with input and result reversed */
18048 {
18049 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
18050 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
18051 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
18052 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
18053 .klen = 32,
18054 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18055 "\x00\x00\x00\x00\x00\x00\x00\x01",
18056 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
18057 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
18058 .ilen = 16,
18059 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18060 "\x38\x39\x41\x42\x43\x44\x45\x46",
18061 .rlen = 16,
18062 }, {
18063 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
18064 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
18065 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
18066 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
18067 .klen = 32,
18068 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18069 "\x00\x00\x00\x00\x00\x00\x00\x02",
18070 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
18071 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
18072 .ilen = 16,
18073 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18074 "\x38\x39\x41\x42\x43\x44\x45\x46",
18075 .rlen = 16,
18076 }, {
18077 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
18078 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
18079 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
18080 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
18081 .klen = 32,
18082 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18083 "\x00\x00\x00\x02\x00\x00\x00\x00",
18084 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
18085 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
18086 .ilen = 16,
18087 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18088 "\x38\x39\x41\x42\x43\x44\x45\x46",
18089 .rlen = 16,
18090 }, {
18091 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
18092 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
18093 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
18094 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
18095 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
18096 .klen = 40,
18097 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18098 "\x00\x00\x00\x00\x00\x00\x00\x01",
18099 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
18100 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
18101 .ilen = 16,
18102 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18103 "\x38\x39\x41\x42\x43\x44\x45\x46",
18104 .rlen = 16,
18105 }, {
18106 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
18107 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
18108 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
18109 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
18110 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
18111 .klen = 40,
18112 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18113 "\x00\x00\x00\x02\x00\x00\x00\x00",
18114 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
18115 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
18116 .ilen = 16,
18117 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18118 "\x38\x39\x41\x42\x43\x44\x45\x46",
18119 .rlen = 16,
18120 }, {
18121 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
18122 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
18123 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
18124 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
18125 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
18126 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
18127 .klen = 48,
18128 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18129 "\x00\x00\x00\x00\x00\x00\x00\x01",
18130 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
18131 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
18132 .ilen = 16,
18133 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18134 "\x38\x39\x41\x42\x43\x44\x45\x46",
18135 .rlen = 16,
18136 }, {
18137 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
18138 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
18139 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
18140 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
18141 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
18142 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
18143 .klen = 48,
18144 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18145 "\x00\x00\x00\x02\x00\x00\x00\x00",
18146 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
18147 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
18148 .ilen = 16,
18149 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18150 "\x38\x39\x41\x42\x43\x44\x45\x46",
18151 .rlen = 16,
18152 }, {
18153 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
18154 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
18155 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
18156 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
18157 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
18158 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
18159 .klen = 48,
18160 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18161 "\x00\x00\x00\x00\x00\x00\x00\x01",
18162 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
18163 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
18164 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
18165 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
18166 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
18167 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
18168 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
18169 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
18170 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
18171 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
18172 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
18173 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
18174 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
18175 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
18176 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
18177 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
18178 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
18179 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
18180 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
18181 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
18182 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
18183 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
18184 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
18185 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
18186 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
18187 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
18188 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
18189 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
18190 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
18191 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
18192 "\xed\x14\xa9\x57\x19\x63\x40\x04"
18193 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
18194 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
18195 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
18196 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
18197 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
18198 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
18199 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
18200 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
18201 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
18202 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
18203 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
18204 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
18205 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
18206 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
18207 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
18208 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
18209 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
18210 "\x35\xa5\x83\x04\x84\x01\x99\x56"
18211 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
18212 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
18213 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
18214 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
18215 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
18216 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
18217 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
18218 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
18219 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
18220 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
18221 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
18222 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
18223 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
18224 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
18225 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
18226 .ilen = 512,
18227 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
18228 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
18229 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
18230 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
18231 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
18232 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
18233 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
18234 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
18235 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
18236 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
18237 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
18238 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
18239 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
18240 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
18241 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
18242 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
18243 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
18244 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
18245 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
18246 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
18247 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
18248 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
18249 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
18250 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
18251 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
18252 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
18253 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
18254 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
18255 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
18256 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
18257 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
18258 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
18259 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
18260 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
18261 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
18262 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
18263 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
18264 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
18265 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
18266 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
18267 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
18268 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
18269 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
18270 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
18271 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
18272 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
18273 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
18274 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
18275 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
18276 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
18277 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
18278 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
18279 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
18280 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
18281 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
18282 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
18283 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
18284 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
18285 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
18286 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
18287 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
18288 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
18289 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
18290 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
18291 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018292 .also_non_np = 1,
18293 .np = 2,
18294 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018295 },
18296};
18297
18298static struct cipher_testvec camellia_xts_enc_tv_template[] = {
18299 /* Generated from AES-XTS test vectors */
18300 {
18301 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
18302 "\x00\x00\x00\x00\x00\x00\x00\x00"
18303 "\x00\x00\x00\x00\x00\x00\x00\x00"
18304 "\x00\x00\x00\x00\x00\x00\x00\x00",
18305 .klen = 32,
18306 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18307 "\x00\x00\x00\x00\x00\x00\x00\x00",
18308 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
18309 "\x00\x00\x00\x00\x00\x00\x00\x00"
18310 "\x00\x00\x00\x00\x00\x00\x00\x00"
18311 "\x00\x00\x00\x00\x00\x00\x00\x00",
18312 .ilen = 32,
18313 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
18314 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
18315 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
18316 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
18317 .rlen = 32,
18318 }, {
18319 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
18320 "\x11\x11\x11\x11\x11\x11\x11\x11"
18321 "\x22\x22\x22\x22\x22\x22\x22\x22"
18322 "\x22\x22\x22\x22\x22\x22\x22\x22",
18323 .klen = 32,
18324 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18325 "\x00\x00\x00\x00\x00\x00\x00\x00",
18326 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
18327 "\x44\x44\x44\x44\x44\x44\x44\x44"
18328 "\x44\x44\x44\x44\x44\x44\x44\x44"
18329 "\x44\x44\x44\x44\x44\x44\x44\x44",
18330 .ilen = 32,
18331 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
18332 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
18333 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
18334 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
18335 .rlen = 32,
18336 }, {
18337 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
18338 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
18339 "\x22\x22\x22\x22\x22\x22\x22\x22"
18340 "\x22\x22\x22\x22\x22\x22\x22\x22",
18341 .klen = 32,
18342 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18343 "\x00\x00\x00\x00\x00\x00\x00\x00",
18344 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
18345 "\x44\x44\x44\x44\x44\x44\x44\x44"
18346 "\x44\x44\x44\x44\x44\x44\x44\x44"
18347 "\x44\x44\x44\x44\x44\x44\x44\x44",
18348 .ilen = 32,
18349 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
18350 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
18351 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
18352 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
18353 .rlen = 32,
18354 }, {
18355 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18356 "\x23\x53\x60\x28\x74\x71\x35\x26"
18357 "\x31\x41\x59\x26\x53\x58\x97\x93"
18358 "\x23\x84\x62\x64\x33\x83\x27\x95",
18359 .klen = 32,
18360 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18361 "\x00\x00\x00\x00\x00\x00\x00\x00",
18362 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18363 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18364 "\x10\x11\x12\x13\x14\x15\x16\x17"
18365 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18366 "\x20\x21\x22\x23\x24\x25\x26\x27"
18367 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18368 "\x30\x31\x32\x33\x34\x35\x36\x37"
18369 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18370 "\x40\x41\x42\x43\x44\x45\x46\x47"
18371 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18372 "\x50\x51\x52\x53\x54\x55\x56\x57"
18373 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18374 "\x60\x61\x62\x63\x64\x65\x66\x67"
18375 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18376 "\x70\x71\x72\x73\x74\x75\x76\x77"
18377 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18378 "\x80\x81\x82\x83\x84\x85\x86\x87"
18379 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18380 "\x90\x91\x92\x93\x94\x95\x96\x97"
18381 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18382 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18383 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18384 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18385 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18386 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18387 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18388 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18389 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18390 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18391 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18392 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18393 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18394 "\x00\x01\x02\x03\x04\x05\x06\x07"
18395 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18396 "\x10\x11\x12\x13\x14\x15\x16\x17"
18397 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18398 "\x20\x21\x22\x23\x24\x25\x26\x27"
18399 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18400 "\x30\x31\x32\x33\x34\x35\x36\x37"
18401 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18402 "\x40\x41\x42\x43\x44\x45\x46\x47"
18403 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18404 "\x50\x51\x52\x53\x54\x55\x56\x57"
18405 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18406 "\x60\x61\x62\x63\x64\x65\x66\x67"
18407 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18408 "\x70\x71\x72\x73\x74\x75\x76\x77"
18409 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18410 "\x80\x81\x82\x83\x84\x85\x86\x87"
18411 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18412 "\x90\x91\x92\x93\x94\x95\x96\x97"
18413 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18414 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18415 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18416 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18417 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18418 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18419 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18420 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18421 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18422 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18423 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18424 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18425 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18426 .ilen = 512,
18427 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
18428 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
18429 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
18430 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
18431 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
18432 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
18433 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
18434 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
18435 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
18436 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
18437 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
18438 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
18439 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
18440 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
18441 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
18442 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
18443 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
18444 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
18445 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
18446 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
18447 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
18448 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
18449 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
18450 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
18451 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
18452 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
18453 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
18454 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
18455 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
18456 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
18457 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
18458 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
18459 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
18460 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
18461 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
18462 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
18463 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
18464 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
18465 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
18466 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
18467 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
18468 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
18469 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
18470 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
18471 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
18472 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
18473 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
18474 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
18475 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
18476 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
18477 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
18478 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
18479 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
18480 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
18481 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
18482 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
18483 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
18484 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
18485 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
18486 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
18487 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
18488 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
18489 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
18490 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
18491 .rlen = 512,
18492 }, {
18493 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18494 "\x23\x53\x60\x28\x74\x71\x35\x26"
18495 "\x62\x49\x77\x57\x24\x70\x93\x69"
18496 "\x99\x59\x57\x49\x66\x96\x76\x27"
18497 "\x31\x41\x59\x26\x53\x58\x97\x93"
18498 "\x23\x84\x62\x64\x33\x83\x27\x95"
18499 "\x02\x88\x41\x97\x16\x93\x99\x37"
18500 "\x51\x05\x82\x09\x74\x94\x45\x92",
18501 .klen = 64,
18502 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
18503 "\x00\x00\x00\x00\x00\x00\x00\x00",
18504 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18505 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18506 "\x10\x11\x12\x13\x14\x15\x16\x17"
18507 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18508 "\x20\x21\x22\x23\x24\x25\x26\x27"
18509 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18510 "\x30\x31\x32\x33\x34\x35\x36\x37"
18511 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18512 "\x40\x41\x42\x43\x44\x45\x46\x47"
18513 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18514 "\x50\x51\x52\x53\x54\x55\x56\x57"
18515 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18516 "\x60\x61\x62\x63\x64\x65\x66\x67"
18517 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18518 "\x70\x71\x72\x73\x74\x75\x76\x77"
18519 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18520 "\x80\x81\x82\x83\x84\x85\x86\x87"
18521 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18522 "\x90\x91\x92\x93\x94\x95\x96\x97"
18523 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18524 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18525 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18526 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18527 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18528 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18529 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18530 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18531 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18532 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18533 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18534 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18535 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18536 "\x00\x01\x02\x03\x04\x05\x06\x07"
18537 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18538 "\x10\x11\x12\x13\x14\x15\x16\x17"
18539 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18540 "\x20\x21\x22\x23\x24\x25\x26\x27"
18541 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18542 "\x30\x31\x32\x33\x34\x35\x36\x37"
18543 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18544 "\x40\x41\x42\x43\x44\x45\x46\x47"
18545 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18546 "\x50\x51\x52\x53\x54\x55\x56\x57"
18547 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18548 "\x60\x61\x62\x63\x64\x65\x66\x67"
18549 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18550 "\x70\x71\x72\x73\x74\x75\x76\x77"
18551 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18552 "\x80\x81\x82\x83\x84\x85\x86\x87"
18553 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18554 "\x90\x91\x92\x93\x94\x95\x96\x97"
18555 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18556 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18557 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18558 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18559 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18560 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18561 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18562 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18563 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18564 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18565 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18566 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18567 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18568 .ilen = 512,
18569 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
18570 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
18571 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
18572 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
18573 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
18574 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
18575 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
18576 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
18577 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
18578 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
18579 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
18580 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
18581 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
18582 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
18583 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
18584 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
18585 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
18586 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
18587 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
18588 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
18589 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
18590 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
18591 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
18592 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
18593 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
18594 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
18595 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
18596 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
18597 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
18598 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
18599 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
18600 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
18601 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
18602 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
18603 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
18604 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
18605 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
18606 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
18607 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
18608 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
18609 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
18610 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
18611 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
18612 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
18613 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
18614 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
18615 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
18616 "\x21\x17\xf8\x59\x15\x24\x64\x22"
18617 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
18618 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
18619 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
18620 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
18621 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
18622 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
18623 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
18624 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
18625 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
18626 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
18627 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
18628 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
18629 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
18630 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
18631 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
18632 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
18633 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018634 .also_non_np = 1,
18635 .np = 2,
18636 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018637 },
18638};
18639
18640static struct cipher_testvec camellia_xts_dec_tv_template[] = {
18641 /* Generated from AES-XTS test vectors */
18642 /* same as enc vectors with input and result reversed */
18643 {
18644 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
18645 "\x00\x00\x00\x00\x00\x00\x00\x00"
18646 "\x00\x00\x00\x00\x00\x00\x00\x00"
18647 "\x00\x00\x00\x00\x00\x00\x00\x00",
18648 .klen = 32,
18649 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18650 "\x00\x00\x00\x00\x00\x00\x00\x00",
18651 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
18652 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
18653 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
18654 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
18655 .ilen = 32,
18656 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
18657 "\x00\x00\x00\x00\x00\x00\x00\x00"
18658 "\x00\x00\x00\x00\x00\x00\x00\x00"
18659 "\x00\x00\x00\x00\x00\x00\x00\x00",
18660 .rlen = 32,
18661 }, {
18662 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
18663 "\x11\x11\x11\x11\x11\x11\x11\x11"
18664 "\x22\x22\x22\x22\x22\x22\x22\x22"
18665 "\x22\x22\x22\x22\x22\x22\x22\x22",
18666 .klen = 32,
18667 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18668 "\x00\x00\x00\x00\x00\x00\x00\x00",
18669 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
18670 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
18671 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
18672 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
18673 .ilen = 32,
18674 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
18675 "\x44\x44\x44\x44\x44\x44\x44\x44"
18676 "\x44\x44\x44\x44\x44\x44\x44\x44"
18677 "\x44\x44\x44\x44\x44\x44\x44\x44",
18678 .rlen = 32,
18679 }, {
18680 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
18681 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
18682 "\x22\x22\x22\x22\x22\x22\x22\x22"
18683 "\x22\x22\x22\x22\x22\x22\x22\x22",
18684 .klen = 32,
18685 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
18686 "\x00\x00\x00\x00\x00\x00\x00\x00",
18687 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
18688 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
18689 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
18690 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
18691 .ilen = 32,
18692 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
18693 "\x44\x44\x44\x44\x44\x44\x44\x44"
18694 "\x44\x44\x44\x44\x44\x44\x44\x44"
18695 "\x44\x44\x44\x44\x44\x44\x44\x44",
18696 .rlen = 32,
18697 }, {
18698 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18699 "\x23\x53\x60\x28\x74\x71\x35\x26"
18700 "\x31\x41\x59\x26\x53\x58\x97\x93"
18701 "\x23\x84\x62\x64\x33\x83\x27\x95",
18702 .klen = 32,
18703 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18704 "\x00\x00\x00\x00\x00\x00\x00\x00",
18705 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
18706 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
18707 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
18708 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
18709 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
18710 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
18711 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
18712 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
18713 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
18714 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
18715 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
18716 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
18717 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
18718 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
18719 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
18720 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
18721 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
18722 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
18723 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
18724 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
18725 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
18726 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
18727 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
18728 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
18729 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
18730 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
18731 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
18732 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
18733 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
18734 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
18735 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
18736 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
18737 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
18738 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
18739 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
18740 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
18741 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
18742 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
18743 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
18744 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
18745 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
18746 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
18747 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
18748 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
18749 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
18750 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
18751 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
18752 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
18753 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
18754 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
18755 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
18756 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
18757 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
18758 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
18759 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
18760 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
18761 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
18762 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
18763 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
18764 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
18765 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
18766 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
18767 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
18768 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
18769 .ilen = 512,
18770 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
18771 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18772 "\x10\x11\x12\x13\x14\x15\x16\x17"
18773 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18774 "\x20\x21\x22\x23\x24\x25\x26\x27"
18775 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18776 "\x30\x31\x32\x33\x34\x35\x36\x37"
18777 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18778 "\x40\x41\x42\x43\x44\x45\x46\x47"
18779 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18780 "\x50\x51\x52\x53\x54\x55\x56\x57"
18781 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18782 "\x60\x61\x62\x63\x64\x65\x66\x67"
18783 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18784 "\x70\x71\x72\x73\x74\x75\x76\x77"
18785 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18786 "\x80\x81\x82\x83\x84\x85\x86\x87"
18787 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18788 "\x90\x91\x92\x93\x94\x95\x96\x97"
18789 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18790 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18791 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18792 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18793 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18794 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18795 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18796 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18797 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18798 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18799 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18800 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18801 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18802 "\x00\x01\x02\x03\x04\x05\x06\x07"
18803 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18804 "\x10\x11\x12\x13\x14\x15\x16\x17"
18805 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18806 "\x20\x21\x22\x23\x24\x25\x26\x27"
18807 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18808 "\x30\x31\x32\x33\x34\x35\x36\x37"
18809 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18810 "\x40\x41\x42\x43\x44\x45\x46\x47"
18811 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18812 "\x50\x51\x52\x53\x54\x55\x56\x57"
18813 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18814 "\x60\x61\x62\x63\x64\x65\x66\x67"
18815 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18816 "\x70\x71\x72\x73\x74\x75\x76\x77"
18817 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18818 "\x80\x81\x82\x83\x84\x85\x86\x87"
18819 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18820 "\x90\x91\x92\x93\x94\x95\x96\x97"
18821 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18822 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18823 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18824 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18825 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18826 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18827 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18828 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18829 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18830 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18831 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18832 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18833 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18834 .rlen = 512,
18835 }, {
18836 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
18837 "\x23\x53\x60\x28\x74\x71\x35\x26"
18838 "\x62\x49\x77\x57\x24\x70\x93\x69"
18839 "\x99\x59\x57\x49\x66\x96\x76\x27"
18840 "\x31\x41\x59\x26\x53\x58\x97\x93"
18841 "\x23\x84\x62\x64\x33\x83\x27\x95"
18842 "\x02\x88\x41\x97\x16\x93\x99\x37"
18843 "\x51\x05\x82\x09\x74\x94\x45\x92",
18844 .klen = 64,
18845 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
18846 "\x00\x00\x00\x00\x00\x00\x00\x00",
18847 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
18848 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
18849 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
18850 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
18851 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
18852 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
18853 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
18854 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
18855 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
18856 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
18857 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
18858 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
18859 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
18860 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
18861 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
18862 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
18863 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
18864 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
18865 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
18866 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
18867 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
18868 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
18869 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
18870 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
18871 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
18872 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
18873 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
18874 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
18875 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
18876 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
18877 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
18878 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
18879 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
18880 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
18881 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
18882 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
18883 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
18884 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
18885 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
18886 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
18887 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
18888 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
18889 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
18890 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
18891 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
18892 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
18893 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
18894 "\x21\x17\xf8\x59\x15\x24\x64\x22"
18895 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
18896 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
18897 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
18898 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
18899 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
18900 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
18901 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
18902 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
18903 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
18904 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
18905 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
18906 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
18907 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
18908 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
18909 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
18910 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
18911 .ilen = 512,
18912 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
18913 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18914 "\x10\x11\x12\x13\x14\x15\x16\x17"
18915 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18916 "\x20\x21\x22\x23\x24\x25\x26\x27"
18917 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18918 "\x30\x31\x32\x33\x34\x35\x36\x37"
18919 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18920 "\x40\x41\x42\x43\x44\x45\x46\x47"
18921 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18922 "\x50\x51\x52\x53\x54\x55\x56\x57"
18923 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18924 "\x60\x61\x62\x63\x64\x65\x66\x67"
18925 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18926 "\x70\x71\x72\x73\x74\x75\x76\x77"
18927 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18928 "\x80\x81\x82\x83\x84\x85\x86\x87"
18929 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18930 "\x90\x91\x92\x93\x94\x95\x96\x97"
18931 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18932 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18933 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18934 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18935 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18936 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18937 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18938 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18939 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18940 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18941 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18942 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18943 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18944 "\x00\x01\x02\x03\x04\x05\x06\x07"
18945 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18946 "\x10\x11\x12\x13\x14\x15\x16\x17"
18947 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18948 "\x20\x21\x22\x23\x24\x25\x26\x27"
18949 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18950 "\x30\x31\x32\x33\x34\x35\x36\x37"
18951 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18952 "\x40\x41\x42\x43\x44\x45\x46\x47"
18953 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18954 "\x50\x51\x52\x53\x54\x55\x56\x57"
18955 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18956 "\x60\x61\x62\x63\x64\x65\x66\x67"
18957 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18958 "\x70\x71\x72\x73\x74\x75\x76\x77"
18959 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18960 "\x80\x81\x82\x83\x84\x85\x86\x87"
18961 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18962 "\x90\x91\x92\x93\x94\x95\x96\x97"
18963 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18964 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18965 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18966 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18967 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18968 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18969 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18970 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18971 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18972 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18973 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18974 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18975 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18976 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018977 .also_non_np = 1,
18978 .np = 2,
18979 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018980 },
Herbert Xuda7f0332008-07-31 17:08:25 +080018981};
18982
18983/*
18984 * SEED test vectors
18985 */
18986#define SEED_ENC_TEST_VECTORS 4
18987#define SEED_DEC_TEST_VECTORS 4
18988
18989static struct cipher_testvec seed_enc_tv_template[] = {
18990 {
18991 .key = zeroed_string,
18992 .klen = 16,
18993 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18994 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
18995 .ilen = 16,
18996 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
18997 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
18998 .rlen = 16,
18999 }, {
19000 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19001 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19002 .klen = 16,
19003 .input = zeroed_string,
19004 .ilen = 16,
19005 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
19006 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
19007 .rlen = 16,
19008 }, {
19009 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
19010 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
19011 .klen = 16,
19012 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
19013 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
19014 .ilen = 16,
19015 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
19016 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
19017 .rlen = 16,
19018 }, {
19019 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
19020 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
19021 .klen = 16,
19022 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
19023 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
19024 .ilen = 16,
19025 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
19026 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
19027 .rlen = 16,
19028 }
19029};
19030
19031static struct cipher_testvec seed_dec_tv_template[] = {
19032 {
19033 .key = zeroed_string,
19034 .klen = 16,
19035 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
19036 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
19037 .ilen = 16,
19038 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19039 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19040 .rlen = 16,
19041 }, {
19042 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19043 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19044 .klen = 16,
19045 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
19046 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
19047 .ilen = 16,
19048 .result = zeroed_string,
19049 .rlen = 16,
19050 }, {
19051 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
19052 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
19053 .klen = 16,
19054 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
19055 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
19056 .ilen = 16,
19057 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
19058 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
19059 .rlen = 16,
19060 }, {
19061 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
19062 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
19063 .klen = 16,
19064 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
19065 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
19066 .ilen = 16,
19067 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
19068 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
19069 .rlen = 16,
19070 }
19071};
19072
19073#define SALSA20_STREAM_ENC_TEST_VECTORS 5
19074static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
19075 /*
19076 * Testvectors from verified.test-vectors submitted to ECRYPT.
19077 * They are truncated to size 39, 64, 111, 129 to test a variety
19078 * of input length.
19079 */
19080 { /* Set 3, vector 0 */
19081 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19082 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
19083 .klen = 16,
19084 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19085 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19086 "\x00\x00\x00\x00\x00\x00\x00\x00"
19087 "\x00\x00\x00\x00\x00\x00\x00\x00"
19088 "\x00\x00\x00\x00\x00\x00\x00\x00"
19089 "\x00\x00\x00\x00\x00\x00\x00",
19090 .ilen = 39,
19091 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
19092 "\x68\x02\x41\x0C\x68\x86\x88\x89"
19093 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
19094 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
19095 "\x58\x3F\x52\x79\x70\xEB\xC1",
19096 .rlen = 39,
19097 }, { /* Set 5, vector 0 */
19098 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
19099 "\x00\x00\x00\x00\x00\x00\x00\x00",
19100 .klen = 16,
19101 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
19102 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19103 "\x00\x00\x00\x00\x00\x00\x00\x00"
19104 "\x00\x00\x00\x00\x00\x00\x00\x00"
19105 "\x00\x00\x00\x00\x00\x00\x00\x00"
19106 "\x00\x00\x00\x00\x00\x00\x00\x00"
19107 "\x00\x00\x00\x00\x00\x00\x00\x00"
19108 "\x00\x00\x00\x00\x00\x00\x00\x00"
19109 "\x00\x00\x00\x00\x00\x00\x00\x00",
19110 .ilen = 64,
19111 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
19112 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
19113 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
19114 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
19115 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
19116 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
19117 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
19118 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
19119 .rlen = 64,
19120 }, { /* Set 3, vector 27 */
19121 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
19122 "\x23\x24\x25\x26\x27\x28\x29\x2A"
19123 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
19124 "\x33\x34\x35\x36\x37\x38\x39\x3A",
19125 .klen = 32,
19126 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19127 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19128 "\x00\x00\x00\x00\x00\x00\x00\x00"
19129 "\x00\x00\x00\x00\x00\x00\x00\x00"
19130 "\x00\x00\x00\x00\x00\x00\x00\x00"
19131 "\x00\x00\x00\x00\x00\x00\x00\x00"
19132 "\x00\x00\x00\x00\x00\x00\x00\x00"
19133 "\x00\x00\x00\x00\x00\x00\x00\x00"
19134 "\x00\x00\x00\x00\x00\x00\x00\x00"
19135 "\x00\x00\x00\x00\x00\x00\x00\x00"
19136 "\x00\x00\x00\x00\x00\x00\x00\x00"
19137 "\x00\x00\x00\x00\x00\x00\x00\x00"
19138 "\x00\x00\x00\x00\x00\x00\x00\x00"
19139 "\x00\x00\x00\x00\x00\x00\x00\x00"
19140 "\x00\x00\x00\x00\x00\x00\x00",
19141 .ilen = 111,
19142 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
19143 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
19144 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
19145 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
19146 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
19147 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
19148 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
19149 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
19150 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
19151 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
19152 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
19153 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
19154 "\x95\x46\x45\x54\xE9\x75\x03\x08"
19155 "\x44\xAF\xE5\x8A\x81\x12\x09",
19156 .rlen = 111,
19157 }, { /* Set 5, vector 27 */
19158 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
19159 "\x00\x00\x00\x00\x00\x00\x00\x00"
19160 "\x00\x00\x00\x00\x00\x00\x00\x00"
19161 "\x00\x00\x00\x00\x00\x00\x00\x00",
19162 .klen = 32,
19163 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
19164 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19165 "\x00\x00\x00\x00\x00\x00\x00\x00"
19166 "\x00\x00\x00\x00\x00\x00\x00\x00"
19167 "\x00\x00\x00\x00\x00\x00\x00\x00"
19168 "\x00\x00\x00\x00\x00\x00\x00\x00"
19169 "\x00\x00\x00\x00\x00\x00\x00\x00"
19170 "\x00\x00\x00\x00\x00\x00\x00\x00"
19171 "\x00\x00\x00\x00\x00\x00\x00\x00"
19172 "\x00\x00\x00\x00\x00\x00\x00\x00"
19173 "\x00\x00\x00\x00\x00\x00\x00\x00"
19174 "\x00\x00\x00\x00\x00\x00\x00\x00"
19175 "\x00\x00\x00\x00\x00\x00\x00\x00"
19176 "\x00\x00\x00\x00\x00\x00\x00\x00"
19177 "\x00\x00\x00\x00\x00\x00\x00\x00"
19178 "\x00\x00\x00\x00\x00\x00\x00\x00"
19179 "\x00\x00\x00\x00\x00\x00\x00\x00"
19180 "\x00",
19181 .ilen = 129,
19182 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
19183 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
19184 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
19185 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
19186 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
19187 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
19188 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
19189 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
19190 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
19191 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
19192 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
19193 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
19194 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
19195 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
19196 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
19197 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
19198 "\x5A",
19199 .rlen = 129,
19200 }, { /* large test vector generated using Crypto++ */
19201 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19202 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19203 "\x10\x11\x12\x13\x14\x15\x16\x17"
19204 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19205 .klen = 32,
19206 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19207 "\x00\x00\x00\x00\x00\x00\x00\x00",
19208 .input =
19209 "\x00\x01\x02\x03\x04\x05\x06\x07"
19210 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19211 "\x10\x11\x12\x13\x14\x15\x16\x17"
19212 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19213 "\x20\x21\x22\x23\x24\x25\x26\x27"
19214 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19215 "\x30\x31\x32\x33\x34\x35\x36\x37"
19216 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19217 "\x40\x41\x42\x43\x44\x45\x46\x47"
19218 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19219 "\x50\x51\x52\x53\x54\x55\x56\x57"
19220 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19221 "\x60\x61\x62\x63\x64\x65\x66\x67"
19222 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19223 "\x70\x71\x72\x73\x74\x75\x76\x77"
19224 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19225 "\x80\x81\x82\x83\x84\x85\x86\x87"
19226 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19227 "\x90\x91\x92\x93\x94\x95\x96\x97"
19228 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19229 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19230 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19231 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19232 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19233 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19234 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19235 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19236 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19237 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19238 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19239 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19240 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19241 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
19242 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
19243 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
19244 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
19245 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
19246 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
19247 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
19248 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
19249 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
19250 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
19251 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
19252 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
19253 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
19254 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
19255 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
19256 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
19257 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
19258 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
19259 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
19260 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
19261 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
19262 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
19263 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
19264 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
19265 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
19266 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
19267 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
19268 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
19269 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
19270 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
19271 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
19272 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
19273 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
19274 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
19275 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
19276 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
19277 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
19278 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
19279 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
19280 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
19281 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
19282 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
19283 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
19284 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
19285 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
19286 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
19287 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
19288 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
19289 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
19290 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
19291 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
19292 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
19293 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
19294 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
19295 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
19296 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
19297 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
19298 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
19299 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
19300 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
19301 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
19302 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
19303 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
19304 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
19305 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
19306 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
19307 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
19308 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
19309 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
19310 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
19311 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
19312 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
19313 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
19314 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
19315 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
19316 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
19317 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
19318 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
19319 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
19320 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
19321 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
19322 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
19323 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
19324 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
19325 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
19326 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
19327 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
19328 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
19329 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
19330 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
19331 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
19332 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
19333 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
19334 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
19335 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
19336 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
19337 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
19338 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
19339 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
19340 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
19341 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
19342 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
19343 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
19344 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
19345 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
19346 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
19347 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
19348 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
19349 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
19350 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
19351 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
19352 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
19353 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
19354 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
19355 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
19356 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
19357 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
19358 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
19359 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
19360 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
19361 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
19362 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
19363 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
19364 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
19365 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
19366 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
19367 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
19368 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
19369 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
19370 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
19371 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
19372 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
19373 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
19374 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
19375 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
19376 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
19377 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
19378 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
19379 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
19380 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
19381 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
19382 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
19383 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
19384 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
19385 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
19386 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
19387 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
19388 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
19389 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
19390 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
19391 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
19392 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
19393 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
19394 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
19395 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
19396 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
19397 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
19398 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
19399 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
19400 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
19401 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
19402 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
19403 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
19404 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
19405 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
19406 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
19407 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
19408 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
19409 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
19410 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
19411 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
19412 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
19413 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
19414 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
19415 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
19416 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
19417 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
19418 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
19419 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
19420 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
19421 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
19422 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
19423 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
19424 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
19425 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
19426 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
19427 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
19428 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
19429 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
19430 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
19431 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
19432 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
19433 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
19434 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
19435 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
19436 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
19437 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
19438 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
19439 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
19440 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
19441 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
19442 "\x38\x47\x56\x65\x74\x83\x92\xa1"
19443 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
19444 "\x28\x37\x46\x55\x64\x73\x82\x91"
19445 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
19446 "\x18\x27\x36\x45\x54\x63\x72\x81"
19447 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
19448 "\x08\x17\x26\x35\x44\x53\x62\x71"
19449 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
19450 "\xf8\x07\x16\x25\x34\x43\x52\x61"
19451 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
19452 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
19453 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
19454 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
19455 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
19456 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
19457 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
19458 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
19459 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
19460 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
19461 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
19462 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
19463 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
19464 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
19465 "\x00\x11\x22\x33\x44\x55\x66\x77"
19466 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
19467 "\x10\x21\x32\x43\x54\x65\x76\x87"
19468 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
19469 "\x20\x31\x42\x53\x64\x75\x86\x97"
19470 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
19471 "\x30\x41\x52\x63\x74\x85\x96\xa7"
19472 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
19473 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
19474 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
19475 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
19476 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
19477 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
19478 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
19479 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
19480 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
19481 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
19482 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
19483 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
19484 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
19485 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
19486 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
19487 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
19488 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
19489 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
19490 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
19491 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
19492 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
19493 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
19494 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
19495 "\xf0\x01\x12\x23\x34\x45\x56\x67"
19496 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
19497 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
19498 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
19499 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
19500 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
19501 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
19502 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
19503 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
19504 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
19505 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
19506 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
19507 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
19508 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
19509 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
19510 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
19511 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
19512 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
19513 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
19514 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
19515 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
19516 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
19517 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
19518 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
19519 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
19520 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
19521 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
19522 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
19523 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
19524 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
19525 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
19526 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
19527 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
19528 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
19529 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
19530 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
19531 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
19532 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
19533 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
19534 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
19535 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
19536 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
19537 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
19538 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
19539 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
19540 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
19541 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
19542 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
19543 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
19544 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
19545 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
19546 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
19547 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
19548 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
19549 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
19550 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
19551 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
19552 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
19553 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
19554 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
19555 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
19556 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
19557 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
19558 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
19559 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
19560 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
19561 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
19562 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
19563 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
19564 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
19565 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
19566 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
19567 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
19568 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
19569 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
19570 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
19571 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
19572 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
19573 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
19574 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
19575 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
19576 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
19577 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
19578 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
19579 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
19580 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
19581 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
19582 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
19583 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
19584 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
19585 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
19586 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
19587 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
19588 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
19589 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
19590 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
19591 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
19592 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
19593 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
19594 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
19595 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
19596 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
19597 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
19598 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
19599 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
19600 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
19601 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
19602 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
19603 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
19604 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
19605 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
19606 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
19607 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
19608 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
19609 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
19610 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
19611 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
19612 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
19613 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
19614 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
19615 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
19616 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19617 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19618 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19619 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19620 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19621 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19622 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19623 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19624 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19625 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19626 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19627 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19628 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19629 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19630 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19631 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19632 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19633 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19634 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19635 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19636 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19637 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19638 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19639 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19640 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19641 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19642 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19643 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19644 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19645 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19646 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19647 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19648 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19649 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19650 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19651 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19652 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19653 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19654 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19655 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19656 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19657 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19658 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19659 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19660 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19661 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19662 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19663 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19664 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19665 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19666 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19667 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19668 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19669 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19670 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19671 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19672 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19673 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19674 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19675 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19676 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19677 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19678 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19679 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19680 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19681 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19682 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19683 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19684 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19685 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19686 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19687 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19688 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19689 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19690 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19691 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19692 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19693 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19694 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19695 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19696 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19697 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19698 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19699 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19700 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19701 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19702 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19703 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19704 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19705 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19706 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19707 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19708 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19709 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19710 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19711 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19712 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19713 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19714 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19715 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19716 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19717 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19718 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19719 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19720 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19721 "\x00\x21\x42\x63",
19722 .ilen = 4100,
19723 .result =
19724 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
19725 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
19726 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
19727 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
19728 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
19729 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
19730 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
19731 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
19732 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
19733 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
19734 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
19735 "\xbb\xde\x56\x86\xab\x65\x21\x30"
19736 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
19737 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
19738 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
19739 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
19740 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
19741 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
19742 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
19743 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
19744 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
19745 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
19746 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
19747 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
19748 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
19749 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
19750 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
19751 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
19752 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
19753 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
19754 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
19755 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
19756 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
19757 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
19758 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
19759 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
19760 "\x62\x08\x18\x7a\x25\x49\x28\xac"
19761 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
19762 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
19763 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
19764 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
19765 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
19766 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
19767 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
19768 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
19769 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
19770 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
19771 "\x33\xee\x14\x19\x22\x52\x89\xa7"
19772 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
19773 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
19774 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
19775 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
19776 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
19777 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
19778 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
19779 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
19780 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
19781 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
19782 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
19783 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
19784 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
19785 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
19786 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
19787 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
19788 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
19789 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
19790 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
19791 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
19792 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
19793 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
19794 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
19795 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
19796 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
19797 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
19798 "\x49\x97\x33\xab\x36\x14\x0a\x70"
19799 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
19800 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
19801 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
19802 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
19803 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
19804 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
19805 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
19806 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
19807 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
19808 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
19809 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
19810 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
19811 "\xad\x04\x07\xae\x22\x90\x4a\x93"
19812 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
19813 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
19814 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
19815 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
19816 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
19817 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
19818 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
19819 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
19820 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
19821 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
19822 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
19823 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
19824 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
19825 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
19826 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
19827 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
19828 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
19829 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
19830 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
19831 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
19832 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
19833 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
19834 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
19835 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
19836 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
19837 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
19838 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
19839 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
19840 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
19841 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
19842 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
19843 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
19844 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
19845 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
19846 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
19847 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
19848 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
19849 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
19850 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
19851 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
19852 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
19853 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
19854 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
19855 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
19856 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
19857 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
19858 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
19859 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
19860 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
19861 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
19862 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
19863 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
19864 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
19865 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
19866 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
19867 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
19868 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
19869 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
19870 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
19871 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
19872 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
19873 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
19874 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
19875 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
19876 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
19877 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
19878 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
19879 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
19880 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
19881 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
19882 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
19883 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
19884 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
19885 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
19886 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
19887 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
19888 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
19889 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
19890 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
19891 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
19892 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
19893 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
19894 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
19895 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
19896 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
19897 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
19898 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
19899 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
19900 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
19901 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
19902 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
19903 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
19904 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
19905 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
19906 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
19907 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
19908 "\x2e\x53\x49\x97\x94\x33\xae\x40"
19909 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
19910 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
19911 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
19912 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
19913 "\xce\x87\xad\xcc\x72\x05\x00\x29"
19914 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
19915 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
19916 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
19917 "\xac\xc0\x79\x50\x69\xca\x59\x32"
19918 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
19919 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
19920 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
19921 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
19922 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
19923 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
19924 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
19925 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
19926 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
19927 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
19928 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
19929 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
19930 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
19931 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
19932 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
19933 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
19934 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
19935 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
19936 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
19937 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
19938 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
19939 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
19940 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
19941 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
19942 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
19943 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
19944 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
19945 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
19946 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
19947 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
19948 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
19949 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
19950 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
19951 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
19952 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
19953 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
19954 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
19955 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
19956 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
19957 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
19958 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
19959 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
19960 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
19961 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
19962 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
19963 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
19964 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
19965 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
19966 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
19967 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
19968 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
19969 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
19970 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
19971 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
19972 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
19973 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
19974 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
19975 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
19976 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
19977 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
19978 "\x38\x55\xab\x33\x26\xef\x9f\x43"
19979 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
19980 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
19981 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
19982 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
19983 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
19984 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
19985 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
19986 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
19987 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
19988 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
19989 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
19990 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
19991 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
19992 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
19993 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
19994 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
19995 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
19996 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
19997 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
19998 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
19999 "\x62\x36\x43\xb2\x82\x15\x75\x50"
20000 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
20001 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
20002 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
20003 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
20004 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
20005 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
20006 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
20007 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
20008 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
20009 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
20010 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
20011 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
20012 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
20013 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
20014 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
20015 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
20016 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
20017 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
20018 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
20019 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
20020 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
20021 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
20022 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
20023 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
20024 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
20025 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
20026 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
20027 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
20028 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
20029 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
20030 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
20031 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
20032 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
20033 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
20034 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
20035 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
20036 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
20037 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
20038 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
20039 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
20040 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
20041 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
20042 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
20043 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
20044 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
20045 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
20046 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
20047 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
20048 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
20049 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
20050 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
20051 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
20052 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
20053 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
20054 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
20055 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
20056 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
20057 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
20058 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
20059 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
20060 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
20061 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
20062 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
20063 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
20064 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
20065 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
20066 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
20067 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
20068 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
20069 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
20070 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
20071 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
20072 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
20073 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
20074 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
20075 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
20076 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
20077 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
20078 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
20079 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
20080 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
20081 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
20082 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
20083 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
20084 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
20085 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
20086 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
20087 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
20088 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
20089 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
20090 "\x73\x2e\x71\x79\x16\x06\x63\x28"
20091 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
20092 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
20093 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
20094 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
20095 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
20096 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
20097 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
20098 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
20099 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
20100 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
20101 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
20102 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
20103 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
20104 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
20105 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
20106 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
20107 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
20108 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
20109 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
20110 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
20111 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
20112 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
20113 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
20114 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
20115 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
20116 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
20117 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
20118 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
20119 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
20120 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
20121 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
20122 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
20123 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
20124 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
20125 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
20126 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
20127 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
20128 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
20129 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
20130 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
20131 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
20132 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
20133 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
20134 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
20135 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
20136 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
20137 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
20138 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
20139 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
20140 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
20141 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
20142 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
20143 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
20144 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
20145 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
20146 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
20147 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
20148 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
20149 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
20150 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
20151 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
20152 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
20153 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
20154 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
20155 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
20156 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
20157 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
20158 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
20159 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
20160 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
20161 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
20162 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
20163 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
20164 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
20165 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
20166 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
20167 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
20168 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
20169 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
20170 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
20171 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
20172 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
20173 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
20174 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
20175 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
20176 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
20177 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
20178 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
20179 "\x85\x73\x78\x45\x20\x7f\xae\x13"
20180 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
20181 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
20182 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
20183 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
20184 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
20185 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
20186 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
20187 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
20188 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
20189 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
20190 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
20191 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
20192 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
20193 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
20194 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
20195 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
20196 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
20197 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
20198 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
20199 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
20200 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
20201 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
20202 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
20203 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
20204 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
20205 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
20206 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
20207 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
20208 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
20209 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
20210 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
20211 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
20212 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
20213 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
20214 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
20215 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
20216 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
20217 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
20218 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
20219 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
20220 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
20221 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
20222 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
20223 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
20224 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
20225 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
20226 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
20227 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
20228 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
20229 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
20230 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
20231 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
20232 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
20233 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
20234 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
20235 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
20236 "\xaf\xdf\x11\x95",
20237 .rlen = 4100,
20238 .np = 2,
20239 .tap = { 4064, 36 },
20240 },
20241};
20242
20243/*
20244 * CTS (Cipher Text Stealing) mode tests
20245 */
20246#define CTS_MODE_ENC_TEST_VECTORS 6
20247#define CTS_MODE_DEC_TEST_VECTORS 6
20248static struct cipher_testvec cts_mode_enc_tv_template[] = {
20249 { /* from rfc3962 */
20250 .klen = 16,
20251 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20252 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20253 .ilen = 17,
20254 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20255 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20256 "\x20",
20257 .rlen = 17,
20258 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
20259 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
20260 "\x97",
20261 }, {
20262 .klen = 16,
20263 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20264 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20265 .ilen = 31,
20266 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20267 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20268 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20269 "\x20\x47\x61\x75\x27\x73\x20",
20270 .rlen = 31,
20271 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
20272 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
20273 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20274 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
20275 }, {
20276 .klen = 16,
20277 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20278 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20279 .ilen = 32,
20280 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20281 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20282 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20283 "\x20\x47\x61\x75\x27\x73\x20\x43",
20284 .rlen = 32,
20285 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20286 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
20287 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20288 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
20289 }, {
20290 .klen = 16,
20291 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20292 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20293 .ilen = 47,
20294 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20295 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20296 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20297 "\x20\x47\x61\x75\x27\x73\x20\x43"
20298 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20299 "\x70\x6c\x65\x61\x73\x65\x2c",
20300 .rlen = 47,
20301 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20302 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20303 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
20304 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
20305 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20306 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
20307 }, {
20308 .klen = 16,
20309 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20310 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20311 .ilen = 48,
20312 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20313 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20314 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20315 "\x20\x47\x61\x75\x27\x73\x20\x43"
20316 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20317 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
20318 .rlen = 48,
20319 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20320 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20321 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
20322 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
20323 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20324 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
20325 }, {
20326 .klen = 16,
20327 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20328 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20329 .ilen = 64,
20330 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20331 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20332 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20333 "\x20\x47\x61\x75\x27\x73\x20\x43"
20334 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20335 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
20336 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
20337 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
20338 .rlen = 64,
20339 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20340 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20341 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20342 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
20343 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
20344 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
20345 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
20346 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
20347 }
20348};
20349
20350static struct cipher_testvec cts_mode_dec_tv_template[] = {
20351 { /* from rfc3962 */
20352 .klen = 16,
20353 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20354 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20355 .rlen = 17,
20356 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20357 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20358 "\x20",
20359 .ilen = 17,
20360 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
20361 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
20362 "\x97",
20363 }, {
20364 .klen = 16,
20365 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20366 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20367 .rlen = 31,
20368 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20369 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20370 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20371 "\x20\x47\x61\x75\x27\x73\x20",
20372 .ilen = 31,
20373 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
20374 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
20375 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20376 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
20377 }, {
20378 .klen = 16,
20379 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20380 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20381 .rlen = 32,
20382 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20383 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20384 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20385 "\x20\x47\x61\x75\x27\x73\x20\x43",
20386 .ilen = 32,
20387 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20388 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
20389 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20390 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
20391 }, {
20392 .klen = 16,
20393 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20394 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20395 .rlen = 47,
20396 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20397 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20398 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20399 "\x20\x47\x61\x75\x27\x73\x20\x43"
20400 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20401 "\x70\x6c\x65\x61\x73\x65\x2c",
20402 .ilen = 47,
20403 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20404 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20405 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
20406 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
20407 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20408 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
20409 }, {
20410 .klen = 16,
20411 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20412 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20413 .rlen = 48,
20414 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20415 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20416 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20417 "\x20\x47\x61\x75\x27\x73\x20\x43"
20418 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20419 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
20420 .ilen = 48,
20421 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20422 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20423 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
20424 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
20425 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20426 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
20427 }, {
20428 .klen = 16,
20429 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
20430 "\x74\x65\x72\x69\x79\x61\x6b\x69",
20431 .rlen = 64,
20432 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
20433 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
20434 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
20435 "\x20\x47\x61\x75\x27\x73\x20\x43"
20436 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
20437 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
20438 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
20439 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
20440 .ilen = 64,
20441 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
20442 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
20443 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
20444 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
20445 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
20446 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
20447 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
20448 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
20449 }
20450};
20451
20452/*
20453 * Compression stuff.
20454 */
20455#define COMP_BUF_SIZE 512
20456
20457struct comp_testvec {
20458 int inlen, outlen;
20459 char input[COMP_BUF_SIZE];
20460 char output[COMP_BUF_SIZE];
20461};
20462
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080020463struct pcomp_testvec {
20464 void *params;
20465 unsigned int paramsize;
20466 int inlen, outlen;
20467 char input[COMP_BUF_SIZE];
20468 char output[COMP_BUF_SIZE];
20469};
20470
Herbert Xuda7f0332008-07-31 17:08:25 +080020471/*
20472 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110020473 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080020474 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080020475
Herbert Xuda7f0332008-07-31 17:08:25 +080020476#define DEFLATE_COMP_TEST_VECTORS 2
20477#define DEFLATE_DECOMP_TEST_VECTORS 2
20478
20479static struct comp_testvec deflate_comp_tv_template[] = {
20480 {
20481 .inlen = 70,
20482 .outlen = 38,
20483 .input = "Join us now and share the software "
20484 "Join us now and share the software ",
20485 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
20486 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
20487 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
20488 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
20489 "\x71\xbc\x08\x2b\x01\x00",
20490 }, {
20491 .inlen = 191,
20492 .outlen = 122,
20493 .input = "This document describes a compression method based on the DEFLATE"
20494 "compression algorithm. This document defines the application of "
20495 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
20496 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
20497 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
20498 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
20499 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
20500 "\x68\x12\x51\xae\x76\x67\xd6\x27"
20501 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
20502 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
20503 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
20504 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
20505 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
20506 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
20507 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
20508 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
20509 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
20510 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
20511 "\xfa\x02",
20512 },
20513};
20514
20515static struct comp_testvec deflate_decomp_tv_template[] = {
20516 {
20517 .inlen = 122,
20518 .outlen = 191,
20519 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
20520 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
20521 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
20522 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
20523 "\x68\x12\x51\xae\x76\x67\xd6\x27"
20524 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
20525 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
20526 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
20527 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
20528 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
20529 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
20530 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
20531 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
20532 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
20533 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
20534 "\xfa\x02",
20535 .output = "This document describes a compression method based on the DEFLATE"
20536 "compression algorithm. This document defines the application of "
20537 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
20538 }, {
20539 .inlen = 38,
20540 .outlen = 70,
20541 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
20542 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
20543 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
20544 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
20545 "\x71\xbc\x08\x2b\x01\x00",
20546 .output = "Join us now and share the software "
20547 "Join us now and share the software ",
20548 },
20549};
20550
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080020551#define ZLIB_COMP_TEST_VECTORS 2
20552#define ZLIB_DECOMP_TEST_VECTORS 2
20553
20554static const struct {
20555 struct nlattr nla;
20556 int val;
20557} deflate_comp_params[] = {
20558 {
20559 .nla = {
20560 .nla_len = NLA_HDRLEN + sizeof(int),
20561 .nla_type = ZLIB_COMP_LEVEL,
20562 },
20563 .val = Z_DEFAULT_COMPRESSION,
20564 }, {
20565 .nla = {
20566 .nla_len = NLA_HDRLEN + sizeof(int),
20567 .nla_type = ZLIB_COMP_METHOD,
20568 },
20569 .val = Z_DEFLATED,
20570 }, {
20571 .nla = {
20572 .nla_len = NLA_HDRLEN + sizeof(int),
20573 .nla_type = ZLIB_COMP_WINDOWBITS,
20574 },
20575 .val = -11,
20576 }, {
20577 .nla = {
20578 .nla_len = NLA_HDRLEN + sizeof(int),
20579 .nla_type = ZLIB_COMP_MEMLEVEL,
20580 },
20581 .val = MAX_MEM_LEVEL,
20582 }, {
20583 .nla = {
20584 .nla_len = NLA_HDRLEN + sizeof(int),
20585 .nla_type = ZLIB_COMP_STRATEGY,
20586 },
20587 .val = Z_DEFAULT_STRATEGY,
20588 }
20589};
20590
20591static const struct {
20592 struct nlattr nla;
20593 int val;
20594} deflate_decomp_params[] = {
20595 {
20596 .nla = {
20597 .nla_len = NLA_HDRLEN + sizeof(int),
20598 .nla_type = ZLIB_DECOMP_WINDOWBITS,
20599 },
20600 .val = -11,
20601 }
20602};
20603
20604static struct pcomp_testvec zlib_comp_tv_template[] = {
20605 {
20606 .params = &deflate_comp_params,
20607 .paramsize = sizeof(deflate_comp_params),
20608 .inlen = 70,
20609 .outlen = 38,
20610 .input = "Join us now and share the software "
20611 "Join us now and share the software ",
20612 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
20613 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
20614 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
20615 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
20616 "\x71\xbc\x08\x2b\x01\x00",
20617 }, {
20618 .params = &deflate_comp_params,
20619 .paramsize = sizeof(deflate_comp_params),
20620 .inlen = 191,
20621 .outlen = 122,
20622 .input = "This document describes a compression method based on the DEFLATE"
20623 "compression algorithm. This document defines the application of "
20624 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
20625 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
20626 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
20627 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
20628 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
20629 "\x68\x12\x51\xae\x76\x67\xd6\x27"
20630 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
20631 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
20632 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
20633 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
20634 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
20635 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
20636 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
20637 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
20638 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
20639 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
20640 "\xfa\x02",
20641 },
20642};
20643
20644static struct pcomp_testvec zlib_decomp_tv_template[] = {
20645 {
20646 .params = &deflate_decomp_params,
20647 .paramsize = sizeof(deflate_decomp_params),
20648 .inlen = 122,
20649 .outlen = 191,
20650 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
20651 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
20652 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
20653 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
20654 "\x68\x12\x51\xae\x76\x67\xd6\x27"
20655 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
20656 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
20657 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
20658 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
20659 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
20660 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
20661 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
20662 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
20663 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
20664 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
20665 "\xfa\x02",
20666 .output = "This document describes a compression method based on the DEFLATE"
20667 "compression algorithm. This document defines the application of "
20668 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
20669 }, {
20670 .params = &deflate_decomp_params,
20671 .paramsize = sizeof(deflate_decomp_params),
20672 .inlen = 38,
20673 .outlen = 70,
20674 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
20675 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
20676 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
20677 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
20678 "\x71\xbc\x08\x2b\x01\x00",
20679 .output = "Join us now and share the software "
20680 "Join us now and share the software ",
20681 },
20682};
20683
Herbert Xuda7f0332008-07-31 17:08:25 +080020684/*
20685 * LZO test vectors (null-terminated strings).
20686 */
20687#define LZO_COMP_TEST_VECTORS 2
20688#define LZO_DECOMP_TEST_VECTORS 2
20689
20690static struct comp_testvec lzo_comp_tv_template[] = {
20691 {
20692 .inlen = 70,
20693 .outlen = 46,
20694 .input = "Join us now and share the software "
20695 "Join us now and share the software ",
20696 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
20697 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
20698 "\x64\x20\x73\x68\x61\x72\x65\x20"
20699 "\x74\x68\x65\x20\x73\x6f\x66\x74"
20700 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
20701 "\x3d\x88\x00\x11\x00\x00",
20702 }, {
20703 .inlen = 159,
20704 .outlen = 133,
20705 .input = "This document describes a compression method based on the LZO "
20706 "compression algorithm. This document defines the application of "
20707 "the LZO algorithm used in UBIFS.",
20708 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
20709 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
20710 "\x64\x65\x73\x63\x72\x69\x62\x65"
20711 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
20712 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
20713 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
20714 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
20715 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
20716 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
20717 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
20718 "\x68\x69\x73\x2a\x54\x01\x02\x66"
20719 "\x69\x6e\x65\x73\x94\x06\x05\x61"
20720 "\x70\x70\x6c\x69\x63\x61\x74\x76"
20721 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
20722 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
20723 "\x20\x69\x6e\x20\x55\x42\x49\x46"
20724 "\x53\x2e\x11\x00\x00",
20725 },
20726};
20727
20728static struct comp_testvec lzo_decomp_tv_template[] = {
20729 {
20730 .inlen = 133,
20731 .outlen = 159,
20732 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
20733 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
20734 "\x64\x65\x73\x63\x72\x69\x62\x65"
20735 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
20736 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
20737 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
20738 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
20739 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
20740 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
20741 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
20742 "\x68\x69\x73\x2a\x54\x01\x02\x66"
20743 "\x69\x6e\x65\x73\x94\x06\x05\x61"
20744 "\x70\x70\x6c\x69\x63\x61\x74\x76"
20745 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
20746 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
20747 "\x20\x69\x6e\x20\x55\x42\x49\x46"
20748 "\x53\x2e\x11\x00\x00",
20749 .output = "This document describes a compression method based on the LZO "
20750 "compression algorithm. This document defines the application of "
20751 "the LZO algorithm used in UBIFS.",
20752 }, {
20753 .inlen = 46,
20754 .outlen = 70,
20755 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
20756 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
20757 "\x64\x20\x73\x68\x61\x72\x65\x20"
20758 "\x74\x68\x65\x20\x73\x6f\x66\x74"
20759 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
20760 "\x3d\x88\x00\x11\x00\x00",
20761 .output = "Join us now and share the software "
20762 "Join us now and share the software ",
20763 },
20764};
20765
20766/*
20767 * Michael MIC test vectors from IEEE 802.11i
20768 */
20769#define MICHAEL_MIC_TEST_VECTORS 6
20770
20771static struct hash_testvec michael_mic_tv_template[] = {
20772 {
20773 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20774 .ksize = 8,
20775 .plaintext = zeroed_string,
20776 .psize = 0,
20777 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
20778 },
20779 {
20780 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
20781 .ksize = 8,
20782 .plaintext = "M",
20783 .psize = 1,
20784 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
20785 },
20786 {
20787 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
20788 .ksize = 8,
20789 .plaintext = "Mi",
20790 .psize = 2,
20791 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
20792 },
20793 {
20794 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
20795 .ksize = 8,
20796 .plaintext = "Mic",
20797 .psize = 3,
20798 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
20799 },
20800 {
20801 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
20802 .ksize = 8,
20803 .plaintext = "Mich",
20804 .psize = 4,
20805 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
20806 },
20807 {
20808 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
20809 .ksize = 8,
20810 .plaintext = "Michael",
20811 .psize = 7,
20812 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
20813 }
20814};
20815
20816/*
20817 * CRC32C test vectors
20818 */
20819#define CRC32C_TEST_VECTORS 14
20820
20821static struct hash_testvec crc32c_tv_template[] = {
20822 {
20823 .psize = 0,
20824 .digest = "\x00\x00\x00\x00",
20825 },
20826 {
20827 .key = "\x87\xa9\xcb\xed",
20828 .ksize = 4,
20829 .psize = 0,
20830 .digest = "\x78\x56\x34\x12",
20831 },
20832 {
20833 .key = "\xff\xff\xff\xff",
20834 .ksize = 4,
20835 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20836 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20837 "\x11\x12\x13\x14\x15\x16\x17\x18"
20838 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20839 "\x21\x22\x23\x24\x25\x26\x27\x28",
20840 .psize = 40,
20841 .digest = "\x7f\x15\x2c\x0e",
20842 },
20843 {
20844 .key = "\xff\xff\xff\xff",
20845 .ksize = 4,
20846 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
20847 "\x31\x32\x33\x34\x35\x36\x37\x38"
20848 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
20849 "\x41\x42\x43\x44\x45\x46\x47\x48"
20850 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
20851 .psize = 40,
20852 .digest = "\xf6\xeb\x80\xe9",
20853 },
20854 {
20855 .key = "\xff\xff\xff\xff",
20856 .ksize = 4,
20857 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
20858 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
20859 "\x61\x62\x63\x64\x65\x66\x67\x68"
20860 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
20861 "\x71\x72\x73\x74\x75\x76\x77\x78",
20862 .psize = 40,
20863 .digest = "\xed\xbd\x74\xde",
20864 },
20865 {
20866 .key = "\xff\xff\xff\xff",
20867 .ksize = 4,
20868 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20869 "\x81\x82\x83\x84\x85\x86\x87\x88"
20870 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20871 "\x91\x92\x93\x94\x95\x96\x97\x98"
20872 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
20873 .psize = 40,
20874 .digest = "\x62\xc8\x79\xd5",
20875 },
20876 {
20877 .key = "\xff\xff\xff\xff",
20878 .ksize = 4,
20879 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20880 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20881 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20882 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20883 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
20884 .psize = 40,
20885 .digest = "\xd0\x9a\x97\xba",
20886 },
20887 {
20888 .key = "\xff\xff\xff\xff",
20889 .ksize = 4,
20890 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20891 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20892 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20893 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20894 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20895 .psize = 40,
20896 .digest = "\x13\xd9\x29\x2b",
20897 },
20898 {
20899 .key = "\x80\xea\xd3\xf1",
20900 .ksize = 4,
20901 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
20902 "\x31\x32\x33\x34\x35\x36\x37\x38"
20903 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
20904 "\x41\x42\x43\x44\x45\x46\x47\x48"
20905 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
20906 .psize = 40,
20907 .digest = "\x0c\xb5\xe2\xa2",
20908 },
20909 {
20910 .key = "\xf3\x4a\x1d\x5d",
20911 .ksize = 4,
20912 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
20913 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
20914 "\x61\x62\x63\x64\x65\x66\x67\x68"
20915 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
20916 "\x71\x72\x73\x74\x75\x76\x77\x78",
20917 .psize = 40,
20918 .digest = "\xd1\x7f\xfb\xa6",
20919 },
20920 {
20921 .key = "\x2e\x80\x04\x59",
20922 .ksize = 4,
20923 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20924 "\x81\x82\x83\x84\x85\x86\x87\x88"
20925 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20926 "\x91\x92\x93\x94\x95\x96\x97\x98"
20927 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
20928 .psize = 40,
20929 .digest = "\x59\x33\xe6\x7a",
20930 },
20931 {
20932 .key = "\xa6\xcc\x19\x85",
20933 .ksize = 4,
20934 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20935 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20936 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20937 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20938 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
20939 .psize = 40,
20940 .digest = "\xbe\x03\x01\xd2",
20941 },
20942 {
20943 .key = "\x41\xfc\xfe\x2d",
20944 .ksize = 4,
20945 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20946 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20947 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20948 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20949 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20950 .psize = 40,
20951 .digest = "\x75\xd3\xc5\x24",
20952 },
20953 {
20954 .key = "\xff\xff\xff\xff",
20955 .ksize = 4,
20956 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20957 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20958 "\x11\x12\x13\x14\x15\x16\x17\x18"
20959 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20960 "\x21\x22\x23\x24\x25\x26\x27\x28"
20961 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
20962 "\x31\x32\x33\x34\x35\x36\x37\x38"
20963 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
20964 "\x41\x42\x43\x44\x45\x46\x47\x48"
20965 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
20966 "\x51\x52\x53\x54\x55\x56\x57\x58"
20967 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
20968 "\x61\x62\x63\x64\x65\x66\x67\x68"
20969 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
20970 "\x71\x72\x73\x74\x75\x76\x77\x78"
20971 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20972 "\x81\x82\x83\x84\x85\x86\x87\x88"
20973 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20974 "\x91\x92\x93\x94\x95\x96\x97\x98"
20975 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
20976 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20977 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20978 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20979 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20980 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
20981 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20982 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20983 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20984 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20985 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20986 .psize = 240,
20987 .digest = "\x75\xd3\xc5\x24",
20988 .np = 2,
20989 .tap = { 31, 209 }
20990 },
20991};
20992
Sonic Zhanga482b082012-05-25 17:54:13 +080020993/*
20994 * Blakcifn CRC test vectors
20995 */
20996#define BFIN_CRC_TEST_VECTORS 6
20997
20998static struct hash_testvec bfin_crc_tv_template[] = {
20999 {
21000 .psize = 0,
21001 .digest = "\x00\x00\x00\x00",
21002 },
21003 {
21004 .key = "\x87\xa9\xcb\xed",
21005 .ksize = 4,
21006 .psize = 0,
21007 .digest = "\x87\xa9\xcb\xed",
21008 },
21009 {
21010 .key = "\xff\xff\xff\xff",
21011 .ksize = 4,
21012 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21013 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21014 "\x11\x12\x13\x14\x15\x16\x17\x18"
21015 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21016 "\x21\x22\x23\x24\x25\x26\x27\x28",
21017 .psize = 40,
21018 .digest = "\x84\x0c\x8d\xa2",
21019 },
21020 {
21021 .key = "\xff\xff\xff\xff",
21022 .ksize = 4,
21023 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21024 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21025 "\x11\x12\x13\x14\x15\x16\x17\x18"
21026 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21027 "\x21\x22\x23\x24\x25\x26",
21028 .psize = 38,
21029 .digest = "\x8c\x58\xec\xb7",
21030 },
21031 {
21032 .key = "\xff\xff\xff\xff",
21033 .ksize = 4,
21034 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21035 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21036 "\x11\x12\x13\x14\x15\x16\x17\x18"
21037 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21038 "\x21\x22\x23\x24\x25\x26\x27",
21039 .psize = 39,
21040 .digest = "\xdc\x50\x28\x7b",
21041 },
21042 {
21043 .key = "\xff\xff\xff\xff",
21044 .ksize = 4,
21045 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21046 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21047 "\x11\x12\x13\x14\x15\x16\x17\x18"
21048 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21049 "\x21\x22\x23\x24\x25\x26\x27\x28"
21050 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
21051 "\x31\x32\x33\x34\x35\x36\x37\x38"
21052 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
21053 "\x41\x42\x43\x44\x45\x46\x47\x48"
21054 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
21055 "\x51\x52\x53\x54\x55\x56\x57\x58"
21056 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
21057 "\x61\x62\x63\x64\x65\x66\x67\x68"
21058 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
21059 "\x71\x72\x73\x74\x75\x76\x77\x78"
21060 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
21061 "\x81\x82\x83\x84\x85\x86\x87\x88"
21062 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
21063 "\x91\x92\x93\x94\x95\x96\x97\x98"
21064 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
21065 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
21066 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
21067 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
21068 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
21069 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
21070 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
21071 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
21072 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
21073 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
21074 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
21075 .psize = 240,
21076 .digest = "\x10\x19\x4a\x5c",
21077 .np = 2,
21078 .tap = { 31, 209 }
21079 },
21080
21081};
21082
Herbert Xuda7f0332008-07-31 17:08:25 +080021083#endif /* _CRYPTO_TESTMGR_H */