blob: 09f9131304f9ae9d4ab44d41a916ca9ed3916c94 [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"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002495 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2496 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2497 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2498 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2499 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2500 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2501 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2502 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2503 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2504 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2505 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2506 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2507 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2508 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2509 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2510 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2511 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2512 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2513 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2514 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2515 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2516 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2517 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2518 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2519 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2520 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2521 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2522 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2523 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2524 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2525 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2526 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2527 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2528 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2529 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2530 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2531 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2532 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2533 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2534 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2535 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2536 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2537 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2538 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2539 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2540 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2541 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2542 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2543 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2544 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2545 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2546 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2547 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2548 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2549 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2550 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2551 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2552 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2553 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2554 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002555 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2556 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2557 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2558 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002559 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
2560 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
2561 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
2562 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
2563 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
2564 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
2565 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
2566 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
2567 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
2568 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
2569 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
2570 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
2571 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
2572 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
2573 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
2574 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
2575 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
2576 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
2577 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
2578 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
2579 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
2580 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
2581 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
2582 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
2583 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
2584 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
2585 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
2586 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
2587 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
2588 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
2589 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
2590 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
2591 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
2592 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
2593 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
2594 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
2595 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
2596 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
2597 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
2598 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
2599 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
2600 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
2601 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
2602 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
2603 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
2604 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
2605 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
2606 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
2607 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
2608 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
2609 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
2610 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
2611 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
2612 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
2613 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
2614 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
2615 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
2616 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
2617 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
2618 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002619 .also_non_np = 1,
2620 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002621 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002622 },
2623};
2624
2625static struct cipher_testvec bf_dec_tv_template[] = {
2626 { /* DES test vectors from OpenSSL */
2627 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2628 .klen = 8,
2629 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2630 .ilen = 8,
2631 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2632 .rlen = 8,
2633 }, {
2634 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2635 .klen = 8,
2636 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2637 .ilen = 8,
2638 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2639 .rlen = 8,
2640 }, {
2641 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2642 .klen = 8,
2643 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2644 .ilen = 8,
2645 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2646 .rlen = 8,
2647 }, { /* Vary the keylength... */
2648 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2649 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2650 .klen = 16,
2651 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2652 .ilen = 8,
2653 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2654 .rlen = 8,
2655 }, {
2656 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2657 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2658 "\x00\x11\x22\x33\x44",
2659 .klen = 21,
2660 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2661 .ilen = 8,
2662 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2663 .rlen = 8,
2664 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
2665 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2666 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2667 "\x00\x11\x22\x33\x44\x55\x66\x77"
2668 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2669 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2670 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2671 "\xff\xff\xff\xff\xff\xff\xff\xff",
2672 .klen = 56,
2673 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2674 .ilen = 8,
2675 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2676 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002677 }, { /* Generated with Crypto++ */
2678 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2679 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2680 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2681 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2682 .klen = 32,
2683 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2684 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2685 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2686 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002687 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
2688 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
2689 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
2690 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
2691 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
2692 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
2693 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
2694 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
2695 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
2696 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
2697 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
2698 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
2699 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
2700 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
2701 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
2702 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
2703 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
2704 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
2705 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
2706 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
2707 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
2708 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
2709 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
2710 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
2711 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
2712 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
2713 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
2714 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
2715 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
2716 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
2717 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
2718 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
2719 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
2720 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
2721 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
2722 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
2723 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
2724 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
2725 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
2726 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
2727 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
2728 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
2729 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
2730 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
2731 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
2732 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
2733 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
2734 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
2735 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
2736 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
2737 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
2738 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
2739 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
2740 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
2741 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
2742 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
2743 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
2744 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
2745 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
2746 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002747 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2748 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2749 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2750 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002751 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2752 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2753 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2754 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2755 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2756 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2757 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2758 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2759 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2760 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2761 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2762 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2763 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2764 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2765 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2766 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2767 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2768 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2769 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2770 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2771 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2772 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2773 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2774 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2775 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2776 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2777 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2778 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2779 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2780 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2781 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2782 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2783 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2784 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2785 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2786 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2787 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2788 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2789 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2790 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2791 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2792 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2793 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2794 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2795 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2796 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2797 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2798 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2799 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2800 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2801 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2802 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2803 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2804 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2805 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2806 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2807 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2808 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2809 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2810 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002811 .also_non_np = 1,
2812 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002813 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002814 },
2815};
2816
2817static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2818 { /* From OpenSSL */
2819 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2820 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2821 .klen = 16,
2822 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2823 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2824 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2825 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2826 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2827 .ilen = 32,
2828 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2829 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2830 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2831 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2832 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002833 }, { /* Generated with Crypto++ */
2834 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2835 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2836 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2837 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2838 .klen = 32,
2839 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2840 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2841 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2842 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2843 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002844 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2845 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2846 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2847 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2848 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2849 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2850 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2851 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2852 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2853 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2854 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2855 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2856 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2857 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2858 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2859 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2860 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2861 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2862 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2863 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2864 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2865 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2866 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2867 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2868 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2869 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2870 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2871 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2872 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2873 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2874 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2875 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2876 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2877 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2878 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2879 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2880 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2881 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2882 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2883 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2884 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2885 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2886 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2887 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2888 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2889 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2890 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2891 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2892 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2893 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2894 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2895 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2896 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2897 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2898 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2899 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2900 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2901 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2902 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2903 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002904 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2905 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2906 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2907 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002908 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
2909 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
2910 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
2911 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
2912 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
2913 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
2914 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
2915 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
2916 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
2917 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
2918 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
2919 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
2920 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
2921 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
2922 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
2923 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
2924 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
2925 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
2926 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
2927 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
2928 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
2929 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
2930 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
2931 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
2932 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
2933 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
2934 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
2935 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
2936 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
2937 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
2938 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
2939 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
2940 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
2941 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
2942 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
2943 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
2944 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
2945 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
2946 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
2947 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
2948 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
2949 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
2950 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
2951 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
2952 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
2953 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
2954 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
2955 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
2956 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
2957 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
2958 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
2959 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
2960 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
2961 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
2962 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
2963 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
2964 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
2965 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
2966 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
2967 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03002968 .also_non_np = 1,
2969 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03002970 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002971 },
2972};
2973
2974static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2975 { /* From OpenSSL */
2976 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2977 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2978 .klen = 16,
2979 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2980 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2981 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2982 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2983 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2984 .ilen = 32,
2985 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2986 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2987 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2988 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2989 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03002990 }, { /* Generated with Crypto++ */
2991 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2992 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2993 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2994 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2995 .klen = 32,
2996 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2997 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2998 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2999 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
3000 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003001 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
3002 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
3003 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
3004 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
3005 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
3006 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
3007 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
3008 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
3009 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
3010 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
3011 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
3012 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
3013 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
3014 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
3015 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
3016 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
3017 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
3018 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
3019 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
3020 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
3021 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
3022 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
3023 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
3024 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
3025 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
3026 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
3027 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
3028 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
3029 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
3030 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
3031 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
3032 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
3033 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
3034 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
3035 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
3036 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
3037 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
3038 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
3039 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
3040 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
3041 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
3042 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
3043 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
3044 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
3045 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
3046 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
3047 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
3048 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
3049 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
3050 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
3051 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
3052 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
3053 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
3054 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
3055 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
3056 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
3057 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
3058 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
3059 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
3060 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003061 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3062 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3063 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3064 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003065 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3066 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3067 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3068 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3069 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3070 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3071 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3072 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3073 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3074 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3075 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3076 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3077 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3078 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3079 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3080 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3081 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3082 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3083 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3084 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3085 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3086 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3087 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3088 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3089 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3090 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3091 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3092 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3093 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3094 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3095 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3096 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3097 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3098 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3099 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3100 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3101 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3102 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3103 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3104 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3105 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3106 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3107 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3108 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3109 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3110 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3111 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3112 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3113 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3114 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3115 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3116 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3117 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3118 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3119 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3120 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3121 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3122 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3123 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3124 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003125 .also_non_np = 1,
3126 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003127 .tap = { 504 - 8, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003128 },
3129};
3130
3131static struct cipher_testvec bf_ctr_enc_tv_template[] = {
3132 { /* Generated with Crypto++ */
3133 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3134 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3135 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3136 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3137 .klen = 32,
3138 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
3139 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3140 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3141 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3142 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003143 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3144 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3145 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3146 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3147 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3148 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3149 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3150 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3151 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3152 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3153 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3154 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3155 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3156 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3157 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3158 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3159 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3160 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3161 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3162 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3163 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3164 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3165 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3166 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3167 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3168 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3169 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3170 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3171 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3172 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3173 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3174 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3175 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3176 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3177 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3178 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3179 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3180 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3181 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3182 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3183 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3184 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3185 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3186 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3187 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3188 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3189 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3190 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3191 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3192 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3193 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3194 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3195 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3196 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3197 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3198 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3199 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3200 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3201 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3202 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003203 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
3204 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
3205 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
3206 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003207 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
3208 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
3209 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
3210 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
3211 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
3212 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
3213 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
3214 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
3215 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
3216 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
3217 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
3218 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
3219 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
3220 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
3221 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
3222 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
3223 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
3224 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
3225 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
3226 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
3227 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
3228 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
3229 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
3230 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
3231 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
3232 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
3233 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
3234 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
3235 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
3236 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
3237 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
3238 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
3239 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
3240 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
3241 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
3242 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
3243 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
3244 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
3245 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
3246 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
3247 "\x82\x63\x11\xB3\x54\x49\x00\x08"
3248 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
3249 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
3250 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
3251 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
3252 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
3253 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
3254 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
3255 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
3256 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
3257 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
3258 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
3259 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
3260 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
3261 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
3262 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
3263 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
3264 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
3265 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
3266 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003267 }, { /* Generated with Crypto++ */
3268 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3269 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3270 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3271 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3272 .klen = 32,
3273 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
3274 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3275 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3276 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3277 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3278 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003279 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3280 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3281 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3282 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3283 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3284 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3285 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3286 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3287 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3288 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3289 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3290 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3291 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3292 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3293 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3294 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3295 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3296 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3297 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3298 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3299 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3300 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3301 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3302 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3303 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3304 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3305 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3306 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3307 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3308 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3309 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3310 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3311 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3312 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3313 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3314 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3315 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3316 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3317 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3318 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3319 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3320 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3321 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3322 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3323 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3324 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3325 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3326 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3327 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3328 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3329 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3330 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3331 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3332 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3333 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3334 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3335 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3336 "\x2B\xC2\x59\xF0\x64\xFB\x92",
3337 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003338 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
3339 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
3340 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
3341 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
3342 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003343 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
3344 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
3345 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
3346 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
3347 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
3348 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
3349 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
3350 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
3351 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
3352 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
3353 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
3354 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
3355 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
3356 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
3357 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
3358 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
3359 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
3360 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
3361 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
3362 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
3363 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
3364 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
3365 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
3366 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
3367 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
3368 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
3369 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
3370 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
3371 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
3372 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
3373 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
3374 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
3375 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
3376 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
3377 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
3378 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
3379 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
3380 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
3381 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
3382 "\x82\x63\x11\xB3\x54\x49\x00\x08"
3383 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
3384 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
3385 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
3386 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
3387 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
3388 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
3389 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
3390 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
3391 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
3392 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
3393 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
3394 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
3395 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
3396 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
3397 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
3398 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
3399 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
3400 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
3401 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003402 .also_non_np = 1,
3403 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003404 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03003405 }, { /* Generated with Crypto++ */
3406 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3407 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3408 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3409 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3410 .klen = 32,
3411 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3412 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3413 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3414 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3415 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3416 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3417 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3418 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3419 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3420 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3421 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3422 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3423 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3424 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3425 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3426 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3427 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3428 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3429 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3430 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3431 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3432 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3433 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3434 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3435 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3436 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3437 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3438 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3439 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3440 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3441 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3442 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3443 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3444 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3445 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3446 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3447 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3448 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3449 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3450 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3451 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3452 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3453 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3454 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3455 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3456 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3457 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3458 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3459 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3460 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3461 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3462 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3463 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3464 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3465 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3466 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3467 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3468 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3469 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3470 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3471 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3472 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3473 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3474 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3475 .ilen = 504,
3476 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
3477 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
3478 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
3479 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
3480 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
3481 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
3482 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
3483 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
3484 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
3485 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
3486 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
3487 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
3488 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
3489 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
3490 "\x0B\x82\x59\x14\x26\x67\x08\x09"
3491 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
3492 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
3493 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
3494 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
3495 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
3496 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
3497 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
3498 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
3499 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
3500 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
3501 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
3502 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
3503 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
3504 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
3505 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
3506 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
3507 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
3508 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
3509 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
3510 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
3511 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
3512 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
3513 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
3514 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
3515 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
3516 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
3517 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
3518 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
3519 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
3520 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
3521 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
3522 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
3523 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
3524 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
3525 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
3526 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
3527 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
3528 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
3529 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
3530 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
3531 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
3532 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
3533 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
3534 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
3535 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
3536 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
3537 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
3538 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
3539 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003540 },
3541};
3542
3543static struct cipher_testvec bf_ctr_dec_tv_template[] = {
3544 { /* Generated with Crypto++ */
3545 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3546 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3547 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3548 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3549 .klen = 32,
3550 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
3551 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
3552 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
3553 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
3554 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003555 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
3556 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
3557 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
3558 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
3559 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
3560 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
3561 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
3562 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
3563 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
3564 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
3565 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
3566 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
3567 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
3568 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
3569 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
3570 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
3571 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
3572 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
3573 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
3574 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
3575 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
3576 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
3577 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
3578 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
3579 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
3580 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
3581 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
3582 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
3583 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
3584 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
3585 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
3586 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
3587 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
3588 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
3589 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
3590 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
3591 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
3592 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
3593 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
3594 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
3595 "\x82\x63\x11\xB3\x54\x49\x00\x08"
3596 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
3597 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
3598 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
3599 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
3600 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
3601 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
3602 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
3603 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
3604 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
3605 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
3606 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
3607 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
3608 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
3609 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
3610 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
3611 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
3612 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
3613 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
3614 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003615 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3616 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3617 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3618 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003619 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3620 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3621 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3622 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3623 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3624 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3625 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3626 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3627 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3628 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3629 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3630 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3631 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3632 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3633 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3634 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3635 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3636 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3637 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3638 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3639 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3640 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3641 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3642 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3643 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3644 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3645 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3646 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3647 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3648 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3649 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3650 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3651 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3652 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3653 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3654 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3655 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3656 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3657 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3658 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3659 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3660 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3661 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3662 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3663 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3664 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3665 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3666 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3667 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3668 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3669 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3670 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3671 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3672 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3673 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3674 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3675 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3676 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3677 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3678 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003679 }, { /* Generated with Crypto++ */
3680 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3681 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3682 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3683 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3684 .klen = 32,
3685 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
3686 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
3687 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
3688 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
3689 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
3690 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003691 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
3692 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
3693 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
3694 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
3695 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
3696 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
3697 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
3698 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
3699 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
3700 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
3701 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
3702 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
3703 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
3704 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
3705 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
3706 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
3707 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
3708 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
3709 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
3710 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
3711 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
3712 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
3713 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
3714 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
3715 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
3716 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
3717 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
3718 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
3719 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
3720 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
3721 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
3722 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
3723 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
3724 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
3725 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
3726 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
3727 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
3728 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
3729 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
3730 "\x82\x63\x11\xB3\x54\x49\x00\x08"
3731 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
3732 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
3733 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
3734 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
3735 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
3736 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
3737 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
3738 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
3739 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
3740 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
3741 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
3742 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
3743 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
3744 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
3745 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
3746 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
3747 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
3748 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
3749 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03003750 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3751 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3752 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3753 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3754 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003755 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3756 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3757 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3758 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3759 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3760 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3761 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3762 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3763 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3764 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3765 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3766 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3767 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3768 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3769 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3770 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3771 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3772 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3773 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3774 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3775 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3776 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3777 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3778 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3779 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3780 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3781 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3782 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3783 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3784 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3785 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3786 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3787 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3788 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3789 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3790 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3791 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3792 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3793 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3794 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3795 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3796 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3797 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3798 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3799 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3800 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3801 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3802 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3803 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3804 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3805 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3806 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3807 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3808 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3809 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3810 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3811 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3812 "\x2B\xC2\x59\xF0\x64\xFB\x92",
3813 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03003814 .also_non_np = 1,
3815 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03003816 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03003817 }, { /* Generated with Crypto++ */
3818 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3819 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3820 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3821 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3822 .klen = 32,
3823 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3824 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
3825 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
3826 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
3827 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
3828 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
3829 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
3830 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
3831 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
3832 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
3833 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
3834 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
3835 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
3836 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
3837 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
3838 "\x0B\x82\x59\x14\x26\x67\x08\x09"
3839 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
3840 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
3841 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
3842 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
3843 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
3844 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
3845 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
3846 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
3847 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
3848 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
3849 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
3850 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
3851 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
3852 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
3853 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
3854 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
3855 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
3856 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
3857 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
3858 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
3859 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
3860 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
3861 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
3862 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
3863 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
3864 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
3865 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
3866 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
3867 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
3868 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
3869 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
3870 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
3871 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
3872 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
3873 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
3874 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
3875 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
3876 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
3877 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
3878 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
3879 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
3880 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
3881 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
3882 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
3883 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
3884 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
3885 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
3886 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
3887 .ilen = 504,
3888 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3889 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3890 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3891 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3892 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3893 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3894 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3895 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3896 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3897 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3898 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3899 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3900 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3901 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3902 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3903 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3904 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3905 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3906 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3907 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3908 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3909 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3910 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3911 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3912 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3913 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3914 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3915 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3916 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3917 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3918 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3919 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3920 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3921 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3922 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3923 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3924 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3925 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3926 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3927 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3928 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3929 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3930 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3931 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3932 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3933 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3934 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3935 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3936 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3937 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3938 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3939 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3940 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3941 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3942 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3943 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3944 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3945 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3946 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3947 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3948 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3949 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
3950 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
3951 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08003952 },
3953};
3954
3955/*
3956 * Twofish test vectors.
3957 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03003958#define TF_ENC_TEST_VECTORS 4
3959#define TF_DEC_TEST_VECTORS 4
3960#define TF_CBC_ENC_TEST_VECTORS 5
3961#define TF_CBC_DEC_TEST_VECTORS 5
3962#define TF_CTR_ENC_TEST_VECTORS 2
3963#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03003964#define TF_LRW_ENC_TEST_VECTORS 8
3965#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03003966#define TF_XTS_ENC_TEST_VECTORS 5
3967#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08003968
3969static struct cipher_testvec tf_enc_tv_template[] = {
3970 {
3971 .key = zeroed_string,
3972 .klen = 16,
3973 .input = zeroed_string,
3974 .ilen = 16,
3975 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3976 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3977 .rlen = 16,
3978 }, {
3979 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3980 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3981 "\x00\x11\x22\x33\x44\x55\x66\x77",
3982 .klen = 24,
3983 .input = zeroed_string,
3984 .ilen = 16,
3985 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
3986 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
3987 .rlen = 16,
3988 }, {
3989 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3990 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3991 "\x00\x11\x22\x33\x44\x55\x66\x77"
3992 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
3993 .klen = 32,
3994 .input = zeroed_string,
3995 .ilen = 16,
3996 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
3997 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
3998 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03003999 }, { /* Generated with Crypto++ */
4000 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
4001 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
4002 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
4003 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
4004 .klen = 32,
4005 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4006 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4007 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4008 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4009 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4010 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4011 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004012 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4013 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4014 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4015 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4016 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4017 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4018 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4019 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4020 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4021 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4022 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4023 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4024 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4025 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4026 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4027 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4028 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4029 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4030 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4031 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4032 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4033 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4034 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4035 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4036 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4037 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4038 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4039 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4040 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4041 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4042 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4043 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4044 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4045 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4046 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4047 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4048 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4049 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4050 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4051 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4052 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4053 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4054 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4055 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4056 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4057 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4058 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4059 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4060 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4061 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4062 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4063 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4064 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4065 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4066 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4067 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004068 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
4069 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
4070 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
4071 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
4072 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
4073 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
4074 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004075 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
4076 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
4077 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
4078 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
4079 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
4080 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
4081 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
4082 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
4083 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
4084 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
4085 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
4086 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
4087 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
4088 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
4089 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
4090 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
4091 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
4092 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
4093 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
4094 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
4095 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
4096 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
4097 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
4098 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
4099 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
4100 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
4101 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
4102 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
4103 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
4104 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
4105 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
4106 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
4107 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
4108 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
4109 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
4110 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
4111 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
4112 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
4113 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
4114 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
4115 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
4116 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
4117 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
4118 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
4119 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
4120 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
4121 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
4122 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
4123 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
4124 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
4125 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
4126 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
4127 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
4128 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
4129 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
4130 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004131 .also_non_np = 1,
4132 .np = 2,
4133 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004134 },
4135};
4136
4137static struct cipher_testvec tf_dec_tv_template[] = {
4138 {
4139 .key = zeroed_string,
4140 .klen = 16,
4141 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4142 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
4143 .ilen = 16,
4144 .result = zeroed_string,
4145 .rlen = 16,
4146 }, {
4147 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4148 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
4149 "\x00\x11\x22\x33\x44\x55\x66\x77",
4150 .klen = 24,
4151 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
4152 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
4153 .ilen = 16,
4154 .result = zeroed_string,
4155 .rlen = 16,
4156 }, {
4157 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4158 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
4159 "\x00\x11\x22\x33\x44\x55\x66\x77"
4160 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
4161 .klen = 32,
4162 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
4163 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
4164 .ilen = 16,
4165 .result = zeroed_string,
4166 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004167 }, { /* Generated with Crypto++ */
4168 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
4169 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
4170 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
4171 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
4172 .klen = 32,
4173 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
4174 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
4175 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
4176 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
4177 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
4178 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
4179 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004180 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
4181 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
4182 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
4183 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
4184 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
4185 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
4186 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
4187 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
4188 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
4189 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
4190 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
4191 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
4192 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
4193 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
4194 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
4195 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
4196 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
4197 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
4198 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
4199 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
4200 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
4201 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
4202 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
4203 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
4204 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
4205 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
4206 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
4207 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
4208 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
4209 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
4210 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
4211 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
4212 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
4213 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
4214 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
4215 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
4216 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
4217 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
4218 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
4219 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
4220 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
4221 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
4222 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
4223 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
4224 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
4225 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
4226 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
4227 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
4228 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
4229 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
4230 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
4231 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
4232 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
4233 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
4234 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
4235 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004236 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4237 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4238 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4239 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4240 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4241 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4242 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004243 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4244 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4245 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4246 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4247 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4248 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4249 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4250 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4251 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4252 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4253 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4254 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4255 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4256 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4257 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4258 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4259 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4260 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4261 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4262 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4263 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4264 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4265 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4266 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4267 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4268 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4269 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4270 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4271 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4272 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4273 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4274 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4275 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4276 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4277 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4278 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4279 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4280 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4281 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4282 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4283 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4284 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4285 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4286 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4287 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4288 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4289 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4290 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4291 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4292 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4293 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4294 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4295 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4296 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4297 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4298 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004299 .also_non_np = 1,
4300 .np = 2,
4301 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004302 },
4303};
4304
4305static struct cipher_testvec tf_cbc_enc_tv_template[] = {
4306 { /* Generated with Nettle */
4307 .key = zeroed_string,
4308 .klen = 16,
4309 .iv = zeroed_string,
4310 .input = zeroed_string,
4311 .ilen = 16,
4312 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4313 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
4314 .rlen = 16,
4315 }, {
4316 .key = zeroed_string,
4317 .klen = 16,
4318 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4319 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
4320 .input = zeroed_string,
4321 .ilen = 16,
4322 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4323 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
4324 .rlen = 16,
4325 }, {
4326 .key = zeroed_string,
4327 .klen = 16,
4328 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4329 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
4330 .input = zeroed_string,
4331 .ilen = 16,
4332 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
4333 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
4334 .rlen = 16,
4335 }, {
4336 .key = zeroed_string,
4337 .klen = 16,
4338 .iv = zeroed_string,
4339 .input = zeroed_string,
4340 .ilen = 48,
4341 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4342 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
4343 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4344 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
4345 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
4346 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
4347 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004348 }, { /* Generated with Crypto++ */
4349 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4350 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4351 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4352 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4353 .klen = 32,
4354 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4355 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4356 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4357 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4358 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4359 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4360 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4361 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4362 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004363 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4364 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4365 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4366 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4367 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4368 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4369 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4370 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4371 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4372 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4373 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4374 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4375 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4376 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4377 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4378 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4379 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4380 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4381 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4382 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4383 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4384 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4385 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4386 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4387 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4388 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4389 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4390 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4391 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4392 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4393 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4394 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4395 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4396 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4397 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4398 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4399 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4400 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4401 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4402 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4403 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4404 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4405 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4406 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4407 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4408 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4409 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4410 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4411 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4412 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4413 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4414 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4415 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4416 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4417 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4418 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004419 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
4420 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
4421 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
4422 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
4423 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
4424 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
4425 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004426 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
4427 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
4428 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
4429 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
4430 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
4431 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
4432 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
4433 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
4434 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
4435 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
4436 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
4437 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
4438 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
4439 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
4440 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
4441 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
4442 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
4443 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
4444 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
4445 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
4446 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
4447 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
4448 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
4449 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
4450 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
4451 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
4452 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
4453 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
4454 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
4455 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
4456 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
4457 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
4458 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
4459 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
4460 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
4461 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
4462 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
4463 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
4464 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
4465 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
4466 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
4467 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
4468 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
4469 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
4470 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
4471 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
4472 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
4473 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
4474 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
4475 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
4476 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
4477 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
4478 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
4479 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
4480 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
4481 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004482 .also_non_np = 1,
4483 .np = 2,
4484 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004485 },
4486};
4487
4488static struct cipher_testvec tf_cbc_dec_tv_template[] = {
4489 { /* Reverse of the first four above */
4490 .key = zeroed_string,
4491 .klen = 16,
4492 .iv = zeroed_string,
4493 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4494 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
4495 .ilen = 16,
4496 .result = zeroed_string,
4497 .rlen = 16,
4498 }, {
4499 .key = zeroed_string,
4500 .klen = 16,
4501 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4502 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
4503 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4504 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
4505 .ilen = 16,
4506 .result = zeroed_string,
4507 .rlen = 16,
4508 }, {
4509 .key = zeroed_string,
4510 .klen = 16,
4511 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4512 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
4513 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
4514 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
4515 .ilen = 16,
4516 .result = zeroed_string,
4517 .rlen = 16,
4518 }, {
4519 .key = zeroed_string,
4520 .klen = 16,
4521 .iv = zeroed_string,
4522 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
4523 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
4524 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
4525 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
4526 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
4527 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
4528 .ilen = 48,
4529 .result = zeroed_string,
4530 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004531 }, { /* Generated with Crypto++ */
4532 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4533 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4534 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4535 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4536 .klen = 32,
4537 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4538 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4539 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
4540 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
4541 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
4542 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
4543 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
4544 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
4545 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004546 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
4547 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
4548 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
4549 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
4550 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
4551 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
4552 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
4553 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
4554 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
4555 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
4556 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
4557 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
4558 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
4559 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
4560 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
4561 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
4562 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
4563 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
4564 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
4565 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
4566 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
4567 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
4568 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
4569 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
4570 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
4571 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
4572 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
4573 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
4574 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
4575 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
4576 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
4577 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
4578 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
4579 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
4580 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
4581 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
4582 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
4583 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
4584 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
4585 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
4586 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
4587 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
4588 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
4589 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
4590 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
4591 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
4592 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
4593 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
4594 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
4595 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
4596 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
4597 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
4598 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
4599 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
4600 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
4601 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004602 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4603 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4604 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4605 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4606 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4607 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4608 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004609 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4610 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4611 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4612 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4613 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4614 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4615 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4616 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4617 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4618 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4619 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4620 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4621 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4622 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4623 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4624 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4625 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4626 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4627 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4628 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4629 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4630 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4631 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4632 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4633 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4634 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4635 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4636 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4637 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4638 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4639 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4640 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4641 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4642 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4643 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4644 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4645 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4646 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4647 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4648 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4649 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4650 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4651 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4652 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4653 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4654 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4655 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4656 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4657 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4658 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4659 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4660 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4661 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4662 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4663 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4664 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004665 .also_non_np = 1,
4666 .np = 2,
4667 .tap = { 496 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03004668 },
4669};
4670
4671static struct cipher_testvec tf_ctr_enc_tv_template[] = {
4672 { /* Generated with Crypto++ */
4673 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4674 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4675 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4676 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4677 .klen = 32,
4678 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4679 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4680 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4681 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4682 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4683 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4684 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4685 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4686 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004687 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4688 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4689 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4690 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4691 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4692 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4693 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4694 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4695 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4696 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4697 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4698 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4699 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4700 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4701 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4702 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4703 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4704 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4705 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4706 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4707 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4708 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4709 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4710 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4711 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4712 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4713 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4714 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4715 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4716 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4717 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4718 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4719 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4720 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4721 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4722 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4723 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4724 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4725 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4726 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4727 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4728 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4729 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4730 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4731 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4732 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4733 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4734 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4735 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4736 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4737 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4738 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4739 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4740 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4741 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4742 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004743 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4744 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4745 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4746 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4747 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4748 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4749 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004750 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4751 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4752 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4753 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4754 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4755 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4756 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4757 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4758 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4759 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4760 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4761 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4762 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4763 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4764 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4765 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4766 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4767 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4768 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4769 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4770 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4771 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4772 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4773 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4774 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4775 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4776 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4777 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4778 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4779 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4780 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4781 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4782 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4783 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4784 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4785 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4786 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4787 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4788 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4789 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4790 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4791 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4792 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4793 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4794 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4795 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4796 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4797 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4798 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4799 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4800 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4801 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4802 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4803 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4804 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
4805 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004806 }, { /* Generated with Crypto++ */
4807 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4808 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4809 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4810 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4811 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03004812 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4813 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4814 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4815 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4816 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4817 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4818 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4819 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4820 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4821 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4822 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4823 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4824 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4825 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4826 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4827 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4828 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4829 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4830 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4831 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4832 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4833 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4834 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4835 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4836 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4837 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4838 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4839 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4840 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4841 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4842 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4843 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4844 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4845 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4846 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4847 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4848 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4849 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4850 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4851 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4852 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4853 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4854 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4855 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4856 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4857 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4858 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4859 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4860 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4861 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4862 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4863 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4864 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4865 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4866 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4867 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4868 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4869 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4870 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4871 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4872 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4873 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4874 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4875 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4876 .ilen = 496,
4877 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
4878 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
4879 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
4880 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
4881 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
4882 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
4883 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
4884 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
4885 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
4886 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
4887 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
4888 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
4889 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
4890 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
4891 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
4892 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
4893 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
4894 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
4895 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
4896 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
4897 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
4898 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
4899 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
4900 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
4901 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
4902 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
4903 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
4904 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
4905 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
4906 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
4907 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
4908 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
4909 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
4910 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
4911 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
4912 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
4913 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
4914 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
4915 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
4916 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
4917 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
4918 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
4919 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
4920 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
4921 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
4922 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
4923 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
4924 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
4925 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
4926 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
4927 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
4928 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
4929 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
4930 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
4931 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
4932 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
4933 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
4934 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
4935 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
4936 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
4937 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
4938 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
4939 .rlen = 496,
4940 }, { /* Generated with Crypto++ */
4941 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4942 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4943 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4944 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4945 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03004946 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4947 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4948 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4949 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4950 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4951 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4952 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4953 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4954 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4955 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02004956 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4957 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4958 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4959 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4960 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4961 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4962 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4963 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4964 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4965 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4966 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4967 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4968 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4969 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4970 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4971 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4972 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4973 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4974 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4975 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4976 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4977 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4978 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4979 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4980 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4981 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4982 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4983 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4984 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4985 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4986 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4987 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4988 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4989 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4990 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4991 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4992 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4993 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4994 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4995 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4996 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4997 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4998 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4999 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5000 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5001 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5002 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5003 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5004 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5005 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5006 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5007 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5008 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5009 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5010 "\x2B\xC2\x59",
5011 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005012 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
5013 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
5014 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
5015 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
5016 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
5017 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
5018 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
5019 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005020 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
5021 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
5022 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
5023 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
5024 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
5025 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
5026 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
5027 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
5028 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
5029 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
5030 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
5031 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
5032 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
5033 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
5034 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
5035 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
5036 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
5037 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
5038 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
5039 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
5040 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
5041 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
5042 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
5043 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
5044 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
5045 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
5046 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
5047 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
5048 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
5049 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
5050 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
5051 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
5052 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
5053 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
5054 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
5055 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
5056 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
5057 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
5058 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
5059 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
5060 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
5061 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
5062 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
5063 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
5064 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
5065 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
5066 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
5067 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
5068 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
5069 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
5070 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
5071 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
5072 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
5073 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
5074 "\x6C\x82\x9D",
5075 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005076 .also_non_np = 1,
5077 .np = 2,
5078 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03005079 },
5080};
5081
5082static struct cipher_testvec tf_ctr_dec_tv_template[] = {
5083 { /* Generated with Crypto++ */
5084 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5085 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5086 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5087 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5088 .klen = 32,
5089 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5090 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5091 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
5092 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
5093 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
5094 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
5095 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
5096 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
5097 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005098 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
5099 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
5100 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
5101 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
5102 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
5103 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
5104 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
5105 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
5106 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
5107 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
5108 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
5109 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
5110 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
5111 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
5112 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
5113 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
5114 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
5115 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
5116 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
5117 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
5118 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
5119 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
5120 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
5121 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
5122 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
5123 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
5124 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
5125 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
5126 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
5127 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
5128 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
5129 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
5130 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
5131 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
5132 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
5133 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
5134 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
5135 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
5136 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
5137 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
5138 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
5139 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
5140 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
5141 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
5142 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
5143 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
5144 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
5145 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
5146 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
5147 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
5148 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
5149 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
5150 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
5151 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
5152 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
5153 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005154 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5155 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5156 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5157 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5158 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5159 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5160 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005161 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5162 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5163 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5164 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5165 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5166 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5167 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5168 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5169 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5170 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5171 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5172 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5173 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5174 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5175 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5176 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5177 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5178 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5179 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5180 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5181 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5182 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5183 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5184 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5185 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5186 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5187 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5188 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5189 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5190 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5191 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5192 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5193 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5194 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5195 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5196 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5197 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5198 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5199 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5200 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5201 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5202 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5203 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5204 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5205 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5206 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5207 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5208 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5209 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5210 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5211 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5212 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5213 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5214 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5215 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
5216 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005217 }, { /* Generated with Crypto++ */
5218 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5219 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5220 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5221 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5222 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03005223 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5224 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5225 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
5226 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
5227 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
5228 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
5229 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
5230 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
5231 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
5232 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
5233 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
5234 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
5235 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
5236 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
5237 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
5238 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
5239 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
5240 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
5241 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
5242 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
5243 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
5244 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
5245 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
5246 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
5247 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
5248 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
5249 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
5250 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
5251 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
5252 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
5253 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
5254 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
5255 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
5256 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
5257 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
5258 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
5259 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
5260 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
5261 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
5262 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
5263 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
5264 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
5265 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
5266 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
5267 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
5268 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
5269 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
5270 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
5271 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
5272 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
5273 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
5274 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
5275 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
5276 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
5277 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
5278 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
5279 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
5280 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
5281 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
5282 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
5283 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
5284 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
5285 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
5286 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
5287 .ilen = 496,
5288 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5289 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5290 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5291 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5292 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5293 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5294 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5295 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5296 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5297 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5298 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5299 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5300 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5301 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5302 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5303 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5304 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5305 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5306 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5307 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5308 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5309 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5310 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5311 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5312 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5313 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5314 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5315 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5316 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5317 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5318 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5319 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5320 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5321 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5322 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5323 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5324 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5325 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5326 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5327 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5328 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5329 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5330 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5331 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5332 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5333 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5334 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5335 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5336 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5337 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5338 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5339 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5340 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5341 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5342 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5343 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5344 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5345 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5346 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5347 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5348 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5349 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
5350 .rlen = 496,
5351 }, { /* Generated with Crypto++ */
5352 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5353 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5354 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5355 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5356 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005357 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
5358 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
5359 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
5360 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
5361 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
5362 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
5363 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
5364 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
5365 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
5366 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005367 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
5368 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
5369 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
5370 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
5371 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
5372 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
5373 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
5374 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
5375 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
5376 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
5377 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
5378 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
5379 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
5380 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
5381 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
5382 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
5383 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
5384 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
5385 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
5386 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
5387 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
5388 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
5389 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
5390 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
5391 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
5392 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
5393 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
5394 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
5395 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
5396 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
5397 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
5398 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
5399 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
5400 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
5401 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
5402 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
5403 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
5404 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
5405 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
5406 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
5407 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
5408 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
5409 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
5410 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
5411 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
5412 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
5413 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
5414 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
5415 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
5416 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
5417 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
5418 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
5419 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
5420 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
5421 "\x6C\x82\x9D",
5422 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005423 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5424 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5425 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5426 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5427 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5428 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5429 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5430 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005431 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5432 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5433 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5434 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5435 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5436 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5437 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5438 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5439 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5440 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5441 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5442 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5443 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5444 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5445 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5446 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5447 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5448 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5449 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5450 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5451 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5452 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5453 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5454 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5455 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5456 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5457 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5458 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5459 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5460 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5461 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5462 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5463 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5464 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5465 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5466 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5467 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5468 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5469 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5470 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5471 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5472 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5473 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5474 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5475 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5476 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5477 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5478 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5479 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5480 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5481 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5482 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5483 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5484 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5485 "\x2B\xC2\x59",
5486 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005487 .also_non_np = 1,
5488 .np = 2,
5489 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005490 },
5491};
5492
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005493static struct cipher_testvec tf_lrw_enc_tv_template[] = {
5494 /* Generated from AES-LRW test vectors */
5495 {
5496 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5497 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5498 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5499 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5500 .klen = 32,
5501 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5502 "\x00\x00\x00\x00\x00\x00\x00\x01",
5503 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5504 "\x38\x39\x41\x42\x43\x44\x45\x46",
5505 .ilen = 16,
5506 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
5507 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
5508 .rlen = 16,
5509 }, {
5510 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5511 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5512 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5513 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5514 .klen = 32,
5515 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5516 "\x00\x00\x00\x00\x00\x00\x00\x02",
5517 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5518 "\x38\x39\x41\x42\x43\x44\x45\x46",
5519 .ilen = 16,
5520 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
5521 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
5522 .rlen = 16,
5523 }, {
5524 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5525 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5526 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5527 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5528 .klen = 32,
5529 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5530 "\x00\x00\x00\x02\x00\x00\x00\x00",
5531 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5532 "\x38\x39\x41\x42\x43\x44\x45\x46",
5533 .ilen = 16,
5534 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
5535 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
5536 .rlen = 16,
5537 }, {
5538 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5539 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5540 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5541 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5542 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5543 .klen = 40,
5544 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5545 "\x00\x00\x00\x00\x00\x00\x00\x01",
5546 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5547 "\x38\x39\x41\x42\x43\x44\x45\x46",
5548 .ilen = 16,
5549 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
5550 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
5551 .rlen = 16,
5552 }, {
5553 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
5554 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
5555 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
5556 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
5557 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
5558 .klen = 40,
5559 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5560 "\x00\x00\x00\x02\x00\x00\x00\x00",
5561 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5562 "\x38\x39\x41\x42\x43\x44\x45\x46",
5563 .ilen = 16,
5564 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
5565 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
5566 .rlen = 16,
5567 }, {
5568 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5569 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5570 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5571 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5572 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5573 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5574 .klen = 48,
5575 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5576 "\x00\x00\x00\x00\x00\x00\x00\x01",
5577 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5578 "\x38\x39\x41\x42\x43\x44\x45\x46",
5579 .ilen = 16,
5580 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
5581 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
5582 .rlen = 16,
5583 }, {
5584 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
5585 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
5586 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
5587 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
5588 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
5589 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
5590 .klen = 48,
5591 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5592 "\x00\x00\x00\x02\x00\x00\x00\x00",
5593 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
5594 "\x38\x39\x41\x42\x43\x44\x45\x46",
5595 .ilen = 16,
5596 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
5597 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
5598 .rlen = 16,
5599 }, {
5600 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5601 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5602 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5603 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5604 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5605 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5606 .klen = 48,
5607 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5608 "\x00\x00\x00\x00\x00\x00\x00\x01",
5609 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5610 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5611 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5612 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5613 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5614 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5615 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5616 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5617 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5618 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5619 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5620 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5621 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5622 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5623 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5624 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5625 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5626 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5627 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5628 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5629 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5630 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5631 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5632 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5633 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5634 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5635 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5636 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5637 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5638 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5639 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5640 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5641 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5642 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5643 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5644 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5645 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5646 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5647 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5648 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5649 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5650 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5651 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5652 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5653 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5654 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5655 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5656 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5657 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5658 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5659 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5660 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5661 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5662 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5663 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5664 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5665 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5666 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5667 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5668 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5669 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5670 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5671 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5672 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5673 .ilen = 512,
5674 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
5675 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
5676 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
5677 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
5678 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
5679 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
5680 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
5681 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
5682 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
5683 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
5684 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
5685 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
5686 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
5687 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
5688 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
5689 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
5690 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
5691 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
5692 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
5693 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
5694 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
5695 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
5696 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
5697 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
5698 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
5699 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
5700 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
5701 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
5702 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
5703 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
5704 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
5705 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
5706 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
5707 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
5708 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
5709 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
5710 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
5711 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
5712 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
5713 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
5714 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
5715 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
5716 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
5717 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
5718 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
5719 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
5720 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
5721 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
5722 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
5723 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
5724 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
5725 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
5726 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
5727 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
5728 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
5729 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
5730 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
5731 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
5732 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
5733 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
5734 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
5735 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
5736 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
5737 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
5738 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005739 .also_non_np = 1,
5740 .np = 2,
5741 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005742 },
5743};
5744
5745static struct cipher_testvec tf_lrw_dec_tv_template[] = {
5746 /* Generated from AES-LRW test vectors */
5747 /* same as enc vectors with input and result reversed */
5748 {
5749 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5750 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5751 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5752 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5753 .klen = 32,
5754 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5755 "\x00\x00\x00\x00\x00\x00\x00\x01",
5756 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
5757 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
5758 .ilen = 16,
5759 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5760 "\x38\x39\x41\x42\x43\x44\x45\x46",
5761 .rlen = 16,
5762 }, {
5763 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5764 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5765 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5766 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5767 .klen = 32,
5768 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5769 "\x00\x00\x00\x00\x00\x00\x00\x02",
5770 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
5771 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
5772 .ilen = 16,
5773 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5774 "\x38\x39\x41\x42\x43\x44\x45\x46",
5775 .rlen = 16,
5776 }, {
5777 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5778 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5779 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5780 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5781 .klen = 32,
5782 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5783 "\x00\x00\x00\x02\x00\x00\x00\x00",
5784 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
5785 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
5786 .ilen = 16,
5787 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5788 "\x38\x39\x41\x42\x43\x44\x45\x46",
5789 .rlen = 16,
5790 }, {
5791 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5792 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5793 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5794 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5795 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5796 .klen = 40,
5797 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5798 "\x00\x00\x00\x00\x00\x00\x00\x01",
5799 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
5800 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
5801 .ilen = 16,
5802 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5803 "\x38\x39\x41\x42\x43\x44\x45\x46",
5804 .rlen = 16,
5805 }, {
5806 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
5807 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
5808 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
5809 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
5810 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
5811 .klen = 40,
5812 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5813 "\x00\x00\x00\x02\x00\x00\x00\x00",
5814 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
5815 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
5816 .ilen = 16,
5817 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5818 "\x38\x39\x41\x42\x43\x44\x45\x46",
5819 .rlen = 16,
5820 }, {
5821 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5822 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5823 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5824 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5825 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5826 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5827 .klen = 48,
5828 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5829 "\x00\x00\x00\x00\x00\x00\x00\x01",
5830 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
5831 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
5832 .ilen = 16,
5833 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5834 "\x38\x39\x41\x42\x43\x44\x45\x46",
5835 .rlen = 16,
5836 }, {
5837 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
5838 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
5839 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
5840 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
5841 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
5842 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
5843 .klen = 48,
5844 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5845 "\x00\x00\x00\x02\x00\x00\x00\x00",
5846 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
5847 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
5848 .ilen = 16,
5849 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5850 "\x38\x39\x41\x42\x43\x44\x45\x46",
5851 .rlen = 16,
5852 }, {
5853 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5854 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5855 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5856 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5857 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5858 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5859 .klen = 48,
5860 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5861 "\x00\x00\x00\x00\x00\x00\x00\x01",
5862 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
5863 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
5864 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
5865 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
5866 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
5867 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
5868 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
5869 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
5870 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
5871 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
5872 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
5873 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
5874 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
5875 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
5876 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
5877 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
5878 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
5879 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
5880 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
5881 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
5882 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
5883 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
5884 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
5885 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
5886 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
5887 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
5888 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
5889 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
5890 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
5891 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
5892 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
5893 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
5894 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
5895 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
5896 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
5897 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
5898 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
5899 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
5900 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
5901 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
5902 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
5903 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
5904 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
5905 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
5906 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
5907 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
5908 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
5909 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
5910 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
5911 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
5912 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
5913 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
5914 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
5915 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
5916 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
5917 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
5918 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
5919 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
5920 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
5921 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
5922 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
5923 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
5924 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
5925 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
5926 .ilen = 512,
5927 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5928 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5929 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5930 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5931 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5932 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5933 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5934 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5935 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5936 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5937 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5938 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5939 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5940 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5941 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5942 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5943 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5944 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5945 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5946 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5947 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5948 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5949 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5950 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5951 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5952 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5953 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5954 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5955 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5956 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5957 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5958 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5959 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5960 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5961 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5962 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5963 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5964 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5965 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5966 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5967 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5968 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5969 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5970 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5971 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5972 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5973 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5974 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5975 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5976 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5977 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5978 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5979 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5980 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5981 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5982 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5983 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5984 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5985 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5986 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5987 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5988 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5989 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5990 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5991 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005992 .also_non_np = 1,
5993 .np = 2,
5994 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005995 },
5996};
5997
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005998static struct cipher_testvec tf_xts_enc_tv_template[] = {
5999 /* Generated from AES-XTS test vectors */
6000{
6001 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6002 "\x00\x00\x00\x00\x00\x00\x00\x00"
6003 "\x00\x00\x00\x00\x00\x00\x00\x00"
6004 "\x00\x00\x00\x00\x00\x00\x00\x00",
6005 .klen = 32,
6006 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6007 "\x00\x00\x00\x00\x00\x00\x00\x00",
6008 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6009 "\x00\x00\x00\x00\x00\x00\x00\x00"
6010 "\x00\x00\x00\x00\x00\x00\x00\x00"
6011 "\x00\x00\x00\x00\x00\x00\x00\x00",
6012 .ilen = 32,
6013 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
6014 "\x30\x74\xe4\x44\x52\x77\x97\x43"
6015 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
6016 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
6017 .rlen = 32,
6018 }, {
6019 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6020 "\x11\x11\x11\x11\x11\x11\x11\x11"
6021 "\x22\x22\x22\x22\x22\x22\x22\x22"
6022 "\x22\x22\x22\x22\x22\x22\x22\x22",
6023 .klen = 32,
6024 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6025 "\x00\x00\x00\x00\x00\x00\x00\x00",
6026 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6027 "\x44\x44\x44\x44\x44\x44\x44\x44"
6028 "\x44\x44\x44\x44\x44\x44\x44\x44"
6029 "\x44\x44\x44\x44\x44\x44\x44\x44",
6030 .ilen = 32,
6031 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
6032 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
6033 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
6034 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
6035 .rlen = 32,
6036 }, {
6037 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6038 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6039 "\x22\x22\x22\x22\x22\x22\x22\x22"
6040 "\x22\x22\x22\x22\x22\x22\x22\x22",
6041 .klen = 32,
6042 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6043 "\x00\x00\x00\x00\x00\x00\x00\x00",
6044 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
6045 "\x44\x44\x44\x44\x44\x44\x44\x44"
6046 "\x44\x44\x44\x44\x44\x44\x44\x44"
6047 "\x44\x44\x44\x44\x44\x44\x44\x44",
6048 .ilen = 32,
6049 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
6050 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
6051 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
6052 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
6053 .rlen = 32,
6054 }, {
6055 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6056 "\x23\x53\x60\x28\x74\x71\x35\x26"
6057 "\x31\x41\x59\x26\x53\x58\x97\x93"
6058 "\x23\x84\x62\x64\x33\x83\x27\x95",
6059 .klen = 32,
6060 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6061 "\x00\x00\x00\x00\x00\x00\x00\x00",
6062 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6063 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6064 "\x10\x11\x12\x13\x14\x15\x16\x17"
6065 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6066 "\x20\x21\x22\x23\x24\x25\x26\x27"
6067 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6068 "\x30\x31\x32\x33\x34\x35\x36\x37"
6069 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6070 "\x40\x41\x42\x43\x44\x45\x46\x47"
6071 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6072 "\x50\x51\x52\x53\x54\x55\x56\x57"
6073 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6074 "\x60\x61\x62\x63\x64\x65\x66\x67"
6075 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6076 "\x70\x71\x72\x73\x74\x75\x76\x77"
6077 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6078 "\x80\x81\x82\x83\x84\x85\x86\x87"
6079 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6080 "\x90\x91\x92\x93\x94\x95\x96\x97"
6081 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6082 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6083 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6084 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6085 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6086 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6087 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6088 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6089 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6090 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6091 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6092 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6093 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6094 "\x00\x01\x02\x03\x04\x05\x06\x07"
6095 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6096 "\x10\x11\x12\x13\x14\x15\x16\x17"
6097 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6098 "\x20\x21\x22\x23\x24\x25\x26\x27"
6099 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6100 "\x30\x31\x32\x33\x34\x35\x36\x37"
6101 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6102 "\x40\x41\x42\x43\x44\x45\x46\x47"
6103 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6104 "\x50\x51\x52\x53\x54\x55\x56\x57"
6105 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6106 "\x60\x61\x62\x63\x64\x65\x66\x67"
6107 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6108 "\x70\x71\x72\x73\x74\x75\x76\x77"
6109 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6110 "\x80\x81\x82\x83\x84\x85\x86\x87"
6111 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6112 "\x90\x91\x92\x93\x94\x95\x96\x97"
6113 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6114 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6115 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6116 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6117 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6118 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6119 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6120 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6121 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6122 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6123 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6124 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6125 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6126 .ilen = 512,
6127 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
6128 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
6129 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
6130 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
6131 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
6132 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
6133 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
6134 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
6135 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
6136 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
6137 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
6138 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
6139 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
6140 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
6141 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
6142 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
6143 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
6144 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
6145 "\x39\x80\x39\x09\x97\x65\xf2\x83"
6146 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
6147 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
6148 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
6149 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
6150 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
6151 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
6152 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
6153 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
6154 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
6155 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
6156 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
6157 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
6158 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
6159 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
6160 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
6161 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
6162 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
6163 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
6164 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
6165 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
6166 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
6167 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
6168 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
6169 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
6170 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
6171 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
6172 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
6173 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
6174 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
6175 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
6176 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
6177 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
6178 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
6179 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
6180 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
6181 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
6182 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
6183 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
6184 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
6185 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
6186 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
6187 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
6188 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
6189 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
6190 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
6191 .rlen = 512,
6192 }, {
6193 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6194 "\x23\x53\x60\x28\x74\x71\x35\x26"
6195 "\x62\x49\x77\x57\x24\x70\x93\x69"
6196 "\x99\x59\x57\x49\x66\x96\x76\x27"
6197 "\x31\x41\x59\x26\x53\x58\x97\x93"
6198 "\x23\x84\x62\x64\x33\x83\x27\x95"
6199 "\x02\x88\x41\x97\x16\x93\x99\x37"
6200 "\x51\x05\x82\x09\x74\x94\x45\x92",
6201 .klen = 64,
6202 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6203 "\x00\x00\x00\x00\x00\x00\x00\x00",
6204 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6205 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6206 "\x10\x11\x12\x13\x14\x15\x16\x17"
6207 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6208 "\x20\x21\x22\x23\x24\x25\x26\x27"
6209 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6210 "\x30\x31\x32\x33\x34\x35\x36\x37"
6211 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6212 "\x40\x41\x42\x43\x44\x45\x46\x47"
6213 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6214 "\x50\x51\x52\x53\x54\x55\x56\x57"
6215 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6216 "\x60\x61\x62\x63\x64\x65\x66\x67"
6217 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6218 "\x70\x71\x72\x73\x74\x75\x76\x77"
6219 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6220 "\x80\x81\x82\x83\x84\x85\x86\x87"
6221 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6222 "\x90\x91\x92\x93\x94\x95\x96\x97"
6223 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6224 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6225 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6226 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6227 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6228 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6229 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6230 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6231 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6232 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6233 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6234 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6235 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6236 "\x00\x01\x02\x03\x04\x05\x06\x07"
6237 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6238 "\x10\x11\x12\x13\x14\x15\x16\x17"
6239 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6240 "\x20\x21\x22\x23\x24\x25\x26\x27"
6241 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6242 "\x30\x31\x32\x33\x34\x35\x36\x37"
6243 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6244 "\x40\x41\x42\x43\x44\x45\x46\x47"
6245 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6246 "\x50\x51\x52\x53\x54\x55\x56\x57"
6247 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6248 "\x60\x61\x62\x63\x64\x65\x66\x67"
6249 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6250 "\x70\x71\x72\x73\x74\x75\x76\x77"
6251 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6252 "\x80\x81\x82\x83\x84\x85\x86\x87"
6253 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6254 "\x90\x91\x92\x93\x94\x95\x96\x97"
6255 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6256 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6257 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6258 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6259 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6260 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6261 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6262 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6263 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6264 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6265 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6266 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6267 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6268 .ilen = 512,
6269 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
6270 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
6271 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
6272 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
6273 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
6274 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
6275 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
6276 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
6277 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
6278 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
6279 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
6280 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
6281 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
6282 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
6283 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
6284 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
6285 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
6286 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
6287 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
6288 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
6289 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
6290 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
6291 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
6292 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
6293 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
6294 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
6295 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
6296 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
6297 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
6298 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
6299 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
6300 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
6301 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
6302 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
6303 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
6304 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
6305 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
6306 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
6307 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
6308 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
6309 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
6310 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
6311 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
6312 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
6313 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
6314 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
6315 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
6316 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
6317 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
6318 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
6319 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
6320 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
6321 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
6322 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
6323 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
6324 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
6325 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
6326 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
6327 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
6328 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
6329 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
6330 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
6331 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
6332 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
6333 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006334 .also_non_np = 1,
6335 .np = 2,
6336 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03006337 },
6338};
6339
6340static struct cipher_testvec tf_xts_dec_tv_template[] = {
6341 /* Generated from AES-XTS test vectors */
6342 /* same as enc vectors with input and result reversed */
6343 {
6344 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6345 "\x00\x00\x00\x00\x00\x00\x00\x00"
6346 "\x00\x00\x00\x00\x00\x00\x00\x00"
6347 "\x00\x00\x00\x00\x00\x00\x00\x00",
6348 .klen = 32,
6349 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6350 "\x00\x00\x00\x00\x00\x00\x00\x00",
6351 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
6352 "\x30\x74\xe4\x44\x52\x77\x97\x43"
6353 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
6354 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
6355 .ilen = 32,
6356 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
6357 "\x00\x00\x00\x00\x00\x00\x00\x00"
6358 "\x00\x00\x00\x00\x00\x00\x00\x00"
6359 "\x00\x00\x00\x00\x00\x00\x00\x00",
6360 .rlen = 32,
6361 }, {
6362 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
6363 "\x11\x11\x11\x11\x11\x11\x11\x11"
6364 "\x22\x22\x22\x22\x22\x22\x22\x22"
6365 "\x22\x22\x22\x22\x22\x22\x22\x22",
6366 .klen = 32,
6367 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6368 "\x00\x00\x00\x00\x00\x00\x00\x00",
6369 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
6370 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
6371 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
6372 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
6373 .ilen = 32,
6374 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6375 "\x44\x44\x44\x44\x44\x44\x44\x44"
6376 "\x44\x44\x44\x44\x44\x44\x44\x44"
6377 "\x44\x44\x44\x44\x44\x44\x44\x44",
6378 .rlen = 32,
6379 }, {
6380 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6381 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6382 "\x22\x22\x22\x22\x22\x22\x22\x22"
6383 "\x22\x22\x22\x22\x22\x22\x22\x22",
6384 .klen = 32,
6385 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
6386 "\x00\x00\x00\x00\x00\x00\x00\x00",
6387 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
6388 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
6389 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
6390 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
6391 .ilen = 32,
6392 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
6393 "\x44\x44\x44\x44\x44\x44\x44\x44"
6394 "\x44\x44\x44\x44\x44\x44\x44\x44"
6395 "\x44\x44\x44\x44\x44\x44\x44\x44",
6396 .rlen = 32,
6397 }, {
6398 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6399 "\x23\x53\x60\x28\x74\x71\x35\x26"
6400 "\x31\x41\x59\x26\x53\x58\x97\x93"
6401 "\x23\x84\x62\x64\x33\x83\x27\x95",
6402 .klen = 32,
6403 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6404 "\x00\x00\x00\x00\x00\x00\x00\x00",
6405 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
6406 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
6407 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
6408 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
6409 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
6410 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
6411 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
6412 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
6413 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
6414 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
6415 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
6416 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
6417 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
6418 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
6419 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
6420 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
6421 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
6422 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
6423 "\x39\x80\x39\x09\x97\x65\xf2\x83"
6424 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
6425 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
6426 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
6427 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
6428 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
6429 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
6430 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
6431 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
6432 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
6433 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
6434 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
6435 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
6436 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
6437 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
6438 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
6439 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
6440 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
6441 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
6442 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
6443 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
6444 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
6445 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
6446 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
6447 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
6448 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
6449 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
6450 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
6451 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
6452 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
6453 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
6454 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
6455 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
6456 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
6457 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
6458 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
6459 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
6460 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
6461 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
6462 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
6463 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
6464 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
6465 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
6466 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
6467 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
6468 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
6469 .ilen = 512,
6470 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6471 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6472 "\x10\x11\x12\x13\x14\x15\x16\x17"
6473 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6474 "\x20\x21\x22\x23\x24\x25\x26\x27"
6475 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6476 "\x30\x31\x32\x33\x34\x35\x36\x37"
6477 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6478 "\x40\x41\x42\x43\x44\x45\x46\x47"
6479 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6480 "\x50\x51\x52\x53\x54\x55\x56\x57"
6481 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6482 "\x60\x61\x62\x63\x64\x65\x66\x67"
6483 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6484 "\x70\x71\x72\x73\x74\x75\x76\x77"
6485 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6486 "\x80\x81\x82\x83\x84\x85\x86\x87"
6487 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6488 "\x90\x91\x92\x93\x94\x95\x96\x97"
6489 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6490 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6491 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6492 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6493 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6494 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6495 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6496 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6497 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6498 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6499 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6500 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6501 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6502 "\x00\x01\x02\x03\x04\x05\x06\x07"
6503 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6504 "\x10\x11\x12\x13\x14\x15\x16\x17"
6505 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6506 "\x20\x21\x22\x23\x24\x25\x26\x27"
6507 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6508 "\x30\x31\x32\x33\x34\x35\x36\x37"
6509 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6510 "\x40\x41\x42\x43\x44\x45\x46\x47"
6511 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6512 "\x50\x51\x52\x53\x54\x55\x56\x57"
6513 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6514 "\x60\x61\x62\x63\x64\x65\x66\x67"
6515 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6516 "\x70\x71\x72\x73\x74\x75\x76\x77"
6517 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6518 "\x80\x81\x82\x83\x84\x85\x86\x87"
6519 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6520 "\x90\x91\x92\x93\x94\x95\x96\x97"
6521 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6522 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6523 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6524 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6525 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6526 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6527 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6528 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6529 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6530 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6531 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6532 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6533 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6534 .rlen = 512,
6535 }, {
6536 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
6537 "\x23\x53\x60\x28\x74\x71\x35\x26"
6538 "\x62\x49\x77\x57\x24\x70\x93\x69"
6539 "\x99\x59\x57\x49\x66\x96\x76\x27"
6540 "\x31\x41\x59\x26\x53\x58\x97\x93"
6541 "\x23\x84\x62\x64\x33\x83\x27\x95"
6542 "\x02\x88\x41\x97\x16\x93\x99\x37"
6543 "\x51\x05\x82\x09\x74\x94\x45\x92",
6544 .klen = 64,
6545 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
6546 "\x00\x00\x00\x00\x00\x00\x00\x00",
6547 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
6548 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
6549 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
6550 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
6551 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
6552 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
6553 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
6554 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
6555 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
6556 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
6557 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
6558 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
6559 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
6560 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
6561 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
6562 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
6563 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
6564 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
6565 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
6566 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
6567 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
6568 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
6569 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
6570 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
6571 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
6572 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
6573 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
6574 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
6575 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
6576 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
6577 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
6578 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
6579 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
6580 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
6581 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
6582 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
6583 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
6584 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
6585 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
6586 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
6587 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
6588 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
6589 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
6590 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
6591 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
6592 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
6593 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
6594 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
6595 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
6596 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
6597 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
6598 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
6599 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
6600 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
6601 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
6602 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
6603 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
6604 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
6605 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
6606 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
6607 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
6608 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
6609 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
6610 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
6611 .ilen = 512,
6612 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6613 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6614 "\x10\x11\x12\x13\x14\x15\x16\x17"
6615 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6616 "\x20\x21\x22\x23\x24\x25\x26\x27"
6617 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6618 "\x30\x31\x32\x33\x34\x35\x36\x37"
6619 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6620 "\x40\x41\x42\x43\x44\x45\x46\x47"
6621 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6622 "\x50\x51\x52\x53\x54\x55\x56\x57"
6623 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6624 "\x60\x61\x62\x63\x64\x65\x66\x67"
6625 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6626 "\x70\x71\x72\x73\x74\x75\x76\x77"
6627 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6628 "\x80\x81\x82\x83\x84\x85\x86\x87"
6629 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6630 "\x90\x91\x92\x93\x94\x95\x96\x97"
6631 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6632 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6633 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6634 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6635 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6636 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6637 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6638 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6639 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6640 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6641 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6642 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6643 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6644 "\x00\x01\x02\x03\x04\x05\x06\x07"
6645 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6646 "\x10\x11\x12\x13\x14\x15\x16\x17"
6647 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6648 "\x20\x21\x22\x23\x24\x25\x26\x27"
6649 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6650 "\x30\x31\x32\x33\x34\x35\x36\x37"
6651 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6652 "\x40\x41\x42\x43\x44\x45\x46\x47"
6653 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6654 "\x50\x51\x52\x53\x54\x55\x56\x57"
6655 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6656 "\x60\x61\x62\x63\x64\x65\x66\x67"
6657 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6658 "\x70\x71\x72\x73\x74\x75\x76\x77"
6659 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6660 "\x80\x81\x82\x83\x84\x85\x86\x87"
6661 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6662 "\x90\x91\x92\x93\x94\x95\x96\x97"
6663 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6664 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6665 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6666 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6667 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6668 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6669 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6670 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6671 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6672 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6673 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6674 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6675 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6676 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006677 .also_non_np = 1,
6678 .np = 2,
6679 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03006680 },
6681};
6682
Herbert Xuda7f0332008-07-31 17:08:25 +08006683/*
6684 * Serpent test vectors. These are backwards because Serpent writes
6685 * octet sequences in right-to-left mode.
6686 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006687#define SERPENT_ENC_TEST_VECTORS 5
6688#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08006689
6690#define TNEPRES_ENC_TEST_VECTORS 4
6691#define TNEPRES_DEC_TEST_VECTORS 4
6692
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006693#define SERPENT_CBC_ENC_TEST_VECTORS 1
6694#define SERPENT_CBC_DEC_TEST_VECTORS 1
6695
6696#define SERPENT_CTR_ENC_TEST_VECTORS 2
6697#define SERPENT_CTR_DEC_TEST_VECTORS 2
6698
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03006699#define SERPENT_LRW_ENC_TEST_VECTORS 8
6700#define SERPENT_LRW_DEC_TEST_VECTORS 8
6701
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03006702#define SERPENT_XTS_ENC_TEST_VECTORS 5
6703#define SERPENT_XTS_DEC_TEST_VECTORS 5
6704
Herbert Xuda7f0332008-07-31 17:08:25 +08006705static struct cipher_testvec serpent_enc_tv_template[] = {
6706 {
6707 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6708 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6709 .ilen = 16,
6710 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
6711 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
6712 .rlen = 16,
6713 }, {
6714 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6715 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6716 .klen = 16,
6717 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6718 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6719 .ilen = 16,
6720 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
6721 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
6722 .rlen = 16,
6723 }, {
6724 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6725 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6726 "\x10\x11\x12\x13\x14\x15\x16\x17"
6727 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6728 .klen = 32,
6729 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6730 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6731 .ilen = 16,
6732 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
6733 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
6734 .rlen = 16,
6735 }, {
6736 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
6737 .klen = 16,
6738 .input = zeroed_string,
6739 .ilen = 16,
6740 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
6741 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
6742 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006743 }, { /* Generated with Crypto++ */
6744 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6745 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6746 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6747 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6748 .klen = 32,
6749 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6750 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6751 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6752 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6753 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6754 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6755 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6756 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6757 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6758 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6759 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6760 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6761 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6762 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6763 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6764 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6765 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6766 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6767 .ilen = 144,
6768 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
6769 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
6770 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
6771 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
6772 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
6773 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
6774 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
6775 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
6776 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
6777 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
6778 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
6779 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
6780 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
6781 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
6782 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
6783 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
6784 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
6785 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
6786 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006787 .also_non_np = 1,
6788 .np = 2,
6789 .tap = { 144 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006790 },
6791};
6792
6793static struct cipher_testvec tnepres_enc_tv_template[] = {
6794 { /* KeySize=128, PT=0, I=1 */
6795 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6796 "\x00\x00\x00\x00\x00\x00\x00\x00",
6797 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
6798 "\x00\x00\x00\x00\x00\x00\x00\x00",
6799 .klen = 16,
6800 .ilen = 16,
6801 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
6802 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
6803 .rlen = 16,
6804 }, { /* KeySize=192, PT=0, I=1 */
6805 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
6806 "\x00\x00\x00\x00\x00\x00\x00\x00"
6807 "\x00\x00\x00\x00\x00\x00\x00\x00",
6808 .klen = 24,
6809 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6810 "\x00\x00\x00\x00\x00\x00\x00\x00",
6811 .ilen = 16,
6812 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
6813 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
6814 .rlen = 16,
6815 }, { /* KeySize=256, PT=0, I=1 */
6816 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
6817 "\x00\x00\x00\x00\x00\x00\x00\x00"
6818 "\x00\x00\x00\x00\x00\x00\x00\x00"
6819 "\x00\x00\x00\x00\x00\x00\x00\x00",
6820 .klen = 32,
6821 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6822 "\x00\x00\x00\x00\x00\x00\x00\x00",
6823 .ilen = 16,
6824 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
6825 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
6826 .rlen = 16,
6827 }, { /* KeySize=256, I=257 */
6828 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
6829 "\x17\x16\x15\x14\x13\x12\x11\x10"
6830 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
6831 "\x07\x06\x05\x04\x03\x02\x01\x00",
6832 .klen = 32,
6833 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
6834 "\x07\x06\x05\x04\x03\x02\x01\x00",
6835 .ilen = 16,
6836 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
6837 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
6838 .rlen = 16,
6839 },
6840};
6841
6842
6843static struct cipher_testvec serpent_dec_tv_template[] = {
6844 {
6845 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
6846 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
6847 .ilen = 16,
6848 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6849 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6850 .rlen = 16,
6851 }, {
6852 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6853 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6854 .klen = 16,
6855 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
6856 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
6857 .ilen = 16,
6858 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6859 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6860 .rlen = 16,
6861 }, {
6862 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6863 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6864 "\x10\x11\x12\x13\x14\x15\x16\x17"
6865 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6866 .klen = 32,
6867 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
6868 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
6869 .ilen = 16,
6870 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6871 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6872 .rlen = 16,
6873 }, {
6874 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
6875 .klen = 16,
6876 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
6877 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
6878 .ilen = 16,
6879 .result = zeroed_string,
6880 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006881 }, { /* Generated with Crypto++ */
6882 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6883 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6884 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6885 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6886 .klen = 32,
6887 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
6888 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
6889 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
6890 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
6891 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
6892 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
6893 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
6894 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
6895 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
6896 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
6897 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
6898 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
6899 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
6900 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
6901 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
6902 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
6903 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
6904 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
6905 .ilen = 144,
6906 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6907 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6908 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6909 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6910 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6911 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6912 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6913 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6914 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6915 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6916 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6917 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6918 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6919 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6920 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6921 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6922 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6923 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6924 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006925 .also_non_np = 1,
6926 .np = 2,
6927 .tap = { 144 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006928 },
6929};
6930
6931static struct cipher_testvec tnepres_dec_tv_template[] = {
6932 {
6933 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
6934 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
6935 .ilen = 16,
6936 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6937 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6938 .rlen = 16,
6939 }, {
6940 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6941 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6942 .klen = 16,
6943 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
6944 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
6945 .ilen = 16,
6946 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6947 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6948 .rlen = 16,
6949 }, {
6950 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6952 "\x10\x11\x12\x13\x14\x15\x16\x17"
6953 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6954 .klen = 32,
6955 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
6956 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
6957 .ilen = 16,
6958 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6959 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6960 .rlen = 16,
6961 }, { /* KeySize=128, I=121 */
6962 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
6963 .klen = 16,
6964 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
6965 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
6966 .ilen = 16,
6967 .result = zeroed_string,
6968 .rlen = 16,
6969 },
6970};
6971
Jussi Kivilinna9d259172011-10-18 00:02:53 +03006972static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
6973 { /* Generated with Crypto++ */
6974 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6975 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6976 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6977 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6978 .klen = 32,
6979 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6980 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6981 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6982 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6983 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6984 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6985 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6986 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6987 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6988 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6989 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6990 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6991 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6992 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6993 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6994 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6995 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6996 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6997 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6998 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6999 .ilen = 144,
7000 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
7001 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
7002 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
7003 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
7004 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
7005 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
7006 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
7007 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
7008 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
7009 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
7010 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
7011 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
7012 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
7013 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
7014 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
7015 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
7016 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
7017 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
7018 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007019 .also_non_np = 1,
7020 .np = 2,
7021 .tap = { 144 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03007022 },
7023};
7024
7025static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
7026 { /* Generated with Crypto++ */
7027 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7028 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7029 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7030 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7031 .klen = 32,
7032 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7033 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7034 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
7035 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
7036 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
7037 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
7038 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
7039 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
7040 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
7041 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
7042 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
7043 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
7044 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
7045 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
7046 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
7047 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
7048 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
7049 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
7050 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
7051 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
7052 .ilen = 144,
7053 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7054 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7055 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7056 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7057 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7058 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7059 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7060 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7061 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7062 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7063 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7064 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7065 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7066 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7067 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7068 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7069 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7070 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
7071 .rlen = 144,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007072 .also_non_np = 1,
7073 .np = 2,
7074 .tap = { 144 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03007075 },
7076};
7077
7078static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
7079 { /* Generated with Crypto++ */
7080 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7081 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7082 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7083 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7084 .klen = 32,
7085 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7086 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7087 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7088 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7089 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7090 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7091 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7092 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7093 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7094 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7095 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7096 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7097 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7098 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7099 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7100 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7101 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7102 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7103 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7104 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
7105 .ilen = 144,
7106 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
7107 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
7108 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
7109 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
7110 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
7111 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
7112 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
7113 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
7114 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
7115 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
7116 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
7117 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
7118 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
7119 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
7120 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
7121 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
7122 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
7123 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
7124 .rlen = 144,
7125 }, { /* Generated with Crypto++ */
7126 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7127 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7128 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7129 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7130 .klen = 32,
7131 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7132 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7133 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7134 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7135 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7136 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7137 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7138 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7139 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7140 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7141 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7142 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7143 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7144 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7145 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7146 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7147 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7148 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7149 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7150 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7151 "\xF1\x65\xFC",
7152 .ilen = 147,
7153 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
7154 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
7155 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
7156 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
7157 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
7158 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
7159 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
7160 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
7161 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
7162 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
7163 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
7164 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
7165 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
7166 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
7167 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
7168 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
7169 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
7170 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
7171 "\xE6\xD0\x97",
7172 .rlen = 147,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007173 .also_non_np = 1,
7174 .np = 2,
7175 .tap = { 147 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007176 }, { /* Generated with Crypto++ */
7177 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7178 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7179 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7180 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7181 .klen = 32,
7182 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7183 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7184 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7185 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7186 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7187 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7188 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7189 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7190 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7191 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7192 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7193 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7194 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7195 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7196 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7197 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7198 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7199 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7200 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7201 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7202 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7203 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7204 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7205 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7206 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7207 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7208 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7209 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7210 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7211 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7212 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7213 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7214 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7215 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7216 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7217 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7218 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7219 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7220 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7221 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7222 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7223 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7224 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7225 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7226 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7227 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7228 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7229 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7230 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7231 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7232 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7233 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7234 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7235 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7236 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7237 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7238 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7239 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7240 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7241 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7242 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7243 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7244 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7245 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7246 .ilen = 496,
7247 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
7248 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
7249 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
7250 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
7251 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
7252 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
7253 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
7254 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
7255 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
7256 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
7257 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
7258 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
7259 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
7260 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
7261 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
7262 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
7263 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
7264 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
7265 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
7266 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
7267 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
7268 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
7269 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
7270 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
7271 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
7272 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
7273 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
7274 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
7275 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
7276 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
7277 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
7278 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
7279 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
7280 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
7281 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
7282 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
7283 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
7284 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
7285 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
7286 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
7287 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
7288 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
7289 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
7290 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
7291 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
7292 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
7293 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
7294 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
7295 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
7296 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
7297 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
7298 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
7299 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
7300 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
7301 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
7302 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
7303 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
7304 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
7305 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
7306 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
7307 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
7308 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
7309 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03007310 },
7311};
7312
7313static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
7314 { /* Generated with Crypto++ */
7315 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7316 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7317 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7318 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7319 .klen = 32,
7320 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7321 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7322 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
7323 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
7324 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
7325 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
7326 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
7327 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
7328 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
7329 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
7330 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
7331 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
7332 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
7333 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
7334 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
7335 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
7336 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
7337 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
7338 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
7339 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
7340 .ilen = 144,
7341 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7342 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7343 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7344 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7345 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7346 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7347 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7348 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7349 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7350 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7351 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7352 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7353 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7354 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7355 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7356 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7357 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7358 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
7359 .rlen = 144,
7360 }, { /* Generated with Crypto++ */
7361 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7362 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7363 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7364 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7365 .klen = 32,
7366 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7367 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7368 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
7369 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
7370 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
7371 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
7372 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
7373 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
7374 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
7375 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
7376 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
7377 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
7378 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
7379 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
7380 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
7381 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
7382 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
7383 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
7384 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
7385 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
7386 "\xE6\xD0\x97",
7387 .ilen = 147,
7388 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7389 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7390 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7391 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7392 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7393 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7394 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7395 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7396 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7397 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7398 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7399 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7400 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7401 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7402 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7403 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7404 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7405 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7406 "\xF1\x65\xFC",
7407 .rlen = 147,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007408 .also_non_np = 1,
7409 .np = 2,
7410 .tap = { 147 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007411 }, { /* Generated with Crypto++ */
7412 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7413 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7414 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7415 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7416 .klen = 32,
7417 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7418 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7419 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
7420 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
7421 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
7422 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
7423 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
7424 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
7425 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
7426 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
7427 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
7428 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
7429 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
7430 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
7431 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
7432 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
7433 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
7434 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
7435 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
7436 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
7437 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
7438 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
7439 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
7440 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
7441 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
7442 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
7443 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
7444 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
7445 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
7446 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
7447 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
7448 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
7449 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
7450 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
7451 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
7452 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
7453 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
7454 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
7455 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
7456 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
7457 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
7458 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
7459 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
7460 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
7461 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
7462 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
7463 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
7464 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
7465 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
7466 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
7467 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
7468 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
7469 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
7470 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
7471 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
7472 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
7473 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
7474 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
7475 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
7476 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
7477 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
7478 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
7479 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
7480 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
7481 .ilen = 496,
7482 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7483 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7484 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7485 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7486 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7487 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7488 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7489 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7490 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7491 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7492 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7493 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7494 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7495 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7496 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7497 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7498 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7499 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7500 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7501 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7502 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7503 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7504 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7505 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7506 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7507 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7508 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7509 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7510 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7511 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7512 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7513 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7514 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7515 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7516 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7517 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7518 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7519 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7520 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7521 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7522 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7523 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7524 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7525 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7526 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7527 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7528 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7529 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7530 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7531 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7532 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7533 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7534 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7535 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7536 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7537 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7538 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7539 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7540 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7541 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7542 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7543 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7544 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03007545 },
7546};
Herbert Xuda7f0332008-07-31 17:08:25 +08007547
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03007548static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
7549 /* Generated from AES-LRW test vectors */
7550 {
7551 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7552 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7553 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7554 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7555 .klen = 32,
7556 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7557 "\x00\x00\x00\x00\x00\x00\x00\x01",
7558 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7559 "\x38\x39\x41\x42\x43\x44\x45\x46",
7560 .ilen = 16,
7561 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
7562 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
7563 .rlen = 16,
7564 }, {
7565 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7566 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7567 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7568 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7569 .klen = 32,
7570 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7571 "\x00\x00\x00\x00\x00\x00\x00\x02",
7572 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7573 "\x38\x39\x41\x42\x43\x44\x45\x46",
7574 .ilen = 16,
7575 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
7576 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
7577 .rlen = 16,
7578 }, {
7579 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7580 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7581 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7582 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7583 .klen = 32,
7584 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7585 "\x00\x00\x00\x02\x00\x00\x00\x00",
7586 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7587 "\x38\x39\x41\x42\x43\x44\x45\x46",
7588 .ilen = 16,
7589 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
7590 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
7591 .rlen = 16,
7592 }, {
7593 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7594 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7595 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7596 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7597 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7598 .klen = 40,
7599 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7600 "\x00\x00\x00\x00\x00\x00\x00\x01",
7601 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7602 "\x38\x39\x41\x42\x43\x44\x45\x46",
7603 .ilen = 16,
7604 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
7605 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
7606 .rlen = 16,
7607 }, {
7608 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7609 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7610 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7611 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7612 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7613 .klen = 40,
7614 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7615 "\x00\x00\x00\x02\x00\x00\x00\x00",
7616 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7617 "\x38\x39\x41\x42\x43\x44\x45\x46",
7618 .ilen = 16,
7619 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
7620 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
7621 .rlen = 16,
7622 }, {
7623 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7624 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7625 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7626 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7627 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7628 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7629 .klen = 48,
7630 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7631 "\x00\x00\x00\x00\x00\x00\x00\x01",
7632 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7633 "\x38\x39\x41\x42\x43\x44\x45\x46",
7634 .ilen = 16,
7635 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
7636 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
7637 .rlen = 16,
7638 }, {
7639 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7640 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7641 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7642 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7643 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7644 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7645 .klen = 48,
7646 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7647 "\x00\x00\x00\x02\x00\x00\x00\x00",
7648 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7649 "\x38\x39\x41\x42\x43\x44\x45\x46",
7650 .ilen = 16,
7651 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
7652 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
7653 .rlen = 16,
7654 }, {
7655 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7656 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7657 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7658 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7659 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7660 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7661 .klen = 48,
7662 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7663 "\x00\x00\x00\x00\x00\x00\x00\x01",
7664 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7665 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7666 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7667 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7668 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7669 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7670 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7671 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7672 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7673 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7674 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7675 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7676 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7677 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7678 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7679 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7680 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7681 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7682 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7683 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7684 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7685 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7686 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7687 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7688 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7689 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7690 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7691 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7692 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7693 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7694 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7695 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7696 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7697 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7698 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7699 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7700 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7701 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7702 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7703 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7704 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7705 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7706 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7707 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7708 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7709 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7710 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7711 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7712 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7713 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7714 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7715 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7716 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7717 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7718 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7719 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7720 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7721 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7722 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7723 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7724 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7725 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7726 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7727 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7728 .ilen = 512,
7729 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
7730 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
7731 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
7732 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
7733 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
7734 "\xce\xab\xda\x33\x30\x20\x12\xfa"
7735 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
7736 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
7737 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
7738 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
7739 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
7740 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
7741 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
7742 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
7743 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
7744 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
7745 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
7746 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
7747 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
7748 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
7749 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
7750 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
7751 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
7752 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
7753 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
7754 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
7755 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
7756 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
7757 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
7758 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
7759 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
7760 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
7761 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
7762 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
7763 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
7764 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
7765 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
7766 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
7767 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
7768 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
7769 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
7770 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
7771 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
7772 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
7773 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
7774 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
7775 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
7776 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
7777 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
7778 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
7779 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
7780 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
7781 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
7782 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
7783 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
7784 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
7785 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
7786 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
7787 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
7788 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
7789 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
7790 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
7791 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
7792 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
7793 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007794 .also_non_np = 1,
7795 .np = 2,
7796 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03007797 },
7798};
7799
7800static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
7801 /* Generated from AES-LRW test vectors */
7802 /* same as enc vectors with input and result reversed */
7803 {
7804 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7805 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7806 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7807 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7808 .klen = 32,
7809 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7810 "\x00\x00\x00\x00\x00\x00\x00\x01",
7811 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
7812 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
7813 .ilen = 16,
7814 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7815 "\x38\x39\x41\x42\x43\x44\x45\x46",
7816 .rlen = 16,
7817 }, {
7818 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7819 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7820 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7821 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7822 .klen = 32,
7823 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7824 "\x00\x00\x00\x00\x00\x00\x00\x02",
7825 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
7826 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
7827 .ilen = 16,
7828 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7829 "\x38\x39\x41\x42\x43\x44\x45\x46",
7830 .rlen = 16,
7831 }, {
7832 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7833 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7834 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7835 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7836 .klen = 32,
7837 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7838 "\x00\x00\x00\x02\x00\x00\x00\x00",
7839 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
7840 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
7841 .ilen = 16,
7842 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7843 "\x38\x39\x41\x42\x43\x44\x45\x46",
7844 .rlen = 16,
7845 }, {
7846 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7847 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7848 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7849 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7850 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7851 .klen = 40,
7852 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7853 "\x00\x00\x00\x00\x00\x00\x00\x01",
7854 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
7855 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
7856 .ilen = 16,
7857 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7858 "\x38\x39\x41\x42\x43\x44\x45\x46",
7859 .rlen = 16,
7860 }, {
7861 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7862 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7863 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7864 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7865 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7866 .klen = 40,
7867 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7868 "\x00\x00\x00\x02\x00\x00\x00\x00",
7869 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
7870 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
7871 .ilen = 16,
7872 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7873 "\x38\x39\x41\x42\x43\x44\x45\x46",
7874 .rlen = 16,
7875 }, {
7876 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7877 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7878 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7879 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7880 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7881 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7882 .klen = 48,
7883 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7884 "\x00\x00\x00\x00\x00\x00\x00\x01",
7885 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
7886 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
7887 .ilen = 16,
7888 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7889 "\x38\x39\x41\x42\x43\x44\x45\x46",
7890 .rlen = 16,
7891 }, {
7892 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7893 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7894 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7895 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7896 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7897 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7898 .klen = 48,
7899 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7900 "\x00\x00\x00\x02\x00\x00\x00\x00",
7901 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
7902 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
7903 .ilen = 16,
7904 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7905 "\x38\x39\x41\x42\x43\x44\x45\x46",
7906 .rlen = 16,
7907 }, {
7908 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7909 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7910 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7911 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7912 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7913 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7914 .klen = 48,
7915 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7916 "\x00\x00\x00\x00\x00\x00\x00\x01",
7917 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
7918 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
7919 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
7920 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
7921 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
7922 "\xce\xab\xda\x33\x30\x20\x12\xfa"
7923 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
7924 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
7925 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
7926 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
7927 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
7928 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
7929 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
7930 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
7931 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
7932 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
7933 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
7934 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
7935 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
7936 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
7937 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
7938 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
7939 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
7940 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
7941 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
7942 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
7943 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
7944 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
7945 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
7946 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
7947 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
7948 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
7949 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
7950 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
7951 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
7952 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
7953 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
7954 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
7955 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
7956 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
7957 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
7958 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
7959 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
7960 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
7961 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
7962 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
7963 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
7964 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
7965 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
7966 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
7967 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
7968 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
7969 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
7970 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
7971 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
7972 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
7973 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
7974 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
7975 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
7976 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
7977 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
7978 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
7979 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
7980 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
7981 .ilen = 512,
7982 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7983 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7984 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7985 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7986 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7987 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7988 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7989 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7990 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7991 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7992 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7993 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7994 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7995 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7996 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7997 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7998 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7999 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8000 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8001 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8002 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8003 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8004 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8005 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8006 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8007 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8008 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8009 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8010 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8011 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8012 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8013 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8014 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8015 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8016 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8017 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8018 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8019 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8020 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8021 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8022 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8023 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8024 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8025 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8026 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8027 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8028 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8029 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8030 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8031 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8032 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8033 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8034 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8035 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8036 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8037 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8038 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8039 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8040 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8041 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8042 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8043 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8044 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8045 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8046 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008047 .also_non_np = 1,
8048 .np = 2,
8049 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03008050 },
8051};
8052
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03008053static struct cipher_testvec serpent_xts_enc_tv_template[] = {
8054 /* Generated from AES-XTS test vectors */
8055 {
8056 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8057 "\x00\x00\x00\x00\x00\x00\x00\x00"
8058 "\x00\x00\x00\x00\x00\x00\x00\x00"
8059 "\x00\x00\x00\x00\x00\x00\x00\x00",
8060 .klen = 32,
8061 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8062 "\x00\x00\x00\x00\x00\x00\x00\x00",
8063 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8064 "\x00\x00\x00\x00\x00\x00\x00\x00"
8065 "\x00\x00\x00\x00\x00\x00\x00\x00"
8066 "\x00\x00\x00\x00\x00\x00\x00\x00",
8067 .ilen = 32,
8068 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
8069 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
8070 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
8071 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
8072 .rlen = 32,
8073 }, {
8074 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8075 "\x11\x11\x11\x11\x11\x11\x11\x11"
8076 "\x22\x22\x22\x22\x22\x22\x22\x22"
8077 "\x22\x22\x22\x22\x22\x22\x22\x22",
8078 .klen = 32,
8079 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8080 "\x00\x00\x00\x00\x00\x00\x00\x00",
8081 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8082 "\x44\x44\x44\x44\x44\x44\x44\x44"
8083 "\x44\x44\x44\x44\x44\x44\x44\x44"
8084 "\x44\x44\x44\x44\x44\x44\x44\x44",
8085 .ilen = 32,
8086 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
8087 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
8088 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
8089 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
8090 .rlen = 32,
8091 }, {
8092 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8093 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8094 "\x22\x22\x22\x22\x22\x22\x22\x22"
8095 "\x22\x22\x22\x22\x22\x22\x22\x22",
8096 .klen = 32,
8097 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8098 "\x00\x00\x00\x00\x00\x00\x00\x00",
8099 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8100 "\x44\x44\x44\x44\x44\x44\x44\x44"
8101 "\x44\x44\x44\x44\x44\x44\x44\x44"
8102 "\x44\x44\x44\x44\x44\x44\x44\x44",
8103 .ilen = 32,
8104 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
8105 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
8106 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
8107 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
8108 .rlen = 32,
8109 }, {
8110 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8111 "\x23\x53\x60\x28\x74\x71\x35\x26"
8112 "\x31\x41\x59\x26\x53\x58\x97\x93"
8113 "\x23\x84\x62\x64\x33\x83\x27\x95",
8114 .klen = 32,
8115 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8116 "\x00\x00\x00\x00\x00\x00\x00\x00",
8117 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8118 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8119 "\x10\x11\x12\x13\x14\x15\x16\x17"
8120 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8121 "\x20\x21\x22\x23\x24\x25\x26\x27"
8122 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8123 "\x30\x31\x32\x33\x34\x35\x36\x37"
8124 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8125 "\x40\x41\x42\x43\x44\x45\x46\x47"
8126 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8127 "\x50\x51\x52\x53\x54\x55\x56\x57"
8128 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8129 "\x60\x61\x62\x63\x64\x65\x66\x67"
8130 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8131 "\x70\x71\x72\x73\x74\x75\x76\x77"
8132 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8133 "\x80\x81\x82\x83\x84\x85\x86\x87"
8134 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8135 "\x90\x91\x92\x93\x94\x95\x96\x97"
8136 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8137 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8138 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8139 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8140 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8141 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8142 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8143 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8144 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8145 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8146 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8147 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8148 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8149 "\x00\x01\x02\x03\x04\x05\x06\x07"
8150 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8151 "\x10\x11\x12\x13\x14\x15\x16\x17"
8152 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8153 "\x20\x21\x22\x23\x24\x25\x26\x27"
8154 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8155 "\x30\x31\x32\x33\x34\x35\x36\x37"
8156 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8157 "\x40\x41\x42\x43\x44\x45\x46\x47"
8158 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8159 "\x50\x51\x52\x53\x54\x55\x56\x57"
8160 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8161 "\x60\x61\x62\x63\x64\x65\x66\x67"
8162 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8163 "\x70\x71\x72\x73\x74\x75\x76\x77"
8164 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8165 "\x80\x81\x82\x83\x84\x85\x86\x87"
8166 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8167 "\x90\x91\x92\x93\x94\x95\x96\x97"
8168 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8169 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8170 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8171 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8172 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8173 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8174 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8175 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8176 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8177 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8178 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8179 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8180 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8181 .ilen = 512,
8182 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
8183 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
8184 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
8185 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
8186 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
8187 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
8188 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
8189 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
8190 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
8191 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
8192 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
8193 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
8194 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
8195 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
8196 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
8197 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
8198 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
8199 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
8200 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
8201 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
8202 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
8203 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
8204 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
8205 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
8206 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
8207 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
8208 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
8209 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
8210 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
8211 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
8212 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
8213 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
8214 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
8215 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
8216 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
8217 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
8218 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
8219 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
8220 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
8221 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
8222 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
8223 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
8224 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
8225 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
8226 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
8227 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
8228 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
8229 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
8230 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
8231 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
8232 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
8233 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
8234 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
8235 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
8236 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
8237 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
8238 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
8239 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
8240 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
8241 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
8242 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
8243 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
8244 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
8245 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
8246 .rlen = 512,
8247 }, {
8248 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8249 "\x23\x53\x60\x28\x74\x71\x35\x26"
8250 "\x62\x49\x77\x57\x24\x70\x93\x69"
8251 "\x99\x59\x57\x49\x66\x96\x76\x27"
8252 "\x31\x41\x59\x26\x53\x58\x97\x93"
8253 "\x23\x84\x62\x64\x33\x83\x27\x95"
8254 "\x02\x88\x41\x97\x16\x93\x99\x37"
8255 "\x51\x05\x82\x09\x74\x94\x45\x92",
8256 .klen = 64,
8257 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8258 "\x00\x00\x00\x00\x00\x00\x00\x00",
8259 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8260 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8261 "\x10\x11\x12\x13\x14\x15\x16\x17"
8262 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8263 "\x20\x21\x22\x23\x24\x25\x26\x27"
8264 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8265 "\x30\x31\x32\x33\x34\x35\x36\x37"
8266 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8267 "\x40\x41\x42\x43\x44\x45\x46\x47"
8268 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8269 "\x50\x51\x52\x53\x54\x55\x56\x57"
8270 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8271 "\x60\x61\x62\x63\x64\x65\x66\x67"
8272 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8273 "\x70\x71\x72\x73\x74\x75\x76\x77"
8274 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8275 "\x80\x81\x82\x83\x84\x85\x86\x87"
8276 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8277 "\x90\x91\x92\x93\x94\x95\x96\x97"
8278 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8279 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8280 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8281 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8282 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8283 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8284 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8285 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8286 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8287 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8288 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8289 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8290 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8291 "\x00\x01\x02\x03\x04\x05\x06\x07"
8292 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8293 "\x10\x11\x12\x13\x14\x15\x16\x17"
8294 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8295 "\x20\x21\x22\x23\x24\x25\x26\x27"
8296 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8297 "\x30\x31\x32\x33\x34\x35\x36\x37"
8298 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8299 "\x40\x41\x42\x43\x44\x45\x46\x47"
8300 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8301 "\x50\x51\x52\x53\x54\x55\x56\x57"
8302 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8303 "\x60\x61\x62\x63\x64\x65\x66\x67"
8304 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8305 "\x70\x71\x72\x73\x74\x75\x76\x77"
8306 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8307 "\x80\x81\x82\x83\x84\x85\x86\x87"
8308 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8309 "\x90\x91\x92\x93\x94\x95\x96\x97"
8310 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8311 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8312 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8313 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8314 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8315 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8316 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8317 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8318 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8319 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8320 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8321 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8322 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8323 .ilen = 512,
8324 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
8325 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
8326 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
8327 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
8328 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
8329 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
8330 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
8331 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
8332 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
8333 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
8334 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
8335 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
8336 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
8337 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
8338 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
8339 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
8340 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
8341 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
8342 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
8343 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
8344 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
8345 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
8346 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
8347 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
8348 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
8349 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
8350 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
8351 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
8352 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
8353 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
8354 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
8355 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
8356 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
8357 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
8358 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
8359 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
8360 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
8361 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
8362 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
8363 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
8364 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
8365 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
8366 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
8367 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
8368 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
8369 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
8370 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
8371 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
8372 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
8373 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
8374 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
8375 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
8376 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
8377 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
8378 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
8379 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
8380 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
8381 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
8382 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
8383 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
8384 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
8385 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
8386 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
8387 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
8388 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008389 .also_non_np = 1,
8390 .np = 2,
8391 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03008392 },
8393};
8394
8395static struct cipher_testvec serpent_xts_dec_tv_template[] = {
8396 /* Generated from AES-XTS test vectors */
8397 /* same as enc vectors with input and result reversed */
8398 {
8399 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8400 "\x00\x00\x00\x00\x00\x00\x00\x00"
8401 "\x00\x00\x00\x00\x00\x00\x00\x00"
8402 "\x00\x00\x00\x00\x00\x00\x00\x00",
8403 .klen = 32,
8404 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8405 "\x00\x00\x00\x00\x00\x00\x00\x00",
8406 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
8407 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
8408 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
8409 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
8410 .ilen = 32,
8411 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
8412 "\x00\x00\x00\x00\x00\x00\x00\x00"
8413 "\x00\x00\x00\x00\x00\x00\x00\x00"
8414 "\x00\x00\x00\x00\x00\x00\x00\x00",
8415 .rlen = 32,
8416 }, {
8417 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8418 "\x11\x11\x11\x11\x11\x11\x11\x11"
8419 "\x22\x22\x22\x22\x22\x22\x22\x22"
8420 "\x22\x22\x22\x22\x22\x22\x22\x22",
8421 .klen = 32,
8422 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8423 "\x00\x00\x00\x00\x00\x00\x00\x00",
8424 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
8425 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
8426 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
8427 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
8428 .ilen = 32,
8429 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8430 "\x44\x44\x44\x44\x44\x44\x44\x44"
8431 "\x44\x44\x44\x44\x44\x44\x44\x44"
8432 "\x44\x44\x44\x44\x44\x44\x44\x44",
8433 .rlen = 32,
8434 }, {
8435 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8436 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8437 "\x22\x22\x22\x22\x22\x22\x22\x22"
8438 "\x22\x22\x22\x22\x22\x22\x22\x22",
8439 .klen = 32,
8440 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8441 "\x00\x00\x00\x00\x00\x00\x00\x00",
8442 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
8443 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
8444 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
8445 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
8446 .ilen = 32,
8447 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8448 "\x44\x44\x44\x44\x44\x44\x44\x44"
8449 "\x44\x44\x44\x44\x44\x44\x44\x44"
8450 "\x44\x44\x44\x44\x44\x44\x44\x44",
8451 .rlen = 32,
8452 }, {
8453 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8454 "\x23\x53\x60\x28\x74\x71\x35\x26"
8455 "\x31\x41\x59\x26\x53\x58\x97\x93"
8456 "\x23\x84\x62\x64\x33\x83\x27\x95",
8457 .klen = 32,
8458 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8459 "\x00\x00\x00\x00\x00\x00\x00\x00",
8460 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
8461 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
8462 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
8463 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
8464 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
8465 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
8466 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
8467 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
8468 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
8469 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
8470 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
8471 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
8472 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
8473 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
8474 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
8475 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
8476 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
8477 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
8478 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
8479 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
8480 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
8481 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
8482 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
8483 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
8484 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
8485 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
8486 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
8487 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
8488 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
8489 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
8490 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
8491 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
8492 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
8493 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
8494 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
8495 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
8496 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
8497 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
8498 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
8499 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
8500 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
8501 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
8502 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
8503 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
8504 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
8505 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
8506 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
8507 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
8508 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
8509 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
8510 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
8511 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
8512 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
8513 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
8514 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
8515 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
8516 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
8517 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
8518 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
8519 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
8520 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
8521 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
8522 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
8523 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
8524 .ilen = 512,
8525 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8526 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8527 "\x10\x11\x12\x13\x14\x15\x16\x17"
8528 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8529 "\x20\x21\x22\x23\x24\x25\x26\x27"
8530 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8531 "\x30\x31\x32\x33\x34\x35\x36\x37"
8532 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8533 "\x40\x41\x42\x43\x44\x45\x46\x47"
8534 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8535 "\x50\x51\x52\x53\x54\x55\x56\x57"
8536 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8537 "\x60\x61\x62\x63\x64\x65\x66\x67"
8538 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8539 "\x70\x71\x72\x73\x74\x75\x76\x77"
8540 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8541 "\x80\x81\x82\x83\x84\x85\x86\x87"
8542 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8543 "\x90\x91\x92\x93\x94\x95\x96\x97"
8544 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8545 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8546 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8547 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8548 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8549 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8550 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8551 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8552 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8553 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8554 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8555 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8556 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8557 "\x00\x01\x02\x03\x04\x05\x06\x07"
8558 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8559 "\x10\x11\x12\x13\x14\x15\x16\x17"
8560 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8561 "\x20\x21\x22\x23\x24\x25\x26\x27"
8562 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8563 "\x30\x31\x32\x33\x34\x35\x36\x37"
8564 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8565 "\x40\x41\x42\x43\x44\x45\x46\x47"
8566 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8567 "\x50\x51\x52\x53\x54\x55\x56\x57"
8568 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8569 "\x60\x61\x62\x63\x64\x65\x66\x67"
8570 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8571 "\x70\x71\x72\x73\x74\x75\x76\x77"
8572 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8573 "\x80\x81\x82\x83\x84\x85\x86\x87"
8574 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8575 "\x90\x91\x92\x93\x94\x95\x96\x97"
8576 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8577 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8578 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8579 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8580 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8581 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8582 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8583 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8584 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8585 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8586 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8587 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8588 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8589 .rlen = 512,
8590 }, {
8591 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8592 "\x23\x53\x60\x28\x74\x71\x35\x26"
8593 "\x62\x49\x77\x57\x24\x70\x93\x69"
8594 "\x99\x59\x57\x49\x66\x96\x76\x27"
8595 "\x31\x41\x59\x26\x53\x58\x97\x93"
8596 "\x23\x84\x62\x64\x33\x83\x27\x95"
8597 "\x02\x88\x41\x97\x16\x93\x99\x37"
8598 "\x51\x05\x82\x09\x74\x94\x45\x92",
8599 .klen = 64,
8600 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8601 "\x00\x00\x00\x00\x00\x00\x00\x00",
8602 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
8603 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
8604 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
8605 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
8606 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
8607 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
8608 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
8609 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
8610 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
8611 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
8612 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
8613 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
8614 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
8615 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
8616 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
8617 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
8618 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
8619 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
8620 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
8621 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
8622 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
8623 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
8624 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
8625 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
8626 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
8627 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
8628 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
8629 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
8630 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
8631 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
8632 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
8633 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
8634 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
8635 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
8636 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
8637 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
8638 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
8639 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
8640 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
8641 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
8642 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
8643 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
8644 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
8645 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
8646 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
8647 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
8648 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
8649 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
8650 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
8651 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
8652 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
8653 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
8654 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
8655 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
8656 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
8657 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
8658 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
8659 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
8660 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
8661 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
8662 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
8663 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
8664 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
8665 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
8666 .ilen = 512,
8667 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8668 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8669 "\x10\x11\x12\x13\x14\x15\x16\x17"
8670 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8671 "\x20\x21\x22\x23\x24\x25\x26\x27"
8672 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8673 "\x30\x31\x32\x33\x34\x35\x36\x37"
8674 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8675 "\x40\x41\x42\x43\x44\x45\x46\x47"
8676 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8677 "\x50\x51\x52\x53\x54\x55\x56\x57"
8678 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8679 "\x60\x61\x62\x63\x64\x65\x66\x67"
8680 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8681 "\x70\x71\x72\x73\x74\x75\x76\x77"
8682 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8683 "\x80\x81\x82\x83\x84\x85\x86\x87"
8684 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8685 "\x90\x91\x92\x93\x94\x95\x96\x97"
8686 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8687 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8688 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8689 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8690 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8691 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8692 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8693 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8694 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8695 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8696 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8697 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8698 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8699 "\x00\x01\x02\x03\x04\x05\x06\x07"
8700 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8701 "\x10\x11\x12\x13\x14\x15\x16\x17"
8702 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8703 "\x20\x21\x22\x23\x24\x25\x26\x27"
8704 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8705 "\x30\x31\x32\x33\x34\x35\x36\x37"
8706 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8707 "\x40\x41\x42\x43\x44\x45\x46\x47"
8708 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8709 "\x50\x51\x52\x53\x54\x55\x56\x57"
8710 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8711 "\x60\x61\x62\x63\x64\x65\x66\x67"
8712 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8713 "\x70\x71\x72\x73\x74\x75\x76\x77"
8714 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8715 "\x80\x81\x82\x83\x84\x85\x86\x87"
8716 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8717 "\x90\x91\x92\x93\x94\x95\x96\x97"
8718 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8719 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8720 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8721 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8722 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8723 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8724 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8725 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8726 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8727 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8728 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8729 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8730 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8731 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008732 .also_non_np = 1,
8733 .np = 2,
8734 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03008735 },
8736};
8737
Herbert Xuda7f0332008-07-31 17:08:25 +08008738/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008739#define CAST6_ENC_TEST_VECTORS 4
8740#define CAST6_DEC_TEST_VECTORS 4
8741#define CAST6_CBC_ENC_TEST_VECTORS 1
8742#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03008743#define CAST6_CTR_ENC_TEST_VECTORS 2
8744#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008745#define CAST6_LRW_ENC_TEST_VECTORS 1
8746#define CAST6_LRW_DEC_TEST_VECTORS 1
8747#define CAST6_XTS_ENC_TEST_VECTORS 1
8748#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +08008749
8750static struct cipher_testvec cast6_enc_tv_template[] = {
8751 {
8752 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8753 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
8754 .klen = 16,
8755 .input = zeroed_string,
8756 .ilen = 16,
8757 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
8758 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
8759 .rlen = 16,
8760 }, {
8761 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8762 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8763 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
8764 .klen = 24,
8765 .input = zeroed_string,
8766 .ilen = 16,
8767 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
8768 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
8769 .rlen = 16,
8770 }, {
8771 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8772 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8773 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
8774 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
8775 .klen = 32,
8776 .input = zeroed_string,
8777 .ilen = 16,
8778 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
8779 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
8780 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008781 }, { /* Generated from TF test vectors */
8782 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8783 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8784 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8785 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8786 .klen = 32,
8787 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8788 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8789 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8790 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8791 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8792 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8793 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8794 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8795 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8796 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8797 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8798 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8799 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8800 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8801 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8802 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8803 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8804 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8805 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8806 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8807 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8808 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8809 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8810 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8811 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8812 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8813 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8814 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8815 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8816 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8817 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8818 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8819 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8820 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8821 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8822 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8823 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8824 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8825 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8826 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8827 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8828 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8829 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8830 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8831 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8832 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8833 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8834 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8835 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8836 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8837 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8838 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8839 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8840 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8841 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8842 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8843 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8844 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8845 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8846 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8847 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8848 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8849 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8850 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8851 .ilen = 496,
8852 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
8853 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
8854 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
8855 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
8856 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
8857 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
8858 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
8859 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
8860 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
8861 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
8862 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
8863 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
8864 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
8865 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
8866 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
8867 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
8868 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
8869 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
8870 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
8871 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
8872 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
8873 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
8874 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
8875 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
8876 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
8877 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
8878 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
8879 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
8880 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
8881 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
8882 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
8883 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
8884 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
8885 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
8886 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
8887 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
8888 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
8889 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
8890 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
8891 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
8892 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
8893 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
8894 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
8895 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
8896 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
8897 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
8898 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
8899 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
8900 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
8901 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
8902 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
8903 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
8904 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
8905 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
8906 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
8907 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
8908 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
8909 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
8910 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
8911 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
8912 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
8913 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
8914 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008915 .also_non_np = 1,
8916 .np = 2,
8917 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008918 },
8919};
8920
8921static struct cipher_testvec cast6_dec_tv_template[] = {
8922 {
8923 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8924 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
8925 .klen = 16,
8926 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
8927 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
8928 .ilen = 16,
8929 .result = zeroed_string,
8930 .rlen = 16,
8931 }, {
8932 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8933 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8934 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
8935 .klen = 24,
8936 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
8937 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
8938 .ilen = 16,
8939 .result = zeroed_string,
8940 .rlen = 16,
8941 }, {
8942 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
8943 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
8944 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
8945 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
8946 .klen = 32,
8947 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
8948 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
8949 .ilen = 16,
8950 .result = zeroed_string,
8951 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02008952 }, { /* Generated from TF test vectors */
8953 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8954 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8955 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8956 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8957 .klen = 32,
8958 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8959 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8960 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
8961 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
8962 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
8963 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
8964 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
8965 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
8966 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
8967 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
8968 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
8969 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
8970 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
8971 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
8972 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
8973 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
8974 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
8975 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
8976 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
8977 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
8978 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
8979 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
8980 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
8981 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
8982 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
8983 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
8984 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
8985 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
8986 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
8987 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
8988 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
8989 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
8990 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
8991 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
8992 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
8993 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
8994 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
8995 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
8996 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
8997 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
8998 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
8999 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
9000 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
9001 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
9002 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
9003 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
9004 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
9005 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
9006 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
9007 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
9008 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
9009 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
9010 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
9011 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
9012 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
9013 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
9014 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
9015 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
9016 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
9017 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
9018 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
9019 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
9020 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
9021 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
9022 .ilen = 496,
9023 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9024 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9025 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9026 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9027 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9028 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9029 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9030 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9031 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9032 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9033 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9034 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9035 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9036 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9037 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9038 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9039 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9040 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9041 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9042 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9043 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9044 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9045 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9046 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9047 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9048 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9049 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9050 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9051 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9052 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9053 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9054 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9055 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9056 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9057 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9058 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9059 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9060 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9061 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9062 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9063 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9064 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9065 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9066 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9067 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9068 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9069 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9070 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9071 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9072 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9073 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9074 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9075 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9076 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9077 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9078 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9079 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9080 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9081 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9082 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9083 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9084 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9085 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009086 .also_non_np = 1,
9087 .np = 2,
9088 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009089 },
9090};
9091
9092static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
9093 { /* Generated from TF test vectors */
9094 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9095 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9096 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9097 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9098 .klen = 32,
9099 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9100 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9101 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9102 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9103 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9104 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9105 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9106 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9107 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9108 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9109 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9110 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9111 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9112 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9113 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9114 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9115 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9116 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9117 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9118 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9119 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9120 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9121 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9122 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9123 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9124 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9125 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9126 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9127 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9128 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9129 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9130 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9131 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9132 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9133 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9134 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9135 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9136 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9137 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9138 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9139 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9140 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9141 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9142 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9143 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9144 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9145 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9146 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9147 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9148 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9149 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9150 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9151 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9152 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9153 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9154 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9155 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9156 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9157 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9158 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9159 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9160 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9161 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9162 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9163 .ilen = 496,
9164 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
9165 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
9166 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
9167 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
9168 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
9169 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
9170 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
9171 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
9172 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
9173 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
9174 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
9175 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
9176 "\x23\x16\x47\x72\x81\x13\x3A\x72"
9177 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
9178 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
9179 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
9180 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
9181 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
9182 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
9183 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
9184 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
9185 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
9186 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
9187 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
9188 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
9189 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
9190 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
9191 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
9192 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
9193 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
9194 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
9195 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
9196 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
9197 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
9198 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
9199 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
9200 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
9201 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
9202 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
9203 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
9204 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
9205 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
9206 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
9207 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
9208 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
9209 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
9210 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
9211 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
9212 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
9213 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
9214 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
9215 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
9216 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
9217 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
9218 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
9219 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
9220 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
9221 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
9222 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
9223 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
9224 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
9225 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
9226 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009227 .also_non_np = 1,
9228 .np = 2,
9229 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009230 },
9231};
9232
9233static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
9234 { /* Generated from TF test vectors */
9235 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9236 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9237 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9238 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9239 .klen = 32,
9240 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9241 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9242 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
9243 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
9244 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
9245 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
9246 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
9247 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
9248 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
9249 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
9250 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
9251 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
9252 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
9253 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
9254 "\x23\x16\x47\x72\x81\x13\x3A\x72"
9255 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
9256 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
9257 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
9258 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
9259 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
9260 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
9261 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
9262 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
9263 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
9264 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
9265 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
9266 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
9267 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
9268 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
9269 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
9270 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
9271 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
9272 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
9273 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
9274 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
9275 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
9276 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
9277 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
9278 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
9279 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
9280 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
9281 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
9282 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
9283 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
9284 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
9285 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
9286 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
9287 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
9288 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
9289 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
9290 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
9291 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
9292 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
9293 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
9294 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
9295 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
9296 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
9297 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
9298 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
9299 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
9300 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
9301 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
9302 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
9303 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
9304 .ilen = 496,
9305 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9306 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9307 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9308 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9309 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9310 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9311 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9312 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9313 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9314 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9315 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9316 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9317 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9318 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9319 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9320 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9321 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9322 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9323 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9324 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9325 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9326 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9327 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9328 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9329 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9330 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9331 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9332 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9333 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9334 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9335 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9336 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9337 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9338 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9339 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9340 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9341 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9342 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9343 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9344 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9345 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9346 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9347 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9348 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9349 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9350 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9351 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9352 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9353 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9354 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9355 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9356 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9357 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9358 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9359 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9360 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9361 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9362 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9363 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9364 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9365 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9366 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9367 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009368 .also_non_np = 1,
9369 .np = 2,
9370 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009371 },
9372};
9373
9374static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
9375 { /* Generated from TF test vectors */
9376 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9377 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9378 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9379 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9380 .klen = 32,
9381 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9382 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9383 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9384 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03009385 "\x3A",
9386 .ilen = 17,
9387 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
9388 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
9389 "\x57",
9390 .rlen = 17,
9391 }, { /* Generated from TF test vectors */
9392 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9393 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9394 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9395 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9396 .klen = 32,
9397 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9398 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9399 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9400 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009401 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9402 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9403 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9404 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9405 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9406 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9407 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9408 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9409 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9410 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9411 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9412 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9413 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9414 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9415 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9416 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9417 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9418 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9419 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9420 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9421 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9422 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9423 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9424 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9425 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9426 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9427 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9428 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9429 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9430 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9431 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9432 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9433 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9434 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9435 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9436 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9437 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9438 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9439 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9440 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9441 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9442 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9443 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9444 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9445 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9446 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9447 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9448 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9449 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9450 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9451 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9452 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9453 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9454 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9455 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9456 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9457 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9458 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9459 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9460 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9461 .ilen = 496,
9462 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
9463 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
9464 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
9465 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
9466 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
9467 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
9468 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
9469 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
9470 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
9471 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
9472 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
9473 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
9474 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
9475 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
9476 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
9477 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
9478 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
9479 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
9480 "\x49\x61\x22\x52\x64\x8C\x46\x41"
9481 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
9482 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
9483 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
9484 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
9485 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
9486 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
9487 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
9488 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
9489 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
9490 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
9491 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
9492 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
9493 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
9494 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
9495 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
9496 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
9497 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
9498 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
9499 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
9500 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
9501 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
9502 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
9503 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
9504 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
9505 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
9506 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
9507 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
9508 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
9509 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
9510 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
9511 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
9512 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
9513 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
9514 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
9515 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
9516 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
9517 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
9518 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
9519 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
9520 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
9521 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
9522 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
9523 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
9524 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009525 .also_non_np = 1,
9526 .np = 2,
9527 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009528 },
9529};
9530
9531static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
9532 { /* Generated from TF test vectors */
9533 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9534 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9535 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9536 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9537 .klen = 32,
9538 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9539 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9540 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
9541 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +03009542 "\x57",
9543 .ilen = 17,
9544 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9545 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9546 "\x3A",
9547 .rlen = 17,
9548 }, { /* Generated from TF test vectors */
9549 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9550 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9551 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9552 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9553 .klen = 32,
9554 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9555 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9556 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
9557 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009558 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
9559 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
9560 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
9561 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
9562 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
9563 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
9564 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
9565 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
9566 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
9567 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
9568 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
9569 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
9570 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
9571 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
9572 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
9573 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
9574 "\x49\x61\x22\x52\x64\x8C\x46\x41"
9575 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
9576 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
9577 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
9578 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
9579 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
9580 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
9581 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
9582 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
9583 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
9584 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
9585 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
9586 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
9587 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
9588 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
9589 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
9590 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
9591 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
9592 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
9593 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
9594 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
9595 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
9596 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
9597 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
9598 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
9599 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
9600 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
9601 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
9602 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
9603 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
9604 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
9605 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
9606 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
9607 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
9608 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
9609 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
9610 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
9611 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
9612 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
9613 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
9614 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
9615 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
9616 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
9617 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
9618 .ilen = 496,
9619 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9620 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9621 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9622 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9623 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9624 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9625 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9626 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9627 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9628 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9629 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9630 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9631 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9632 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9633 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9634 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9635 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9636 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9637 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9638 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9639 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9640 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9641 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9642 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9643 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9644 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9645 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9646 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9647 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9648 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9649 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9650 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9651 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9652 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9653 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9654 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9655 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9656 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9657 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9658 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9659 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9660 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9661 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9662 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9663 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9664 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9665 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9666 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9667 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9668 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9669 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9670 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9671 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9672 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9673 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9674 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9675 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9676 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9677 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9678 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9679 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9680 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9681 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009682 .also_non_np = 1,
9683 .np = 2,
9684 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009685 },
9686};
9687
9688static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
9689 { /* Generated from TF test vectors */
9690 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9691 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9692 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9693 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9694 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9695 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9696 .klen = 48,
9697 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9698 "\x00\x00\x00\x00\x00\x00\x00\x01",
9699 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9700 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9701 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9702 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9703 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9704 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9705 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9706 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9707 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9708 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9709 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9710 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9711 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9712 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9713 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9714 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9715 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9716 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9717 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9718 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9719 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9720 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9721 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9722 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9723 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9724 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9725 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9726 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9727 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9728 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9729 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9730 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9731 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9732 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9733 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9734 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9735 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9736 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9737 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9738 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9739 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9740 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9741 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9742 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9743 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9744 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9745 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9746 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9747 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9748 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9749 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9750 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9751 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9752 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9753 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9754 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9755 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9756 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9757 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9758 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9759 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9760 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9761 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9762 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9763 .ilen = 512,
9764 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
9765 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
9766 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
9767 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
9768 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
9769 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
9770 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
9771 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
9772 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
9773 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
9774 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
9775 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
9776 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
9777 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
9778 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
9779 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
9780 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
9781 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
9782 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
9783 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
9784 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
9785 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
9786 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
9787 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
9788 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
9789 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
9790 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
9791 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
9792 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
9793 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
9794 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
9795 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
9796 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
9797 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
9798 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
9799 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
9800 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
9801 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
9802 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
9803 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
9804 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
9805 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
9806 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
9807 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
9808 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
9809 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
9810 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
9811 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
9812 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
9813 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
9814 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
9815 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
9816 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
9817 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
9818 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
9819 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
9820 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
9821 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
9822 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
9823 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
9824 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
9825 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
9826 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
9827 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
9828 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009829 .also_non_np = 1,
9830 .np = 2,
9831 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009832 },
9833};
9834
9835static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
9836 { /* Generated from TF test vectors */
9837 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
9838 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
9839 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
9840 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
9841 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
9842 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
9843 .klen = 48,
9844 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9845 "\x00\x00\x00\x00\x00\x00\x00\x01",
9846 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
9847 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
9848 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
9849 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
9850 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
9851 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
9852 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
9853 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
9854 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
9855 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
9856 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
9857 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
9858 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
9859 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
9860 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
9861 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
9862 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
9863 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
9864 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
9865 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
9866 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
9867 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
9868 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
9869 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
9870 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
9871 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
9872 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
9873 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
9874 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
9875 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
9876 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
9877 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
9878 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
9879 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
9880 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
9881 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
9882 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
9883 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
9884 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
9885 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
9886 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
9887 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
9888 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
9889 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
9890 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
9891 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
9892 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
9893 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
9894 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
9895 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
9896 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
9897 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
9898 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
9899 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
9900 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
9901 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
9902 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
9903 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
9904 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
9905 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
9906 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
9907 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
9908 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
9909 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
9910 .ilen = 512,
9911 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9912 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9913 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9914 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9915 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9916 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9917 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9918 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9919 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9920 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9921 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9922 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9923 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9924 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9925 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9926 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9927 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9928 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9929 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9930 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9931 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9932 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9933 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9934 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9935 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9936 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9937 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9938 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9939 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9940 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9941 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9942 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9943 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9944 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9945 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9946 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9947 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9948 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9949 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9950 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9951 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9952 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9953 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9954 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9955 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9956 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9957 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9958 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9959 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9960 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9961 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9962 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9963 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9964 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9965 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9966 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9967 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9968 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9969 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9970 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9971 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9972 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9973 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9974 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9975 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009976 .also_non_np = 1,
9977 .np = 2,
9978 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +02009979 },
9980};
9981
9982static struct cipher_testvec cast6_xts_enc_tv_template[] = {
9983 { /* Generated from TF test vectors */
9984 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9985 "\x23\x53\x60\x28\x74\x71\x35\x26"
9986 "\x62\x49\x77\x57\x24\x70\x93\x69"
9987 "\x99\x59\x57\x49\x66\x96\x76\x27"
9988 "\x31\x41\x59\x26\x53\x58\x97\x93"
9989 "\x23\x84\x62\x64\x33\x83\x27\x95"
9990 "\x02\x88\x41\x97\x16\x93\x99\x37"
9991 "\x51\x05\x82\x09\x74\x94\x45\x92",
9992 .klen = 64,
9993 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9994 "\x00\x00\x00\x00\x00\x00\x00\x00",
9995 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9996 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9997 "\x10\x11\x12\x13\x14\x15\x16\x17"
9998 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9999 "\x20\x21\x22\x23\x24\x25\x26\x27"
10000 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10001 "\x30\x31\x32\x33\x34\x35\x36\x37"
10002 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10003 "\x40\x41\x42\x43\x44\x45\x46\x47"
10004 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10005 "\x50\x51\x52\x53\x54\x55\x56\x57"
10006 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10007 "\x60\x61\x62\x63\x64\x65\x66\x67"
10008 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10009 "\x70\x71\x72\x73\x74\x75\x76\x77"
10010 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10011 "\x80\x81\x82\x83\x84\x85\x86\x87"
10012 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10013 "\x90\x91\x92\x93\x94\x95\x96\x97"
10014 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10015 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10016 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10017 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10018 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10019 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10020 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10021 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10022 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10023 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10024 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10025 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10026 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10027 "\x00\x01\x02\x03\x04\x05\x06\x07"
10028 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10029 "\x10\x11\x12\x13\x14\x15\x16\x17"
10030 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10031 "\x20\x21\x22\x23\x24\x25\x26\x27"
10032 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10033 "\x30\x31\x32\x33\x34\x35\x36\x37"
10034 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10035 "\x40\x41\x42\x43\x44\x45\x46\x47"
10036 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10037 "\x50\x51\x52\x53\x54\x55\x56\x57"
10038 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10039 "\x60\x61\x62\x63\x64\x65\x66\x67"
10040 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10041 "\x70\x71\x72\x73\x74\x75\x76\x77"
10042 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10043 "\x80\x81\x82\x83\x84\x85\x86\x87"
10044 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10045 "\x90\x91\x92\x93\x94\x95\x96\x97"
10046 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10047 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10048 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10049 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10050 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10051 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10052 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10053 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10054 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10055 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10056 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10057 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10058 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10059 .ilen = 512,
10060 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
10061 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
10062 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
10063 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
10064 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
10065 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
10066 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
10067 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
10068 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
10069 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
10070 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
10071 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
10072 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
10073 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
10074 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
10075 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
10076 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
10077 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
10078 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
10079 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
10080 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
10081 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
10082 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
10083 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
10084 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
10085 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
10086 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
10087 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
10088 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
10089 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
10090 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
10091 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
10092 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
10093 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
10094 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
10095 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
10096 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
10097 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
10098 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
10099 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
10100 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
10101 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
10102 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
10103 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
10104 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
10105 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
10106 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
10107 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
10108 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
10109 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
10110 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
10111 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
10112 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
10113 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
10114 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
10115 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
10116 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
10117 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
10118 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
10119 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
10120 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
10121 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
10122 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
10123 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
10124 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010125 .also_non_np = 1,
10126 .np = 2,
10127 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020010128 },
10129};
10130
10131static struct cipher_testvec cast6_xts_dec_tv_template[] = {
10132 { /* Generated from TF test vectors */
10133 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10134 "\x23\x53\x60\x28\x74\x71\x35\x26"
10135 "\x62\x49\x77\x57\x24\x70\x93\x69"
10136 "\x99\x59\x57\x49\x66\x96\x76\x27"
10137 "\x31\x41\x59\x26\x53\x58\x97\x93"
10138 "\x23\x84\x62\x64\x33\x83\x27\x95"
10139 "\x02\x88\x41\x97\x16\x93\x99\x37"
10140 "\x51\x05\x82\x09\x74\x94\x45\x92",
10141 .klen = 64,
10142 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10143 "\x00\x00\x00\x00\x00\x00\x00\x00",
10144 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
10145 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
10146 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
10147 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
10148 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
10149 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
10150 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
10151 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
10152 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
10153 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
10154 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
10155 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
10156 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
10157 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
10158 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
10159 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
10160 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
10161 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
10162 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
10163 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
10164 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
10165 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
10166 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
10167 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
10168 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
10169 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
10170 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
10171 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
10172 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
10173 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
10174 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
10175 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
10176 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
10177 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
10178 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
10179 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
10180 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
10181 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
10182 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
10183 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
10184 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
10185 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
10186 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
10187 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
10188 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
10189 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
10190 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
10191 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
10192 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
10193 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
10194 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
10195 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
10196 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
10197 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
10198 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
10199 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
10200 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
10201 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
10202 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
10203 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
10204 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
10205 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
10206 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
10207 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
10208 .ilen = 512,
10209 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10210 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10211 "\x10\x11\x12\x13\x14\x15\x16\x17"
10212 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10213 "\x20\x21\x22\x23\x24\x25\x26\x27"
10214 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10215 "\x30\x31\x32\x33\x34\x35\x36\x37"
10216 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10217 "\x40\x41\x42\x43\x44\x45\x46\x47"
10218 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10219 "\x50\x51\x52\x53\x54\x55\x56\x57"
10220 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10221 "\x60\x61\x62\x63\x64\x65\x66\x67"
10222 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10223 "\x70\x71\x72\x73\x74\x75\x76\x77"
10224 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10225 "\x80\x81\x82\x83\x84\x85\x86\x87"
10226 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10227 "\x90\x91\x92\x93\x94\x95\x96\x97"
10228 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10229 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10230 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10231 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10232 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10233 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10234 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10235 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10236 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10237 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10238 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10239 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10240 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10241 "\x00\x01\x02\x03\x04\x05\x06\x07"
10242 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10243 "\x10\x11\x12\x13\x14\x15\x16\x17"
10244 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10245 "\x20\x21\x22\x23\x24\x25\x26\x27"
10246 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10247 "\x30\x31\x32\x33\x34\x35\x36\x37"
10248 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10249 "\x40\x41\x42\x43\x44\x45\x46\x47"
10250 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10251 "\x50\x51\x52\x53\x54\x55\x56\x57"
10252 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10253 "\x60\x61\x62\x63\x64\x65\x66\x67"
10254 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10255 "\x70\x71\x72\x73\x74\x75\x76\x77"
10256 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10257 "\x80\x81\x82\x83\x84\x85\x86\x87"
10258 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10259 "\x90\x91\x92\x93\x94\x95\x96\x97"
10260 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10261 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10262 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10263 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10264 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10265 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10266 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10267 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10268 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10269 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10270 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10271 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10272 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10273 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010274 .also_non_np = 1,
10275 .np = 2,
10276 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010277 },
10278};
10279
10280
10281/*
10282 * AES test vectors.
10283 */
10284#define AES_ENC_TEST_VECTORS 3
10285#define AES_DEC_TEST_VECTORS 3
10286#define AES_CBC_ENC_TEST_VECTORS 4
10287#define AES_CBC_DEC_TEST_VECTORS 4
Horia Geantae46e9a42012-07-03 19:16:54 +030010288#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
10289#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
10290#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +080010291#define AES_LRW_ENC_TEST_VECTORS 8
10292#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100010293#define AES_XTS_ENC_TEST_VECTORS 5
10294#define AES_XTS_DEC_TEST_VECTORS 5
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080010295#define AES_CTR_ENC_TEST_VECTORS 3
10296#define AES_CTR_DEC_TEST_VECTORS 3
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100010297#define AES_OFB_ENC_TEST_VECTORS 1
10298#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080010299#define AES_CTR_3686_ENC_TEST_VECTORS 7
10300#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080010301#define AES_GCM_ENC_TEST_VECTORS 9
10302#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -040010303#define AES_GCM_4106_ENC_TEST_VECTORS 7
10304#define AES_GCM_4106_DEC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +080010305#define AES_CCM_ENC_TEST_VECTORS 7
10306#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080010307#define AES_CCM_4309_ENC_TEST_VECTORS 7
10308#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080010309
10310static struct cipher_testvec aes_enc_tv_template[] = {
10311 { /* From FIPS-197 */
10312 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10313 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10314 .klen = 16,
10315 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
10316 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10317 .ilen = 16,
10318 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
10319 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
10320 .rlen = 16,
10321 }, {
10322 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10323 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10324 "\x10\x11\x12\x13\x14\x15\x16\x17",
10325 .klen = 24,
10326 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
10327 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10328 .ilen = 16,
10329 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
10330 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
10331 .rlen = 16,
10332 }, {
10333 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10334 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10335 "\x10\x11\x12\x13\x14\x15\x16\x17"
10336 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10337 .klen = 32,
10338 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
10339 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10340 .ilen = 16,
10341 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
10342 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
10343 .rlen = 16,
10344 },
10345};
10346
10347static struct cipher_testvec aes_dec_tv_template[] = {
10348 { /* From FIPS-197 */
10349 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10350 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10351 .klen = 16,
10352 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
10353 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
10354 .ilen = 16,
10355 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
10356 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10357 .rlen = 16,
10358 }, {
10359 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10360 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10361 "\x10\x11\x12\x13\x14\x15\x16\x17",
10362 .klen = 24,
10363 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
10364 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
10365 .ilen = 16,
10366 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
10367 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10368 .rlen = 16,
10369 }, {
10370 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10371 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10372 "\x10\x11\x12\x13\x14\x15\x16\x17"
10373 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10374 .klen = 32,
10375 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
10376 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
10377 .ilen = 16,
10378 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
10379 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
10380 .rlen = 16,
10381 },
10382};
10383
10384static struct cipher_testvec aes_cbc_enc_tv_template[] = {
10385 { /* From RFC 3602 */
10386 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10387 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10388 .klen = 16,
10389 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10390 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10391 .input = "Single block msg",
10392 .ilen = 16,
10393 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10394 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
10395 .rlen = 16,
10396 }, {
10397 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10398 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10399 .klen = 16,
10400 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10401 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10402 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10403 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10404 "\x10\x11\x12\x13\x14\x15\x16\x17"
10405 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10406 .ilen = 32,
10407 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10408 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10409 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10410 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
10411 .rlen = 32,
10412 }, { /* From NIST SP800-38A */
10413 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10414 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10415 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10416 .klen = 24,
10417 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10418 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10419 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10420 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10421 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10422 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10423 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10424 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10425 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10426 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10427 .ilen = 64,
10428 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10429 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10430 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10431 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10432 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10433 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10434 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10435 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
10436 .rlen = 64,
10437 }, {
10438 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10439 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10440 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10441 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10442 .klen = 32,
10443 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10444 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10445 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10446 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10447 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10448 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10449 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10450 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10451 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10452 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10453 .ilen = 64,
10454 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10455 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10456 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10457 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10458 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10459 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10460 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10461 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
10462 .rlen = 64,
10463 },
10464};
10465
10466static struct cipher_testvec aes_cbc_dec_tv_template[] = {
10467 { /* From RFC 3602 */
10468 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10469 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10470 .klen = 16,
10471 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10472 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10473 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10474 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
10475 .ilen = 16,
10476 .result = "Single block msg",
10477 .rlen = 16,
10478 }, {
10479 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10480 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10481 .klen = 16,
10482 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10483 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10484 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10485 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10486 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10487 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
10488 .ilen = 32,
10489 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10490 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10491 "\x10\x11\x12\x13\x14\x15\x16\x17"
10492 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10493 .rlen = 32,
10494 }, { /* From NIST SP800-38A */
10495 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10496 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10497 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10498 .klen = 24,
10499 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10500 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10501 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10502 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10503 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10504 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10505 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10506 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10507 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10508 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
10509 .ilen = 64,
10510 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10511 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10512 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10513 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10514 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10515 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10516 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10517 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10518 .rlen = 64,
10519 }, {
10520 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10521 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10522 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10523 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10524 .klen = 32,
10525 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10526 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10527 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10528 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10529 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10530 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10531 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10532 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10533 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10534 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
10535 .ilen = 64,
10536 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10537 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10538 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10539 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10540 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10541 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10542 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10543 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10544 .rlen = 64,
10545 },
10546};
10547
Horia Geantae46e9a42012-07-03 19:16:54 +030010548static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
10549 { /* RFC 3602 Case 1 */
10550#ifdef __LITTLE_ENDIAN
10551 .key = "\x08\x00" /* rta length */
10552 "\x01\x00" /* rta type */
10553#else
10554 .key = "\x00\x08" /* rta length */
10555 "\x00\x01" /* rta type */
10556#endif
10557 "\x00\x00\x00\x10" /* enc key length */
10558 "\x00\x00\x00\x00\x00\x00\x00\x00"
10559 "\x00\x00\x00\x00\x00\x00\x00\x00"
10560 "\x00\x00\x00\x00"
10561 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10562 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10563 .klen = 8 + 20 + 16,
10564 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10565 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10566 .input = "Single block msg",
10567 .ilen = 16,
10568 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10569 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
10570 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
10571 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
10572 "\x03\x71\xa2\x06",
10573 .rlen = 16 + 20,
10574 }, { /* RFC 3602 Case 2 */
10575#ifdef __LITTLE_ENDIAN
10576 .key = "\x08\x00" /* rta length */
10577 "\x01\x00" /* rta type */
10578#else
10579 .key = "\x00\x08" /* rta length */
10580 "\x00\x01" /* rta type */
10581#endif
10582 "\x00\x00\x00\x10" /* enc key length */
10583 "\x20\x21\x22\x23\x24\x25\x26\x27"
10584 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10585 "\x30\x31\x32\x33"
10586 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10587 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10588 .klen = 8 + 20 + 16,
10589 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10590 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10591 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10592 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10593 "\x10\x11\x12\x13\x14\x15\x16\x17"
10594 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10595 .ilen = 32,
10596 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10597 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10598 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10599 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
10600 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
10601 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
10602 "\x65\x39\xf8\xde",
10603 .rlen = 32 + 20,
10604 }, { /* RFC 3602 Case 3 */
10605#ifdef __LITTLE_ENDIAN
10606 .key = "\x08\x00" /* rta length */
10607 "\x01\x00" /* rta type */
10608#else
10609 .key = "\x00\x08" /* rta length */
10610 "\x00\x01" /* rta type */
10611#endif
10612 "\x00\x00\x00\x10" /* enc key length */
10613 "\x11\x22\x33\x44\x55\x66\x77\x88"
10614 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10615 "\x22\x33\x44\x55"
10616 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
10617 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
10618 .klen = 8 + 20 + 16,
10619 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
10620 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
10621 .input = "This is a 48-byte message (exactly 3 AES blocks)",
10622 .ilen = 48,
10623 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
10624 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
10625 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
10626 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
10627 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
10628 "\x85\x79\x69\x5d\x83\xba\x26\x84"
10629 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
10630 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
10631 "\x8d\x62\xf2\x1e",
10632 .rlen = 48 + 20,
10633 }, { /* RFC 3602 Case 4 */
10634#ifdef __LITTLE_ENDIAN
10635 .key = "\x08\x00" /* rta length */
10636 "\x01\x00" /* rta type */
10637#else
10638 .key = "\x00\x08" /* rta length */
10639 "\x00\x01" /* rta type */
10640#endif
10641 "\x00\x00\x00\x10" /* enc key length */
10642 "\x11\x22\x33\x44\x55\x66\x77\x88"
10643 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10644 "\x22\x33\x44\x55"
10645 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
10646 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
10647 .klen = 8 + 20 + 16,
10648 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
10649 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
10650 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10651 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10652 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10653 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10654 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10655 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10656 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10657 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
10658 .ilen = 64,
10659 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
10660 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
10661 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
10662 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
10663 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
10664 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
10665 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
10666 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
10667 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
10668 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
10669 "\x1d\xbe\xc6\xe9",
10670 .rlen = 64 + 20,
10671 }, { /* RFC 3602 Case 5 */
10672#ifdef __LITTLE_ENDIAN
10673 .key = "\x08\x00" /* rta length */
10674 "\x01\x00" /* rta type */
10675#else
10676 .key = "\x00\x08" /* rta length */
10677 "\x00\x01" /* rta type */
10678#endif
10679 "\x00\x00\x00\x10" /* enc key length */
10680 "\x11\x22\x33\x44\x55\x66\x77\x88"
10681 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10682 "\x22\x33\x44\x55"
10683 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
10684 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
10685 .klen = 8 + 20 + 16,
10686 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
10687 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
10688 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
10689 .alen = 8,
10690 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
10691 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
10692 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10693 "\x10\x11\x12\x13\x14\x15\x16\x17"
10694 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10695 "\x20\x21\x22\x23\x24\x25\x26\x27"
10696 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10697 "\x30\x31\x32\x33\x34\x35\x36\x37"
10698 "\x01\x02\x03\x04\x05\x06\x07\x08"
10699 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10700 .ilen = 80,
10701 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10702 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10703 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10704 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10705 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10706 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10707 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10708 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10709 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10710 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10711 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
10712 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
10713 "\x85\xe1\x59\xf7",
10714 .rlen = 80 + 20,
10715 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10716#ifdef __LITTLE_ENDIAN
10717 .key = "\x08\x00" /* rta length */
10718 "\x01\x00" /* rta type */
10719#else
10720 .key = "\x00\x08" /* rta length */
10721 "\x00\x01" /* rta type */
10722#endif
10723 "\x00\x00\x00\x18" /* enc key length */
10724 "\x11\x22\x33\x44\x55\x66\x77\x88"
10725 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10726 "\x22\x33\x44\x55"
10727 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10728 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10729 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10730 .klen = 8 + 20 + 24,
10731 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10732 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10733 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10734 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10735 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10736 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10737 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10738 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10739 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10740 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10741 .ilen = 64,
10742 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10743 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10744 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10745 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10746 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10747 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10748 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10749 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
10750 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
10751 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
10752 "\x47\x4c\xfc\x36",
10753 .rlen = 64 + 20,
10754 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
10755#ifdef __LITTLE_ENDIAN
10756 .key = "\x08\x00" /* rta length */
10757 "\x01\x00" /* rta type */
10758#else
10759 .key = "\x00\x08" /* rta length */
10760 "\x00\x01" /* rta type */
10761#endif
10762 "\x00\x00\x00\x20" /* enc key length */
10763 "\x11\x22\x33\x44\x55\x66\x77\x88"
10764 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10765 "\x22\x33\x44\x55"
10766 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10767 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10768 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10769 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10770 .klen = 8 + 20 + 32,
10771 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10772 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10773 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10774 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10775 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10776 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10777 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10778 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10779 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10780 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10781 .ilen = 64,
10782 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10783 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10784 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10785 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10786 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10787 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10788 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10789 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
10790 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
10791 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
10792 "\x51\xee\xd6\x4e",
10793 .rlen = 64 + 20,
10794 },
10795};
10796
10797static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
10798 { /* RFC 3602 Case 1 */
10799#ifdef __LITTLE_ENDIAN
10800 .key = "\x08\x00" /* rta length */
10801 "\x01\x00" /* rta type */
10802#else
10803 .key = "\x00\x08" /* rta length */
10804 "\x00\x01" /* rta type */
10805#endif
10806 "\x00\x00\x00\x10" /* enc key length */
10807 "\x00\x00\x00\x00\x00\x00\x00\x00"
10808 "\x00\x00\x00\x00\x00\x00\x00\x00"
10809 "\x00\x00\x00\x00\x00\x00\x00\x00"
10810 "\x00\x00\x00\x00\x00\x00\x00\x00"
10811 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10812 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10813 .klen = 8 + 32 + 16,
10814 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10815 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10816 .input = "Single block msg",
10817 .ilen = 16,
10818 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10819 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
10820 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
10821 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
10822 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
10823 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
10824 .rlen = 16 + 32,
10825 }, { /* RFC 3602 Case 2 */
10826#ifdef __LITTLE_ENDIAN
10827 .key = "\x08\x00" /* rta length */
10828 "\x01\x00" /* rta type */
10829#else
10830 .key = "\x00\x08" /* rta length */
10831 "\x00\x01" /* rta type */
10832#endif
10833 "\x00\x00\x00\x10" /* enc key length */
10834 "\x20\x21\x22\x23\x24\x25\x26\x27"
10835 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10836 "\x30\x31\x32\x33\x34\x35\x36\x37"
10837 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10838 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10839 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10840 .klen = 8 + 32 + 16,
10841 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10842 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10843 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10844 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10845 "\x10\x11\x12\x13\x14\x15\x16\x17"
10846 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10847 .ilen = 32,
10848 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10849 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10850 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10851 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
10852 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
10853 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
10854 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
10855 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
10856 .rlen = 32 + 32,
10857 }, { /* RFC 3602 Case 3 */
10858#ifdef __LITTLE_ENDIAN
10859 .key = "\x08\x00" /* rta length */
10860 "\x01\x00" /* rta type */
10861#else
10862 .key = "\x00\x08" /* rta length */
10863 "\x00\x01" /* rta type */
10864#endif
10865 "\x00\x00\x00\x10" /* enc key length */
10866 "\x11\x22\x33\x44\x55\x66\x77\x88"
10867 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10868 "\x22\x33\x44\x55\x66\x77\x88\x99"
10869 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10870 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
10871 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
10872 .klen = 8 + 32 + 16,
10873 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
10874 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
10875 .input = "This is a 48-byte message (exactly 3 AES blocks)",
10876 .ilen = 48,
10877 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
10878 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
10879 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
10880 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
10881 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
10882 "\x85\x79\x69\x5d\x83\xba\x26\x84"
10883 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
10884 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
10885 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
10886 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
10887 .rlen = 48 + 32,
10888 }, { /* RFC 3602 Case 4 */
10889#ifdef __LITTLE_ENDIAN
10890 .key = "\x08\x00" /* rta length */
10891 "\x01\x00" /* rta type */
10892#else
10893 .key = "\x00\x08" /* rta length */
10894 "\x00\x01" /* rta type */
10895#endif
10896 "\x00\x00\x00\x10" /* enc key length */
10897 "\x11\x22\x33\x44\x55\x66\x77\x88"
10898 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10899 "\x22\x33\x44\x55\x66\x77\x88\x99"
10900 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10901 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
10902 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
10903 .klen = 8 + 32 + 16,
10904 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
10905 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
10906 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10907 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10908 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10909 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10910 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10911 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10912 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10913 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
10914 .ilen = 64,
10915 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
10916 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
10917 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
10918 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
10919 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
10920 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
10921 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
10922 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
10923 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
10924 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
10925 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
10926 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
10927 .rlen = 64 + 32,
10928 }, { /* RFC 3602 Case 5 */
10929#ifdef __LITTLE_ENDIAN
10930 .key = "\x08\x00" /* rta length */
10931 "\x01\x00" /* rta type */
10932#else
10933 .key = "\x00\x08" /* rta length */
10934 "\x00\x01" /* rta type */
10935#endif
10936 "\x00\x00\x00\x10" /* enc key length */
10937 "\x11\x22\x33\x44\x55\x66\x77\x88"
10938 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10939 "\x22\x33\x44\x55\x66\x77\x88\x99"
10940 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10941 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
10942 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
10943 .klen = 8 + 32 + 16,
10944 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
10945 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
10946 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
10947 .alen = 8,
10948 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
10949 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
10950 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10951 "\x10\x11\x12\x13\x14\x15\x16\x17"
10952 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10953 "\x20\x21\x22\x23\x24\x25\x26\x27"
10954 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10955 "\x30\x31\x32\x33\x34\x35\x36\x37"
10956 "\x01\x02\x03\x04\x05\x06\x07\x08"
10957 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10958 .ilen = 80,
10959 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10960 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10961 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10962 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10963 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10964 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10965 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10966 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10967 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10968 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10969 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
10970 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
10971 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
10972 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
10973 .rlen = 80 + 32,
10974 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10975#ifdef __LITTLE_ENDIAN
10976 .key = "\x08\x00" /* rta length */
10977 "\x01\x00" /* rta type */
10978#else
10979 .key = "\x00\x08" /* rta length */
10980 "\x00\x01" /* rta type */
10981#endif
10982 "\x00\x00\x00\x18" /* enc key length */
10983 "\x11\x22\x33\x44\x55\x66\x77\x88"
10984 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10985 "\x22\x33\x44\x55\x66\x77\x88\x99"
10986 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10987 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10988 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10989 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10990 .klen = 8 + 32 + 24,
10991 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
10992 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10993 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10994 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10995 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10996 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10997 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10998 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10999 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11000 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11001 .ilen = 64,
11002 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
11003 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
11004 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
11005 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
11006 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
11007 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
11008 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
11009 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
11010 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
11011 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
11012 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
11013 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
11014 .rlen = 64 + 32,
11015 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
11016#ifdef __LITTLE_ENDIAN
11017 .key = "\x08\x00" /* rta length */
11018 "\x01\x00" /* rta type */
11019#else
11020 .key = "\x00\x08" /* rta length */
11021 "\x00\x01" /* rta type */
11022#endif
11023 "\x00\x00\x00\x20" /* enc key length */
11024 "\x11\x22\x33\x44\x55\x66\x77\x88"
11025 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11026 "\x22\x33\x44\x55\x66\x77\x88\x99"
11027 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11028 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11029 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11030 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11031 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11032 .klen = 8 + 32 + 32,
11033 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
11034 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
11035 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11036 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11037 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11038 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11039 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11040 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11041 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11042 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11043 .ilen = 64,
11044 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
11045 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
11046 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
11047 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
11048 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
11049 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
11050 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
11051 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
11052 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
11053 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
11054 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
11055 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
11056 .rlen = 64 + 32,
11057 },
11058};
11059
11060static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
11061 { /* RFC 3602 Case 1 */
11062#ifdef __LITTLE_ENDIAN
11063 .key = "\x08\x00" /* rta length */
11064 "\x01\x00" /* rta type */
11065#else
11066 .key = "\x00\x08" /* rta length */
11067 "\x00\x01" /* rta type */
11068#endif
11069 "\x00\x00\x00\x10" /* enc key length */
11070 "\x00\x00\x00\x00\x00\x00\x00\x00"
11071 "\x00\x00\x00\x00\x00\x00\x00\x00"
11072 "\x00\x00\x00\x00\x00\x00\x00\x00"
11073 "\x00\x00\x00\x00\x00\x00\x00\x00"
11074 "\x00\x00\x00\x00\x00\x00\x00\x00"
11075 "\x00\x00\x00\x00\x00\x00\x00\x00"
11076 "\x00\x00\x00\x00\x00\x00\x00\x00"
11077 "\x00\x00\x00\x00\x00\x00\x00\x00"
11078 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
11079 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
11080 .klen = 8 + 64 + 16,
11081 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
11082 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
11083 .input = "Single block msg",
11084 .ilen = 16,
11085 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
11086 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
11087 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
11088 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
11089 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
11090 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
11091 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
11092 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
11093 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
11094 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
11095 .rlen = 16 + 64,
11096 }, { /* RFC 3602 Case 2 */
11097#ifdef __LITTLE_ENDIAN
11098 .key = "\x08\x00" /* rta length */
11099 "\x01\x00" /* rta type */
11100#else
11101 .key = "\x00\x08" /* rta length */
11102 "\x00\x01" /* rta type */
11103#endif
11104 "\x00\x00\x00\x10" /* enc key length */
11105 "\x20\x21\x22\x23\x24\x25\x26\x27"
11106 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11107 "\x30\x31\x32\x33\x34\x35\x36\x37"
11108 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11109 "\x40\x41\x42\x43\x44\x45\x46\x47"
11110 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11111 "\x50\x51\x52\x53\x54\x55\x56\x57"
11112 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11113 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
11114 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
11115 .klen = 8 + 64 + 16,
11116 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
11117 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
11118 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11119 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11120 "\x10\x11\x12\x13\x14\x15\x16\x17"
11121 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11122 .ilen = 32,
11123 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
11124 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
11125 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
11126 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
11127 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
11128 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
11129 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
11130 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
11131 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
11132 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
11133 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
11134 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
11135 .rlen = 32 + 64,
11136 }, { /* RFC 3602 Case 3 */
11137#ifdef __LITTLE_ENDIAN
11138 .key = "\x08\x00" /* rta length */
11139 "\x01\x00" /* rta type */
11140#else
11141 .key = "\x00\x08" /* rta length */
11142 "\x00\x01" /* rta type */
11143#endif
11144 "\x00\x00\x00\x10" /* enc key length */
11145 "\x11\x22\x33\x44\x55\x66\x77\x88"
11146 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11147 "\x22\x33\x44\x55\x66\x77\x88\x99"
11148 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11149 "\x33\x44\x55\x66\x77\x88\x99\xaa"
11150 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
11151 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
11152 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
11153 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
11154 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
11155 .klen = 8 + 64 + 16,
11156 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
11157 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
11158 .input = "This is a 48-byte message (exactly 3 AES blocks)",
11159 .ilen = 48,
11160 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
11161 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
11162 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
11163 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
11164 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
11165 "\x85\x79\x69\x5d\x83\xba\x26\x84"
11166 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
11167 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
11168 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
11169 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
11170 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
11171 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
11172 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
11173 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
11174 .rlen = 48 + 64,
11175 }, { /* RFC 3602 Case 4 */
11176#ifdef __LITTLE_ENDIAN
11177 .key = "\x08\x00" /* rta length */
11178 "\x01\x00" /* rta type */
11179#else
11180 .key = "\x00\x08" /* rta length */
11181 "\x00\x01" /* rta type */
11182#endif
11183 "\x00\x00\x00\x10" /* enc key length */
11184 "\x11\x22\x33\x44\x55\x66\x77\x88"
11185 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11186 "\x22\x33\x44\x55\x66\x77\x88\x99"
11187 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11188 "\x33\x44\x55\x66\x77\x88\x99\xaa"
11189 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
11190 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
11191 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
11192 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
11193 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
11194 .klen = 8 + 64 + 16,
11195 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
11196 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
11197 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11198 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11199 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11200 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11201 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11202 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11203 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11204 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
11205 .ilen = 64,
11206 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
11207 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
11208 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
11209 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
11210 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
11211 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
11212 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
11213 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
11214 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
11215 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
11216 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
11217 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
11218 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
11219 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
11220 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
11221 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
11222 .rlen = 64 + 64,
11223 }, { /* RFC 3602 Case 5 */
11224#ifdef __LITTLE_ENDIAN
11225 .key = "\x08\x00" /* rta length */
11226 "\x01\x00" /* rta type */
11227#else
11228 .key = "\x00\x08" /* rta length */
11229 "\x00\x01" /* rta type */
11230#endif
11231 "\x00\x00\x00\x10" /* enc key length */
11232 "\x11\x22\x33\x44\x55\x66\x77\x88"
11233 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11234 "\x22\x33\x44\x55\x66\x77\x88\x99"
11235 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11236 "\x33\x44\x55\x66\x77\x88\x99\xaa"
11237 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
11238 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
11239 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
11240 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
11241 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
11242 .klen = 8 + 64 + 16,
11243 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
11244 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
11245 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
11246 .alen = 8,
11247 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
11248 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
11249 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11250 "\x10\x11\x12\x13\x14\x15\x16\x17"
11251 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11252 "\x20\x21\x22\x23\x24\x25\x26\x27"
11253 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11254 "\x30\x31\x32\x33\x34\x35\x36\x37"
11255 "\x01\x02\x03\x04\x05\x06\x07\x08"
11256 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
11257 .ilen = 80,
11258 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
11259 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
11260 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
11261 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
11262 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
11263 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
11264 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
11265 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
11266 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
11267 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
11268 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
11269 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
11270 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
11271 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
11272 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
11273 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
11274 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
11275 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
11276 .rlen = 80 + 64,
11277 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
11278#ifdef __LITTLE_ENDIAN
11279 .key = "\x08\x00" /* rta length */
11280 "\x01\x00" /* rta type */
11281#else
11282 .key = "\x00\x08" /* rta length */
11283 "\x00\x01" /* rta type */
11284#endif
11285 "\x00\x00\x00\x18" /* enc key length */
11286 "\x11\x22\x33\x44\x55\x66\x77\x88"
11287 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11288 "\x22\x33\x44\x55\x66\x77\x88\x99"
11289 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11290 "\x33\x44\x55\x66\x77\x88\x99\xaa"
11291 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
11292 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
11293 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
11294 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
11295 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
11296 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
11297 .klen = 8 + 64 + 24,
11298 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
11299 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
11300 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11301 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11302 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11303 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11304 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11305 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11306 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11307 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11308 .ilen = 64,
11309 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
11310 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
11311 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
11312 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
11313 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
11314 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
11315 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
11316 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
11317 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
11318 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
11319 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
11320 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
11321 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
11322 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
11323 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
11324 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
11325 .rlen = 64 + 64,
11326 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
11327#ifdef __LITTLE_ENDIAN
11328 .key = "\x08\x00" /* rta length */
11329 "\x01\x00" /* rta type */
11330#else
11331 .key = "\x00\x08" /* rta length */
11332 "\x00\x01" /* rta type */
11333#endif
11334 "\x00\x00\x00\x20" /* enc key length */
11335 "\x11\x22\x33\x44\x55\x66\x77\x88"
11336 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
11337 "\x22\x33\x44\x55\x66\x77\x88\x99"
11338 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
11339 "\x33\x44\x55\x66\x77\x88\x99\xaa"
11340 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
11341 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
11342 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
11343 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11344 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11345 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11346 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11347 .klen = 8 + 64 + 32,
11348 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
11349 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
11350 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11351 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11352 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11353 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11354 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11355 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11356 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11357 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11358 .ilen = 64,
11359 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
11360 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
11361 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
11362 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
11363 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
11364 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
11365 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
11366 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
11367 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
11368 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
11369 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
11370 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
11371 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
11372 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
11373 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
11374 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
11375 .rlen = 64 + 64,
11376 },
11377};
11378
Herbert Xuda7f0332008-07-31 17:08:25 +080011379static struct cipher_testvec aes_lrw_enc_tv_template[] = {
11380 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
11381 { /* LRW-32-AES 1 */
11382 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11383 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11384 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11385 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11386 .klen = 32,
11387 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11388 "\x00\x00\x00\x00\x00\x00\x00\x01",
11389 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11390 "\x38\x39\x41\x42\x43\x44\x45\x46",
11391 .ilen = 16,
11392 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
11393 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
11394 .rlen = 16,
11395 }, { /* LRW-32-AES 2 */
11396 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11397 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11398 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11399 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11400 .klen = 32,
11401 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11402 "\x00\x00\x00\x00\x00\x00\x00\x02",
11403 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11404 "\x38\x39\x41\x42\x43\x44\x45\x46",
11405 .ilen = 16,
11406 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
11407 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
11408 .rlen = 16,
11409 }, { /* LRW-32-AES 3 */
11410 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11411 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11412 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11413 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11414 .klen = 32,
11415 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11416 "\x00\x00\x00\x02\x00\x00\x00\x00",
11417 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11418 "\x38\x39\x41\x42\x43\x44\x45\x46",
11419 .ilen = 16,
11420 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
11421 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
11422 .rlen = 16,
11423 }, { /* LRW-32-AES 4 */
11424 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11425 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11426 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11427 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11428 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11429 .klen = 40,
11430 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11431 "\x00\x00\x00\x00\x00\x00\x00\x01",
11432 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11433 "\x38\x39\x41\x42\x43\x44\x45\x46",
11434 .ilen = 16,
11435 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
11436 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
11437 .rlen = 16,
11438 }, { /* LRW-32-AES 5 */
11439 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11440 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11441 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11442 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11443 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11444 .klen = 40,
11445 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11446 "\x00\x00\x00\x02\x00\x00\x00\x00",
11447 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11448 "\x38\x39\x41\x42\x43\x44\x45\x46",
11449 .ilen = 16,
11450 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
11451 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
11452 .rlen = 16,
11453 }, { /* LRW-32-AES 6 */
11454 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11455 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11456 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11457 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11458 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11459 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11460 .klen = 48,
11461 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11462 "\x00\x00\x00\x00\x00\x00\x00\x01",
11463 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11464 "\x38\x39\x41\x42\x43\x44\x45\x46",
11465 .ilen = 16,
11466 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
11467 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
11468 .rlen = 16,
11469 }, { /* LRW-32-AES 7 */
11470 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11471 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11472 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11473 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11474 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11475 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11476 .klen = 48,
11477 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11478 "\x00\x00\x00\x02\x00\x00\x00\x00",
11479 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11480 "\x38\x39\x41\x42\x43\x44\x45\x46",
11481 .ilen = 16,
11482 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
11483 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
11484 .rlen = 16,
11485 }, {
11486/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
11487 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11488 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11489 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11490 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11491 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11492 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11493 .klen = 48,
11494 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11495 "\x00\x00\x00\x00\x00\x00\x00\x01",
11496 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11497 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11498 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11499 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11500 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11501 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11502 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11503 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11504 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11505 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11506 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11507 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11508 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11509 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11510 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11511 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11512 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11513 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11514 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11515 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11516 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11517 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11518 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11519 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11520 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11521 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11522 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11523 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11524 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11525 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11526 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11527 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11528 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11529 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11530 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11531 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11532 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11533 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11534 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11535 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11536 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11537 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11538 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11539 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11540 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11541 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11542 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11543 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11544 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11545 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11546 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11547 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11548 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11549 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11550 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11551 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11552 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11553 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11554 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11555 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11556 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11557 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11558 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11559 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11560 .ilen = 512,
11561 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
11562 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
11563 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
11564 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
11565 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
11566 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
11567 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
11568 "\xe8\x58\x46\x97\x39\x51\x07\xde"
11569 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
11570 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
11571 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
11572 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
11573 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
11574 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
11575 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
11576 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
11577 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
11578 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
11579 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
11580 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
11581 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
11582 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
11583 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
11584 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
11585 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
11586 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
11587 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
11588 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
11589 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
11590 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
11591 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
11592 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
11593 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
11594 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
11595 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
11596 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
11597 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
11598 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
11599 "\xb8\x79\x78\x97\x94\xff\x72\x13"
11600 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
11601 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
11602 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
11603 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
11604 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
11605 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
11606 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
11607 "\x1e\x86\x53\x11\x53\x94\x00\xee"
11608 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
11609 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
11610 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
11611 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
11612 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
11613 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
11614 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
11615 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
11616 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
11617 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
11618 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
11619 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
11620 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
11621 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
11622 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
11623 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
11624 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
11625 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011626 .also_non_np = 1,
11627 .np = 2,
11628 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011629 }
11630};
11631
11632static struct cipher_testvec aes_lrw_dec_tv_template[] = {
11633 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
11634 /* same as enc vectors with input and result reversed */
11635 { /* LRW-32-AES 1 */
11636 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11637 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11638 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11639 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11640 .klen = 32,
11641 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11642 "\x00\x00\x00\x00\x00\x00\x00\x01",
11643 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
11644 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
11645 .ilen = 16,
11646 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11647 "\x38\x39\x41\x42\x43\x44\x45\x46",
11648 .rlen = 16,
11649 }, { /* LRW-32-AES 2 */
11650 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11651 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11652 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11653 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11654 .klen = 32,
11655 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11656 "\x00\x00\x00\x00\x00\x00\x00\x02",
11657 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
11658 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
11659 .ilen = 16,
11660 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11661 "\x38\x39\x41\x42\x43\x44\x45\x46",
11662 .rlen = 16,
11663 }, { /* LRW-32-AES 3 */
11664 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11665 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11666 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11667 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11668 .klen = 32,
11669 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11670 "\x00\x00\x00\x02\x00\x00\x00\x00",
11671 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
11672 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
11673 .ilen = 16,
11674 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11675 "\x38\x39\x41\x42\x43\x44\x45\x46",
11676 .rlen = 16,
11677 }, { /* LRW-32-AES 4 */
11678 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11679 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11680 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11681 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11682 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11683 .klen = 40,
11684 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11685 "\x00\x00\x00\x00\x00\x00\x00\x01",
11686 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
11687 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
11688 .ilen = 16,
11689 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11690 "\x38\x39\x41\x42\x43\x44\x45\x46",
11691 .rlen = 16,
11692 }, { /* LRW-32-AES 5 */
11693 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11694 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11695 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11696 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11697 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11698 .klen = 40,
11699 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11700 "\x00\x00\x00\x02\x00\x00\x00\x00",
11701 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
11702 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
11703 .ilen = 16,
11704 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11705 "\x38\x39\x41\x42\x43\x44\x45\x46",
11706 .rlen = 16,
11707 }, { /* LRW-32-AES 6 */
11708 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11709 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11710 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11711 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11712 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11713 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11714 .klen = 48,
11715 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11716 "\x00\x00\x00\x00\x00\x00\x00\x01",
11717 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
11718 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
11719 .ilen = 16,
11720 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11721 "\x38\x39\x41\x42\x43\x44\x45\x46",
11722 .rlen = 16,
11723 }, { /* LRW-32-AES 7 */
11724 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11725 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11726 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11727 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11728 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11729 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11730 .klen = 48,
11731 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11732 "\x00\x00\x00\x02\x00\x00\x00\x00",
11733 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
11734 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
11735 .ilen = 16,
11736 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11737 "\x38\x39\x41\x42\x43\x44\x45\x46",
11738 .rlen = 16,
11739 }, {
11740/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
11741 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11742 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11743 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11744 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11745 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11746 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11747 .klen = 48,
11748 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11749 "\x00\x00\x00\x00\x00\x00\x00\x01",
11750 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
11751 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
11752 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
11753 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
11754 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
11755 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
11756 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
11757 "\xe8\x58\x46\x97\x39\x51\x07\xde"
11758 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
11759 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
11760 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
11761 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
11762 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
11763 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
11764 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
11765 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
11766 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
11767 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
11768 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
11769 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
11770 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
11771 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
11772 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
11773 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
11774 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
11775 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
11776 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
11777 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
11778 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
11779 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
11780 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
11781 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
11782 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
11783 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
11784 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
11785 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
11786 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
11787 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
11788 "\xb8\x79\x78\x97\x94\xff\x72\x13"
11789 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
11790 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
11791 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
11792 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
11793 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
11794 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
11795 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
11796 "\x1e\x86\x53\x11\x53\x94\x00\xee"
11797 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
11798 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
11799 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
11800 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
11801 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
11802 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
11803 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
11804 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
11805 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
11806 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
11807 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
11808 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
11809 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
11810 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
11811 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
11812 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
11813 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
11814 .ilen = 512,
11815 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11816 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11817 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11818 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11819 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11820 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11821 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11822 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11823 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11824 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11825 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11826 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11827 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11828 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11829 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11830 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11831 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11832 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11833 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11834 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11835 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11836 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11837 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11838 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11839 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11840 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11841 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11842 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11843 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11844 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11845 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11846 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11847 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11848 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11849 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11850 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11851 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11852 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11853 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11854 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11855 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11856 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11857 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11858 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11859 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11860 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11861 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11862 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11863 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11864 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11865 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11866 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11867 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11868 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11869 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11870 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11871 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11872 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11873 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11874 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11875 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11876 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11877 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11878 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11879 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011880 .also_non_np = 1,
11881 .np = 2,
11882 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011883 }
11884};
11885
11886static struct cipher_testvec aes_xts_enc_tv_template[] = {
11887 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
11888 { /* XTS-AES 1 */
11889 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11890 "\x00\x00\x00\x00\x00\x00\x00\x00"
11891 "\x00\x00\x00\x00\x00\x00\x00\x00"
11892 "\x00\x00\x00\x00\x00\x00\x00\x00",
11893 .klen = 32,
11894 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11895 "\x00\x00\x00\x00\x00\x00\x00\x00",
11896 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11897 "\x00\x00\x00\x00\x00\x00\x00\x00"
11898 "\x00\x00\x00\x00\x00\x00\x00\x00"
11899 "\x00\x00\x00\x00\x00\x00\x00\x00",
11900 .ilen = 32,
11901 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
11902 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
11903 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
11904 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
11905 .rlen = 32,
11906 }, { /* XTS-AES 2 */
11907 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11908 "\x11\x11\x11\x11\x11\x11\x11\x11"
11909 "\x22\x22\x22\x22\x22\x22\x22\x22"
11910 "\x22\x22\x22\x22\x22\x22\x22\x22",
11911 .klen = 32,
11912 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11913 "\x00\x00\x00\x00\x00\x00\x00\x00",
11914 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11915 "\x44\x44\x44\x44\x44\x44\x44\x44"
11916 "\x44\x44\x44\x44\x44\x44\x44\x44"
11917 "\x44\x44\x44\x44\x44\x44\x44\x44",
11918 .ilen = 32,
11919 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
11920 "\x39\x33\x40\x38\xac\xef\x83\x8b"
11921 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
11922 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
11923 .rlen = 32,
11924 }, { /* XTS-AES 3 */
11925 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11926 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11927 "\x22\x22\x22\x22\x22\x22\x22\x22"
11928 "\x22\x22\x22\x22\x22\x22\x22\x22",
11929 .klen = 32,
11930 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11931 "\x00\x00\x00\x00\x00\x00\x00\x00",
11932 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11933 "\x44\x44\x44\x44\x44\x44\x44\x44"
11934 "\x44\x44\x44\x44\x44\x44\x44\x44"
11935 "\x44\x44\x44\x44\x44\x44\x44\x44",
11936 .ilen = 32,
11937 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
11938 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
11939 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
11940 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
11941 .rlen = 32,
11942 }, { /* XTS-AES 4 */
11943 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11944 "\x23\x53\x60\x28\x74\x71\x35\x26"
11945 "\x31\x41\x59\x26\x53\x58\x97\x93"
11946 "\x23\x84\x62\x64\x33\x83\x27\x95",
11947 .klen = 32,
11948 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11949 "\x00\x00\x00\x00\x00\x00\x00\x00",
11950 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11952 "\x10\x11\x12\x13\x14\x15\x16\x17"
11953 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11954 "\x20\x21\x22\x23\x24\x25\x26\x27"
11955 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11956 "\x30\x31\x32\x33\x34\x35\x36\x37"
11957 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11958 "\x40\x41\x42\x43\x44\x45\x46\x47"
11959 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11960 "\x50\x51\x52\x53\x54\x55\x56\x57"
11961 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11962 "\x60\x61\x62\x63\x64\x65\x66\x67"
11963 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11964 "\x70\x71\x72\x73\x74\x75\x76\x77"
11965 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11966 "\x80\x81\x82\x83\x84\x85\x86\x87"
11967 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11968 "\x90\x91\x92\x93\x94\x95\x96\x97"
11969 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11970 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11971 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11972 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11973 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11974 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11975 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11976 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11977 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11978 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11979 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11980 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11981 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11982 "\x00\x01\x02\x03\x04\x05\x06\x07"
11983 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11984 "\x10\x11\x12\x13\x14\x15\x16\x17"
11985 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11986 "\x20\x21\x22\x23\x24\x25\x26\x27"
11987 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11988 "\x30\x31\x32\x33\x34\x35\x36\x37"
11989 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11990 "\x40\x41\x42\x43\x44\x45\x46\x47"
11991 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11992 "\x50\x51\x52\x53\x54\x55\x56\x57"
11993 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11994 "\x60\x61\x62\x63\x64\x65\x66\x67"
11995 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11996 "\x70\x71\x72\x73\x74\x75\x76\x77"
11997 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11998 "\x80\x81\x82\x83\x84\x85\x86\x87"
11999 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12000 "\x90\x91\x92\x93\x94\x95\x96\x97"
12001 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12002 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12003 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12004 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12005 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12006 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12007 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12008 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12009 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12010 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12011 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12012 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12013 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12014 .ilen = 512,
12015 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
12016 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
12017 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
12018 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
12019 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
12020 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
12021 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
12022 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
12023 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
12024 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
12025 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
12026 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
12027 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
12028 "\x22\x97\x61\x46\xae\x20\xce\x84"
12029 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
12030 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
12031 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
12032 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
12033 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
12034 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
12035 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
12036 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
12037 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
12038 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
12039 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
12040 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
12041 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
12042 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
12043 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
12044 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
12045 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
12046 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
12047 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
12048 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
12049 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
12050 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
12051 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
12052 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
12053 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
12054 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
12055 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
12056 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
12057 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
12058 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
12059 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
12060 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
12061 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
12062 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
12063 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
12064 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
12065 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
12066 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
12067 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
12068 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
12069 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
12070 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
12071 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
12072 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
12073 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
12074 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
12075 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
12076 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
12077 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
12078 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
12079 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100012080 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
12081 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12082 "\x23\x53\x60\x28\x74\x71\x35\x26"
12083 "\x62\x49\x77\x57\x24\x70\x93\x69"
12084 "\x99\x59\x57\x49\x66\x96\x76\x27"
12085 "\x31\x41\x59\x26\x53\x58\x97\x93"
12086 "\x23\x84\x62\x64\x33\x83\x27\x95"
12087 "\x02\x88\x41\x97\x16\x93\x99\x37"
12088 "\x51\x05\x82\x09\x74\x94\x45\x92",
12089 .klen = 64,
12090 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12091 "\x00\x00\x00\x00\x00\x00\x00\x00",
12092 "\x00\x00\x00\x00\x00\x00\x00\x00",
12093 "\x00\x00\x00\x00\x00\x00\x00\x00",
12094 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12095 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12096 "\x10\x11\x12\x13\x14\x15\x16\x17"
12097 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12098 "\x20\x21\x22\x23\x24\x25\x26\x27"
12099 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12100 "\x30\x31\x32\x33\x34\x35\x36\x37"
12101 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12102 "\x40\x41\x42\x43\x44\x45\x46\x47"
12103 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12104 "\x50\x51\x52\x53\x54\x55\x56\x57"
12105 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12106 "\x60\x61\x62\x63\x64\x65\x66\x67"
12107 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12108 "\x70\x71\x72\x73\x74\x75\x76\x77"
12109 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12110 "\x80\x81\x82\x83\x84\x85\x86\x87"
12111 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12112 "\x90\x91\x92\x93\x94\x95\x96\x97"
12113 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12114 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12115 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12116 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12117 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12118 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12119 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12120 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12121 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12122 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12123 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12124 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12125 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12126 "\x00\x01\x02\x03\x04\x05\x06\x07"
12127 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12128 "\x10\x11\x12\x13\x14\x15\x16\x17"
12129 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12130 "\x20\x21\x22\x23\x24\x25\x26\x27"
12131 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12132 "\x30\x31\x32\x33\x34\x35\x36\x37"
12133 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12134 "\x40\x41\x42\x43\x44\x45\x46\x47"
12135 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12136 "\x50\x51\x52\x53\x54\x55\x56\x57"
12137 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12138 "\x60\x61\x62\x63\x64\x65\x66\x67"
12139 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12140 "\x70\x71\x72\x73\x74\x75\x76\x77"
12141 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12142 "\x80\x81\x82\x83\x84\x85\x86\x87"
12143 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12144 "\x90\x91\x92\x93\x94\x95\x96\x97"
12145 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12146 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12147 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12148 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12149 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12150 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12151 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12152 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12153 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12154 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12155 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12156 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12157 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12158 .ilen = 512,
12159 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
12160 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
12161 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
12162 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
12163 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
12164 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
12165 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
12166 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
12167 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
12168 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
12169 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
12170 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
12171 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
12172 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
12173 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
12174 "\x00\x02\x08\x87\x89\x14\x29\xca"
12175 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
12176 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
12177 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
12178 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
12179 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
12180 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
12181 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
12182 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
12183 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
12184 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
12185 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
12186 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
12187 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
12188 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
12189 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
12190 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
12191 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
12192 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
12193 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
12194 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
12195 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
12196 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
12197 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
12198 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
12199 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
12200 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
12201 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
12202 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
12203 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
12204 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
12205 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
12206 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
12207 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
12208 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
12209 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
12210 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
12211 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
12212 "\x94\x30\x54\xff\x84\x01\x14\x93"
12213 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
12214 "\x53\x76\x44\x1a\x77\xed\x43\x85"
12215 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
12216 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
12217 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
12218 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
12219 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
12220 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
12221 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
12222 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
12223 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012224 .also_non_np = 1,
12225 .np = 2,
12226 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012227 }
12228};
12229
12230static struct cipher_testvec aes_xts_dec_tv_template[] = {
12231 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
12232 { /* XTS-AES 1 */
12233 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12234 "\x00\x00\x00\x00\x00\x00\x00\x00"
12235 "\x00\x00\x00\x00\x00\x00\x00\x00"
12236 "\x00\x00\x00\x00\x00\x00\x00\x00",
12237 .klen = 32,
12238 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12239 "\x00\x00\x00\x00\x00\x00\x00\x00",
12240 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
12241 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
12242 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
12243 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
12244 .ilen = 32,
12245 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12246 "\x00\x00\x00\x00\x00\x00\x00\x00"
12247 "\x00\x00\x00\x00\x00\x00\x00\x00"
12248 "\x00\x00\x00\x00\x00\x00\x00\x00",
12249 .rlen = 32,
12250 }, { /* XTS-AES 2 */
12251 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12252 "\x11\x11\x11\x11\x11\x11\x11\x11"
12253 "\x22\x22\x22\x22\x22\x22\x22\x22"
12254 "\x22\x22\x22\x22\x22\x22\x22\x22",
12255 .klen = 32,
12256 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12257 "\x00\x00\x00\x00\x00\x00\x00\x00",
12258 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
12259 "\x39\x33\x40\x38\xac\xef\x83\x8b"
12260 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
12261 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
12262 .ilen = 32,
12263 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12264 "\x44\x44\x44\x44\x44\x44\x44\x44"
12265 "\x44\x44\x44\x44\x44\x44\x44\x44"
12266 "\x44\x44\x44\x44\x44\x44\x44\x44",
12267 .rlen = 32,
12268 }, { /* XTS-AES 3 */
12269 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12270 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12271 "\x22\x22\x22\x22\x22\x22\x22\x22"
12272 "\x22\x22\x22\x22\x22\x22\x22\x22",
12273 .klen = 32,
12274 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12275 "\x00\x00\x00\x00\x00\x00\x00\x00",
12276 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
12277 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
12278 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
12279 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
12280 .ilen = 32,
12281 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12282 "\x44\x44\x44\x44\x44\x44\x44\x44"
12283 "\x44\x44\x44\x44\x44\x44\x44\x44"
12284 "\x44\x44\x44\x44\x44\x44\x44\x44",
12285 .rlen = 32,
12286 }, { /* XTS-AES 4 */
12287 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12288 "\x23\x53\x60\x28\x74\x71\x35\x26"
12289 "\x31\x41\x59\x26\x53\x58\x97\x93"
12290 "\x23\x84\x62\x64\x33\x83\x27\x95",
12291 .klen = 32,
12292 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12293 "\x00\x00\x00\x00\x00\x00\x00\x00",
12294 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
12295 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
12296 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
12297 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
12298 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
12299 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
12300 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
12301 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
12302 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
12303 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
12304 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
12305 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
12306 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
12307 "\x22\x97\x61\x46\xae\x20\xce\x84"
12308 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
12309 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
12310 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
12311 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
12312 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
12313 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
12314 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
12315 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
12316 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
12317 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
12318 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
12319 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
12320 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
12321 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
12322 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
12323 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
12324 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
12325 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
12326 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
12327 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
12328 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
12329 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
12330 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
12331 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
12332 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
12333 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
12334 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
12335 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
12336 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
12337 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
12338 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
12339 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
12340 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
12341 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
12342 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
12343 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
12344 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
12345 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
12346 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
12347 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
12348 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
12349 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
12350 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
12351 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
12352 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
12353 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
12354 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
12355 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
12356 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
12357 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
12358 .ilen = 512,
12359 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12360 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12361 "\x10\x11\x12\x13\x14\x15\x16\x17"
12362 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12363 "\x20\x21\x22\x23\x24\x25\x26\x27"
12364 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12365 "\x30\x31\x32\x33\x34\x35\x36\x37"
12366 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12367 "\x40\x41\x42\x43\x44\x45\x46\x47"
12368 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12369 "\x50\x51\x52\x53\x54\x55\x56\x57"
12370 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12371 "\x60\x61\x62\x63\x64\x65\x66\x67"
12372 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12373 "\x70\x71\x72\x73\x74\x75\x76\x77"
12374 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12375 "\x80\x81\x82\x83\x84\x85\x86\x87"
12376 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12377 "\x90\x91\x92\x93\x94\x95\x96\x97"
12378 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12379 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12380 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12381 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12382 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12383 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12384 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12385 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12386 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12387 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12388 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12389 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12390 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12391 "\x00\x01\x02\x03\x04\x05\x06\x07"
12392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12393 "\x10\x11\x12\x13\x14\x15\x16\x17"
12394 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12395 "\x20\x21\x22\x23\x24\x25\x26\x27"
12396 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12397 "\x30\x31\x32\x33\x34\x35\x36\x37"
12398 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12399 "\x40\x41\x42\x43\x44\x45\x46\x47"
12400 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12401 "\x50\x51\x52\x53\x54\x55\x56\x57"
12402 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12403 "\x60\x61\x62\x63\x64\x65\x66\x67"
12404 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12405 "\x70\x71\x72\x73\x74\x75\x76\x77"
12406 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12407 "\x80\x81\x82\x83\x84\x85\x86\x87"
12408 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12409 "\x90\x91\x92\x93\x94\x95\x96\x97"
12410 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12411 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12412 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12413 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12414 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12415 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12416 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12417 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12418 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12419 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12420 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12421 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12422 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12423 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100012424 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
12425 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12426 "\x23\x53\x60\x28\x74\x71\x35\x26"
12427 "\x62\x49\x77\x57\x24\x70\x93\x69"
12428 "\x99\x59\x57\x49\x66\x96\x76\x27"
12429 "\x31\x41\x59\x26\x53\x58\x97\x93"
12430 "\x23\x84\x62\x64\x33\x83\x27\x95"
12431 "\x02\x88\x41\x97\x16\x93\x99\x37"
12432 "\x51\x05\x82\x09\x74\x94\x45\x92",
12433 .klen = 64,
12434 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12435 "\x00\x00\x00\x00\x00\x00\x00\x00",
12436 "\x00\x00\x00\x00\x00\x00\x00\x00",
12437 "\x00\x00\x00\x00\x00\x00\x00\x00",
12438 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
12439 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
12440 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
12441 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
12442 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
12443 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
12444 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
12445 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
12446 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
12447 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
12448 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
12449 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
12450 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
12451 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
12452 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
12453 "\x00\x02\x08\x87\x89\x14\x29\xca"
12454 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
12455 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
12456 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
12457 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
12458 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
12459 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
12460 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
12461 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
12462 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
12463 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
12464 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
12465 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
12466 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
12467 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
12468 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
12469 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
12470 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
12471 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
12472 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
12473 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
12474 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
12475 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
12476 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
12477 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
12478 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
12479 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
12480 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
12481 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
12482 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
12483 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
12484 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
12485 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
12486 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
12487 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
12488 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
12489 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
12490 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
12491 "\x94\x30\x54\xff\x84\x01\x14\x93"
12492 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
12493 "\x53\x76\x44\x1a\x77\xed\x43\x85"
12494 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
12495 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
12496 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
12497 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
12498 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
12499 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
12500 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
12501 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
12502 .ilen = 512,
12503 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12504 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12505 "\x10\x11\x12\x13\x14\x15\x16\x17"
12506 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12507 "\x20\x21\x22\x23\x24\x25\x26\x27"
12508 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12509 "\x30\x31\x32\x33\x34\x35\x36\x37"
12510 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12511 "\x40\x41\x42\x43\x44\x45\x46\x47"
12512 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12513 "\x50\x51\x52\x53\x54\x55\x56\x57"
12514 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12515 "\x60\x61\x62\x63\x64\x65\x66\x67"
12516 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12517 "\x70\x71\x72\x73\x74\x75\x76\x77"
12518 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12519 "\x80\x81\x82\x83\x84\x85\x86\x87"
12520 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12521 "\x90\x91\x92\x93\x94\x95\x96\x97"
12522 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12523 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12524 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12525 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12526 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12527 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12528 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12529 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12530 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12531 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12532 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12533 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12534 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12535 "\x00\x01\x02\x03\x04\x05\x06\x07"
12536 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12537 "\x10\x11\x12\x13\x14\x15\x16\x17"
12538 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12539 "\x20\x21\x22\x23\x24\x25\x26\x27"
12540 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12541 "\x30\x31\x32\x33\x34\x35\x36\x37"
12542 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12543 "\x40\x41\x42\x43\x44\x45\x46\x47"
12544 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12545 "\x50\x51\x52\x53\x54\x55\x56\x57"
12546 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12547 "\x60\x61\x62\x63\x64\x65\x66\x67"
12548 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12549 "\x70\x71\x72\x73\x74\x75\x76\x77"
12550 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12551 "\x80\x81\x82\x83\x84\x85\x86\x87"
12552 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12553 "\x90\x91\x92\x93\x94\x95\x96\x97"
12554 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12555 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12556 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12557 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12558 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12559 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12560 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12561 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12562 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12563 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12564 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12565 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12566 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12567 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012568 .also_non_np = 1,
12569 .np = 2,
12570 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012571 }
12572};
12573
12574
12575static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080012576 { /* From NIST Special Publication 800-38A, Appendix F.5 */
12577 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
12578 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
12579 .klen = 16,
12580 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12581 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12582 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12583 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12584 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12585 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12586 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12587 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12588 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12589 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12590 .ilen = 64,
12591 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
12592 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
12593 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
12594 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
12595 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
12596 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
12597 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
12598 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
12599 .rlen = 64,
12600 }, {
12601 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
12602 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
12603 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
12604 .klen = 24,
12605 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12606 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12607 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12608 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12609 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12610 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12611 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12612 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12613 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12614 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12615 .ilen = 64,
12616 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
12617 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
12618 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
12619 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
12620 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
12621 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
12622 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
12623 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
12624 .rlen = 64,
12625 }, {
12626 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
12627 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
12628 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
12629 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
12630 .klen = 32,
12631 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12632 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12633 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12634 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12635 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12636 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12637 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12638 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12639 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12640 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12641 .ilen = 64,
12642 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
12643 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
12644 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
12645 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
12646 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
12647 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
12648 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
12649 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
12650 .rlen = 64,
12651 }
12652};
12653
12654static struct cipher_testvec aes_ctr_dec_tv_template[] = {
12655 { /* From NIST Special Publication 800-38A, Appendix F.5 */
12656 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
12657 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
12658 .klen = 16,
12659 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12660 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12661 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
12662 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
12663 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
12664 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
12665 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
12666 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
12667 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
12668 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
12669 .ilen = 64,
12670 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12671 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12672 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12673 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12674 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12675 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12676 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12677 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12678 .rlen = 64,
12679 }, {
12680 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
12681 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
12682 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
12683 .klen = 24,
12684 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12685 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12686 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
12687 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
12688 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
12689 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
12690 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
12691 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
12692 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
12693 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
12694 .ilen = 64,
12695 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12696 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12697 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12698 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12699 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12700 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12701 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12702 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12703 .rlen = 64,
12704 }, {
12705 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
12706 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
12707 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
12708 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
12709 .klen = 32,
12710 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12711 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12712 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
12713 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
12714 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
12715 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
12716 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
12717 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
12718 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
12719 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
12720 .ilen = 64,
12721 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
12722 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
12723 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
12724 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
12725 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
12726 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
12727 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
12728 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
12729 .rlen = 64,
12730 }
12731};
12732
12733static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080012734 { /* From RFC 3686 */
12735 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
12736 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
12737 "\x00\x00\x00\x30",
12738 .klen = 20,
12739 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
12740 .input = "Single block msg",
12741 .ilen = 16,
12742 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
12743 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
12744 .rlen = 16,
12745 }, {
12746 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
12747 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
12748 "\x00\x6c\xb6\xdb",
12749 .klen = 20,
12750 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
12751 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12752 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12753 "\x10\x11\x12\x13\x14\x15\x16\x17"
12754 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12755 .ilen = 32,
12756 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
12757 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
12758 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
12759 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
12760 .rlen = 32,
12761 }, {
12762 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
12763 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
12764 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
12765 "\x00\x00\x00\x48",
12766 .klen = 28,
12767 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
12768 .input = "Single block msg",
12769 .ilen = 16,
12770 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
12771 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
12772 .rlen = 16,
12773 }, {
12774 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
12775 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
12776 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
12777 "\x00\x96\xb0\x3b",
12778 .klen = 28,
12779 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
12780 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12781 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12782 "\x10\x11\x12\x13\x14\x15\x16\x17"
12783 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12784 .ilen = 32,
12785 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
12786 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
12787 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
12788 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
12789 .rlen = 32,
12790 }, {
12791 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
12792 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
12793 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
12794 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
12795 "\x00\x00\x00\x60",
12796 .klen = 36,
12797 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
12798 .input = "Single block msg",
12799 .ilen = 16,
12800 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
12801 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
12802 .rlen = 16,
12803 }, {
12804 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
12805 "\x07\x96\x36\x58\x79\xef\xf8\x86"
12806 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
12807 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
12808 "\x00\xfa\xac\x24",
12809 .klen = 36,
12810 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
12811 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12812 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12813 "\x10\x11\x12\x13\x14\x15\x16\x17"
12814 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12815 .ilen = 32,
12816 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
12817 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
12818 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
12819 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
12820 .rlen = 32,
12821 }, {
12822 // generated using Crypto++
12823 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12824 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12825 "\x10\x11\x12\x13\x14\x15\x16\x17"
12826 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12827 "\x00\x00\x00\x00",
12828 .klen = 32 + 4,
12829 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
12830 .input =
12831 "\x00\x01\x02\x03\x04\x05\x06\x07"
12832 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12833 "\x10\x11\x12\x13\x14\x15\x16\x17"
12834 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12835 "\x20\x21\x22\x23\x24\x25\x26\x27"
12836 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12837 "\x30\x31\x32\x33\x34\x35\x36\x37"
12838 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12839 "\x40\x41\x42\x43\x44\x45\x46\x47"
12840 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12841 "\x50\x51\x52\x53\x54\x55\x56\x57"
12842 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12843 "\x60\x61\x62\x63\x64\x65\x66\x67"
12844 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12845 "\x70\x71\x72\x73\x74\x75\x76\x77"
12846 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12847 "\x80\x81\x82\x83\x84\x85\x86\x87"
12848 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12849 "\x90\x91\x92\x93\x94\x95\x96\x97"
12850 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12851 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12852 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12853 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12854 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12855 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12856 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12857 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12858 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12859 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12860 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12861 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12862 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12863 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
12864 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
12865 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
12866 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
12867 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
12868 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
12869 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
12870 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
12871 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
12872 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
12873 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
12874 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
12875 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
12876 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
12877 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
12878 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
12879 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
12880 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
12881 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
12882 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
12883 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
12884 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
12885 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
12886 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
12887 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
12888 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
12889 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
12890 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
12891 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
12892 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
12893 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
12894 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
12895 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
12896 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
12897 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
12898 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
12899 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
12900 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
12901 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
12902 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
12903 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
12904 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
12905 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
12906 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
12907 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
12908 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
12909 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
12910 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
12911 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
12912 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
12913 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
12914 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
12915 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
12916 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
12917 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
12918 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
12919 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
12920 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
12921 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
12922 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
12923 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
12924 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
12925 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
12926 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
12927 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
12928 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
12929 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
12930 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
12931 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
12932 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
12933 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
12934 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
12935 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
12936 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
12937 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
12938 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
12939 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
12940 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
12941 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
12942 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
12943 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
12944 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
12945 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
12946 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
12947 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
12948 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
12949 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
12950 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
12951 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
12952 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
12953 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
12954 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
12955 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
12956 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
12957 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
12958 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
12959 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
12960 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
12961 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
12962 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
12963 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
12964 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
12965 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
12966 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
12967 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
12968 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
12969 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
12970 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
12971 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
12972 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
12973 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
12974 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
12975 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
12976 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
12977 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
12978 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
12979 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
12980 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
12981 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
12982 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
12983 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
12984 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
12985 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
12986 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
12987 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
12988 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
12989 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
12990 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
12991 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
12992 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
12993 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
12994 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
12995 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
12996 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
12997 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
12998 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
12999 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
13000 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
13001 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
13002 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
13003 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
13004 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
13005 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
13006 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
13007 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
13008 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
13009 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
13010 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
13011 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
13012 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
13013 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
13014 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
13015 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
13016 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
13017 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
13018 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
13019 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
13020 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
13021 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
13022 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
13023 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
13024 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
13025 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
13026 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
13027 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
13028 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
13029 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
13030 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
13031 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
13032 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
13033 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
13034 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
13035 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
13036 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
13037 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
13038 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
13039 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
13040 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
13041 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
13042 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
13043 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
13044 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
13045 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
13046 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
13047 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
13048 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
13049 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
13050 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
13051 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
13052 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
13053 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
13054 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
13055 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
13056 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
13057 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
13058 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
13059 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
13060 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
13061 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
13062 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
13063 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
13064 "\x38\x47\x56\x65\x74\x83\x92\xa1"
13065 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
13066 "\x28\x37\x46\x55\x64\x73\x82\x91"
13067 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
13068 "\x18\x27\x36\x45\x54\x63\x72\x81"
13069 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
13070 "\x08\x17\x26\x35\x44\x53\x62\x71"
13071 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
13072 "\xf8\x07\x16\x25\x34\x43\x52\x61"
13073 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
13074 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
13075 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
13076 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
13077 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
13078 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
13079 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
13080 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
13081 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
13082 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
13083 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
13084 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
13085 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
13086 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
13087 "\x00\x11\x22\x33\x44\x55\x66\x77"
13088 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
13089 "\x10\x21\x32\x43\x54\x65\x76\x87"
13090 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
13091 "\x20\x31\x42\x53\x64\x75\x86\x97"
13092 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
13093 "\x30\x41\x52\x63\x74\x85\x96\xa7"
13094 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
13095 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
13096 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
13097 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
13098 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
13099 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
13100 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
13101 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
13102 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
13103 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
13104 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
13105 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
13106 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
13107 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
13108 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
13109 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
13110 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
13111 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
13112 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
13113 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
13114 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
13115 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
13116 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
13117 "\xf0\x01\x12\x23\x34\x45\x56\x67"
13118 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
13119 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
13120 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
13121 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
13122 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
13123 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
13124 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
13125 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
13126 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
13127 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
13128 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
13129 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
13130 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
13131 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
13132 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
13133 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
13134 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
13135 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
13136 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
13137 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
13138 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
13139 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
13140 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
13141 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
13142 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
13143 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
13144 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
13145 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
13146 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
13147 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
13148 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
13149 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
13150 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
13151 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
13152 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
13153 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
13154 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
13155 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
13156 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
13157 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
13158 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
13159 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
13160 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
13161 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
13162 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
13163 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
13164 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
13165 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
13166 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
13167 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
13168 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
13169 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
13170 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
13171 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
13172 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
13173 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
13174 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
13175 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
13176 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
13177 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
13178 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
13179 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
13180 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
13181 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
13182 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
13183 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
13184 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
13185 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
13186 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
13187 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
13188 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
13189 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
13190 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
13191 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
13192 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
13193 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
13194 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
13195 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
13196 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
13197 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
13198 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
13199 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
13200 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
13201 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
13202 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
13203 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
13204 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
13205 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
13206 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
13207 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
13208 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
13209 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
13210 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
13211 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
13212 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
13213 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
13214 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
13215 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
13216 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
13217 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
13218 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
13219 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
13220 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
13221 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
13222 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
13223 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
13224 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
13225 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
13226 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
13227 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
13228 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
13229 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
13230 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
13231 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
13232 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
13233 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
13234 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
13235 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
13236 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
13237 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
13238 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
13239 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
13240 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
13241 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
13242 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
13243 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
13244 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
13245 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
13246 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
13247 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
13248 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
13249 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
13250 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
13251 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
13252 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
13253 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
13254 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
13255 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
13256 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
13257 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
13258 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
13259 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
13260 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
13261 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
13262 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
13263 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
13264 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
13265 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
13266 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
13267 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
13268 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
13269 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
13270 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
13271 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
13272 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
13273 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
13274 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
13275 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
13276 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
13277 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
13278 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
13279 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
13280 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
13281 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
13282 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
13283 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
13284 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
13285 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
13286 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
13287 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
13288 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
13289 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
13290 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
13291 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
13292 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
13293 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
13294 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
13295 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
13296 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
13297 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
13298 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
13299 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
13300 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
13301 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
13302 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
13303 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
13304 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
13305 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
13306 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
13307 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
13308 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
13309 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
13310 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
13311 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
13312 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
13313 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
13314 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
13315 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
13316 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
13317 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
13318 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
13319 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
13320 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
13321 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
13322 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
13323 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
13324 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
13325 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
13326 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
13327 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
13328 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
13329 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
13330 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
13331 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
13332 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
13333 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
13334 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
13335 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
13336 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
13337 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
13338 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
13339 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
13340 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
13341 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
13342 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
13343 "\x00\x21\x42\x63",
13344 .ilen = 4100,
13345 .result =
13346 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
13347 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
13348 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
13349 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
13350 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
13351 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
13352 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
13353 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
13354 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
13355 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
13356 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
13357 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
13358 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
13359 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
13360 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
13361 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
13362 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
13363 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
13364 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
13365 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
13366 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
13367 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
13368 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
13369 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
13370 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
13371 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
13372 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
13373 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
13374 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
13375 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
13376 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
13377 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
13378 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
13379 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
13380 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
13381 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
13382 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
13383 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
13384 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
13385 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
13386 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
13387 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
13388 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
13389 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
13390 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
13391 "\x04\x02\xef\xd3\x44\xde\x76\x31"
13392 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
13393 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
13394 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
13395 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
13396 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
13397 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
13398 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
13399 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
13400 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
13401 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
13402 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
13403 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
13404 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
13405 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
13406 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
13407 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
13408 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
13409 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
13410 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
13411 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
13412 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
13413 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
13414 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
13415 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
13416 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
13417 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
13418 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
13419 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
13420 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
13421 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
13422 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
13423 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
13424 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
13425 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
13426 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
13427 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
13428 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
13429 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
13430 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
13431 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
13432 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
13433 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
13434 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
13435 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
13436 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
13437 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
13438 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
13439 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
13440 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
13441 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
13442 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
13443 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
13444 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
13445 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
13446 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
13447 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
13448 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
13449 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
13450 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
13451 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
13452 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
13453 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
13454 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
13455 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
13456 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
13457 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
13458 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
13459 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
13460 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
13461 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
13462 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
13463 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
13464 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
13465 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
13466 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
13467 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
13468 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
13469 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
13470 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
13471 "\x26\x39\x83\x94\xef\x27\xd8\x53"
13472 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
13473 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
13474 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
13475 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
13476 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
13477 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
13478 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
13479 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
13480 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
13481 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
13482 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
13483 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
13484 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
13485 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
13486 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
13487 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
13488 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
13489 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
13490 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
13491 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
13492 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
13493 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
13494 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
13495 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
13496 "\x35\x12\xe3\x36\x28\x27\x36\x58"
13497 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
13498 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
13499 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
13500 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
13501 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
13502 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
13503 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
13504 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
13505 "\x89\xf3\x78\x35\x44\x62\x78\x72"
13506 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
13507 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
13508 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
13509 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
13510 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
13511 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
13512 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
13513 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
13514 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
13515 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
13516 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
13517 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
13518 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
13519 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
13520 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
13521 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
13522 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
13523 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
13524 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
13525 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
13526 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
13527 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
13528 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
13529 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
13530 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
13531 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
13532 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
13533 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
13534 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
13535 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
13536 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
13537 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
13538 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
13539 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
13540 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
13541 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
13542 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
13543 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
13544 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
13545 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
13546 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
13547 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
13548 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
13549 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
13550 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
13551 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
13552 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
13553 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
13554 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
13555 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
13556 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
13557 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
13558 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
13559 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
13560 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
13561 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
13562 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
13563 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
13564 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
13565 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
13566 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
13567 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
13568 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
13569 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
13570 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
13571 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
13572 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
13573 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
13574 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
13575 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
13576 "\x29\x90\x46\x30\x92\x69\x7d\x13"
13577 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
13578 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
13579 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
13580 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
13581 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
13582 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
13583 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
13584 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
13585 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
13586 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
13587 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
13588 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
13589 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
13590 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
13591 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
13592 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
13593 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
13594 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
13595 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
13596 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
13597 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
13598 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
13599 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
13600 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
13601 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
13602 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
13603 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
13604 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
13605 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
13606 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
13607 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
13608 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
13609 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
13610 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
13611 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
13612 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
13613 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
13614 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
13615 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
13616 "\x73\x02\x3b\x78\x21\x72\x43\x00"
13617 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
13618 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
13619 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
13620 "\x11\x94\x13\x69\x51\x09\x28\xde"
13621 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
13622 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
13623 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
13624 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
13625 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
13626 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
13627 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
13628 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
13629 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
13630 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
13631 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
13632 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
13633 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
13634 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
13635 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
13636 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
13637 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
13638 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
13639 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
13640 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
13641 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
13642 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
13643 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
13644 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
13645 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
13646 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
13647 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
13648 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
13649 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
13650 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
13651 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
13652 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
13653 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
13654 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
13655 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
13656 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
13657 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
13658 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
13659 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
13660 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
13661 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
13662 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
13663 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
13664 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
13665 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
13666 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
13667 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
13668 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
13669 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
13670 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
13671 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
13672 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
13673 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
13674 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
13675 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
13676 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
13677 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
13678 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
13679 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
13680 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
13681 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
13682 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
13683 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
13684 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
13685 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
13686 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
13687 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
13688 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
13689 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
13690 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
13691 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
13692 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
13693 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
13694 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
13695 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
13696 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
13697 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
13698 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
13699 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
13700 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
13701 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
13702 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
13703 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
13704 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
13705 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
13706 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
13707 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
13708 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
13709 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
13710 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
13711 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
13712 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
13713 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
13714 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
13715 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
13716 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
13717 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
13718 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
13719 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
13720 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
13721 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
13722 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
13723 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
13724 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
13725 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
13726 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
13727 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
13728 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
13729 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
13730 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
13731 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
13732 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
13733 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
13734 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
13735 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
13736 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
13737 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
13738 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
13739 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
13740 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
13741 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
13742 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
13743 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
13744 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
13745 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
13746 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
13747 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
13748 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
13749 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
13750 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
13751 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
13752 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
13753 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
13754 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
13755 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
13756 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
13757 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
13758 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
13759 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
13760 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
13761 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
13762 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
13763 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
13764 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
13765 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
13766 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
13767 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
13768 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
13769 "\xae\xed\x39\x88\x42\x11\x3c\xed"
13770 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
13771 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
13772 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
13773 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
13774 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
13775 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
13776 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
13777 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
13778 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
13779 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
13780 "\x34\x17\xde\xba\x47\xf1\x06\x18"
13781 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
13782 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
13783 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
13784 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
13785 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
13786 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
13787 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
13788 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
13789 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
13790 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
13791 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
13792 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
13793 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
13794 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
13795 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
13796 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
13797 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
13798 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
13799 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
13800 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
13801 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
13802 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
13803 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
13804 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
13805 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
13806 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
13807 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
13808 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
13809 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
13810 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
13811 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
13812 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
13813 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
13814 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
13815 "\x74\x56\x58\x40\x02\x37\x52\x2c"
13816 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
13817 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
13818 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
13819 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
13820 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
13821 "\xed\x38\x80\x36\x72\x43\x27\x49"
13822 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
13823 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
13824 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
13825 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
13826 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
13827 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
13828 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
13829 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
13830 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
13831 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
13832 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
13833 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
13834 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
13835 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
13836 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
13837 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
13838 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
13839 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
13840 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
13841 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
13842 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
13843 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
13844 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
13845 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
13846 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
13847 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
13848 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
13849 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
13850 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
13851 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
13852 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
13853 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
13854 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
13855 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
13856 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
13857 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
13858 "\x21\xed\xda\x86",
13859 .rlen = 4100,
13860 .np = 2,
13861 .tap = { 4064, 36 },
13862 },
13863};
13864
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080013865static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080013866 { /* From RFC 3686 */
13867 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
13868 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
13869 "\x00\x00\x00\x30",
13870 .klen = 20,
13871 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
13872 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
13873 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
13874 .ilen = 16,
13875 .result = "Single block msg",
13876 .rlen = 16,
13877 }, {
13878 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
13879 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
13880 "\x00\x6c\xb6\xdb",
13881 .klen = 20,
13882 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
13883 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
13884 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
13885 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
13886 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
13887 .ilen = 32,
13888 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13889 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13890 "\x10\x11\x12\x13\x14\x15\x16\x17"
13891 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13892 .rlen = 32,
13893 }, {
13894 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
13895 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
13896 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
13897 "\x00\x00\x00\x48",
13898 .klen = 28,
13899 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
13900 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
13901 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
13902 .ilen = 16,
13903 .result = "Single block msg",
13904 .rlen = 16,
13905 }, {
13906 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
13907 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
13908 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
13909 "\x00\x96\xb0\x3b",
13910 .klen = 28,
13911 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
13912 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
13913 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
13914 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
13915 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
13916 .ilen = 32,
13917 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13918 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13919 "\x10\x11\x12\x13\x14\x15\x16\x17"
13920 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13921 .rlen = 32,
13922 }, {
13923 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
13924 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
13925 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
13926 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
13927 "\x00\x00\x00\x60",
13928 .klen = 36,
13929 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
13930 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
13931 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
13932 .ilen = 16,
13933 .result = "Single block msg",
13934 .rlen = 16,
13935 }, {
13936 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
13937 "\x07\x96\x36\x58\x79\xef\xf8\x86"
13938 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
13939 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
13940 "\x00\xfa\xac\x24",
13941 .klen = 36,
13942 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
13943 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
13944 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
13945 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
13946 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
13947 .ilen = 32,
13948 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13949 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13950 "\x10\x11\x12\x13\x14\x15\x16\x17"
13951 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13952 .rlen = 32,
13953 },
13954};
13955
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100013956static struct cipher_testvec aes_ofb_enc_tv_template[] = {
13957 /* From NIST Special Publication 800-38A, Appendix F.5 */
13958 {
13959 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13960 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13961 .klen = 16,
13962 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13963 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13964 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13965 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13966 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13967 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13968 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13969 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13970 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13971 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13972 .ilen = 64,
13973 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13974 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13975 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13976 "\x3c\x52\xda\xc5\x4e\xd8\x25"
13977 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13978 "\x44\xf7\xa8\x22\x60\xed\xcc"
13979 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
13980 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
13981 .rlen = 64,
13982 }
13983};
13984
13985static struct cipher_testvec aes_ofb_dec_tv_template[] = {
13986 /* From NIST Special Publication 800-38A, Appendix F.5 */
13987 {
13988 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13989 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13990 .klen = 16,
13991 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13992 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13993 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13994 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13995 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13996 "\x3c\x52\xda\xc5\x4e\xd8\x25"
13997 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13998 "\x44\xf7\xa8\x22\x60\xed\xcc"
13999 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
14000 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
14001 .ilen = 64,
14002 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14003 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14004 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14005 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14006 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14007 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14008 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14009 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14010 .rlen = 64,
14011 }
14012};
14013
Herbert Xuda7f0332008-07-31 17:08:25 +080014014static struct aead_testvec aes_gcm_enc_tv_template[] = {
14015 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
14016 .key = zeroed_string,
14017 .klen = 16,
14018 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
14019 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
14020 .rlen = 16,
14021 }, {
14022 .key = zeroed_string,
14023 .klen = 16,
14024 .input = zeroed_string,
14025 .ilen = 16,
14026 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
14027 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
14028 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
14029 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
14030 .rlen = 32,
14031 }, {
14032 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14033 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14034 .klen = 16,
14035 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14036 "\xde\xca\xf8\x88",
14037 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14038 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14039 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14040 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14041 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14042 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14043 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14044 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
14045 .ilen = 64,
14046 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
14047 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
14048 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
14049 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
14050 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
14051 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
14052 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
14053 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
14054 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
14055 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
14056 .rlen = 80,
14057 }, {
14058 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14059 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14060 .klen = 16,
14061 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14062 "\xde\xca\xf8\x88",
14063 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14064 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14065 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14066 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14067 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14068 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14069 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14070 "\xba\x63\x7b\x39",
14071 .ilen = 60,
14072 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14073 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14074 "\xab\xad\xda\xd2",
14075 .alen = 20,
14076 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
14077 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
14078 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
14079 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
14080 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
14081 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
14082 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
14083 "\x3d\x58\xe0\x91"
14084 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
14085 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
14086 .rlen = 76,
14087 }, {
14088 .key = zeroed_string,
14089 .klen = 24,
14090 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
14091 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
14092 .rlen = 16,
14093 }, {
14094 .key = zeroed_string,
14095 .klen = 24,
14096 .input = zeroed_string,
14097 .ilen = 16,
14098 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
14099 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
14100 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
14101 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
14102 .rlen = 32,
14103 }, {
14104 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14105 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14106 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
14107 .klen = 24,
14108 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14109 "\xde\xca\xf8\x88",
14110 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14111 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14112 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14113 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14114 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14115 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14116 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14117 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
14118 .ilen = 64,
14119 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
14120 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
14121 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
14122 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
14123 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
14124 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
14125 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
14126 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
14127 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
14128 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
14129 .rlen = 80,
14130 }, {
14131 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14132 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14133 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
14134 .klen = 24,
14135 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14136 "\xde\xca\xf8\x88",
14137 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14138 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14139 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14140 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14141 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14142 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14143 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14144 "\xba\x63\x7b\x39",
14145 .ilen = 60,
14146 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14147 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14148 "\xab\xad\xda\xd2",
14149 .alen = 20,
14150 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
14151 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
14152 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
14153 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
14154 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
14155 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
14156 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
14157 "\xcc\xda\x27\x10"
14158 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
14159 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
14160 .rlen = 76,
14161 .np = 2,
14162 .tap = { 32, 28 },
14163 .anp = 2,
14164 .atap = { 8, 12 }
14165 }, {
14166 .key = zeroed_string,
14167 .klen = 32,
14168 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
14169 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
14170 .rlen = 16,
14171 }
14172};
14173
14174static struct aead_testvec aes_gcm_dec_tv_template[] = {
14175 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
14176 .key = zeroed_string,
14177 .klen = 32,
14178 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
14179 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
14180 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
14181 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
14182 .ilen = 32,
14183 .result = zeroed_string,
14184 .rlen = 16,
14185 }, {
14186 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14187 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14188 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14189 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14190 .klen = 32,
14191 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14192 "\xde\xca\xf8\x88",
14193 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
14194 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
14195 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
14196 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
14197 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
14198 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
14199 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
14200 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
14201 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
14202 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
14203 .ilen = 80,
14204 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14205 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14206 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14207 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14208 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14209 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14210 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14211 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
14212 .rlen = 64,
14213 }, {
14214 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14215 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14216 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14217 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14218 .klen = 32,
14219 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14220 "\xde\xca\xf8\x88",
14221 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
14222 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
14223 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
14224 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
14225 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
14226 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
14227 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
14228 "\xbc\xc9\xf6\x62"
14229 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
14230 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
14231 .ilen = 76,
14232 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14233 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14234 "\xab\xad\xda\xd2",
14235 .alen = 20,
14236 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14237 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14238 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14239 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14240 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14241 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14242 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14243 "\xba\x63\x7b\x39",
14244 .rlen = 60,
14245 .np = 2,
14246 .tap = { 48, 28 },
14247 .anp = 3,
14248 .atap = { 8, 8, 4 }
14249 }, {
14250 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14251 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14252 .klen = 16,
14253 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14254 "\xde\xca\xf8\x88",
14255 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
14256 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
14257 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
14258 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
14259 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
14260 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
14261 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
14262 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
14263 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
14264 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
14265 .ilen = 80,
14266 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14267 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14268 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14269 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14270 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14271 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14272 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14273 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
14274 .rlen = 64,
14275 }, {
14276 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14277 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
14278 .klen = 16,
14279 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14280 "\xde\xca\xf8\x88",
14281 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
14282 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
14283 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
14284 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
14285 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
14286 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
14287 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
14288 "\x3d\x58\xe0\x91"
14289 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
14290 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
14291 .ilen = 76,
14292 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14293 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14294 "\xab\xad\xda\xd2",
14295 .alen = 20,
14296 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14297 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14298 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14299 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14300 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14301 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14302 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14303 "\xba\x63\x7b\x39",
14304 .rlen = 60,
14305 }, {
14306 .key = zeroed_string,
14307 .klen = 24,
14308 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
14309 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
14310 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
14311 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
14312 .ilen = 32,
14313 .result = zeroed_string,
14314 .rlen = 16,
14315 }, {
14316 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14317 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14318 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
14319 .klen = 24,
14320 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14321 "\xde\xca\xf8\x88",
14322 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
14323 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
14324 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
14325 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
14326 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
14327 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
14328 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
14329 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
14330 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
14331 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
14332 .ilen = 80,
14333 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14334 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14335 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14336 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14337 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14338 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14339 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14340 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
14341 .rlen = 64,
14342 }, {
14343 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14344 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14345 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
14346 .klen = 24,
14347 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
14348 "\xde\xca\xf8\x88",
14349 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
14350 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
14351 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
14352 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
14353 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
14354 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
14355 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
14356 "\xcc\xda\x27\x10"
14357 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
14358 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
14359 .ilen = 76,
14360 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14361 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
14362 "\xab\xad\xda\xd2",
14363 .alen = 20,
14364 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
14365 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
14366 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
14367 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
14368 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
14369 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
14370 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
14371 "\xba\x63\x7b\x39",
14372 .rlen = 60,
14373 }
14374};
14375
Adrian Hoban69435b92010-11-04 15:02:04 -040014376static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
14377 { /* Generated using Crypto++ */
14378 .key = zeroed_string,
14379 .klen = 20,
14380 .iv = zeroed_string,
14381 .input = zeroed_string,
14382 .ilen = 16,
14383 .assoc = zeroed_string,
14384 .alen = 8,
14385 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
14386 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
14387 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
14388 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
14389 .rlen = 32,
14390 },{
14391 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14392 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14393 "\x00\x00\x00\x00",
14394 .klen = 20,
14395 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14396 "\x00\x00\x00\x00",
14397 .input = zeroed_string,
14398 .ilen = 16,
14399 .assoc = zeroed_string,
14400 .alen = 8,
14401 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
14402 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
14403 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
14404 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
14405 .rlen = 32,
14406
14407 }, {
14408 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14409 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14410 "\x00\x00\x00\x00",
14411 .klen = 20,
14412 .iv = zeroed_string,
14413 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
14414 "\x01\x01\x01\x01\x01\x01\x01\x01",
14415 .ilen = 16,
14416 .assoc = zeroed_string,
14417 .alen = 8,
14418 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
14419 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
14420 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
14421 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
14422 .rlen = 32,
14423 }, {
14424 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14425 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14426 "\x00\x00\x00\x00",
14427 .klen = 20,
14428 .iv = zeroed_string,
14429 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
14430 "\x01\x01\x01\x01\x01\x01\x01\x01",
14431 .ilen = 16,
14432 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14433 .alen = 8,
14434 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
14435 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
14436 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
14437 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
14438 .rlen = 32,
14439 }, {
14440 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14441 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14442 "\x00\x00\x00\x00",
14443 .klen = 20,
14444 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14445 "\x00\x00\x00\x00",
14446 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
14447 "\x01\x01\x01\x01\x01\x01\x01\x01",
14448 .ilen = 16,
14449 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14450 .alen = 8,
14451 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
14452 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
14453 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
14454 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
14455 .rlen = 32,
14456 }, {
14457 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14458 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14459 "\x00\x00\x00\x00",
14460 .klen = 20,
14461 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14462 "\x00\x00\x00\x00",
14463 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
14464 "\x01\x01\x01\x01\x01\x01\x01\x01"
14465 "\x01\x01\x01\x01\x01\x01\x01\x01"
14466 "\x01\x01\x01\x01\x01\x01\x01\x01"
14467 "\x01\x01\x01\x01\x01\x01\x01\x01"
14468 "\x01\x01\x01\x01\x01\x01\x01\x01"
14469 "\x01\x01\x01\x01\x01\x01\x01\x01"
14470 "\x01\x01\x01\x01\x01\x01\x01\x01",
14471 .ilen = 64,
14472 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14473 .alen = 8,
14474 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
14475 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
14476 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
14477 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
14478 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
14479 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
14480 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
14481 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
14482 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
14483 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
14484 .rlen = 80,
14485 }, {
14486 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14487 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14488 "\x00\x00\x00\x00",
14489 .klen = 20,
14490 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
14491 "\x00\x00\x00\x00",
14492 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
14493 "\xff\xff\xff\xff\xff\xff\xff\xff"
14494 "\xff\xff\xff\xff\xff\xff\xff\xff"
14495 "\xff\xff\xff\xff\xff\xff\xff\xff"
14496 "\xff\xff\xff\xff\xff\xff\xff\xff"
14497 "\xff\xff\xff\xff\xff\xff\xff\xff"
14498 "\xff\xff\xff\xff\xff\xff\xff\xff"
14499 "\xff\xff\xff\xff\xff\xff\xff\xff"
14500 "\xff\xff\xff\xff\xff\xff\xff\xff"
14501 "\xff\xff\xff\xff\xff\xff\xff\xff"
14502 "\xff\xff\xff\xff\xff\xff\xff\xff"
14503 "\xff\xff\xff\xff\xff\xff\xff\xff"
14504 "\xff\xff\xff\xff\xff\xff\xff\xff"
14505 "\xff\xff\xff\xff\xff\xff\xff\xff"
14506 "\xff\xff\xff\xff\xff\xff\xff\xff"
14507 "\xff\xff\xff\xff\xff\xff\xff\xff"
14508 "\xff\xff\xff\xff\xff\xff\xff\xff"
14509 "\xff\xff\xff\xff\xff\xff\xff\xff"
14510 "\xff\xff\xff\xff\xff\xff\xff\xff"
14511 "\xff\xff\xff\xff\xff\xff\xff\xff"
14512 "\xff\xff\xff\xff\xff\xff\xff\xff"
14513 "\xff\xff\xff\xff\xff\xff\xff\xff"
14514 "\xff\xff\xff\xff\xff\xff\xff\xff"
14515 "\xff\xff\xff\xff\xff\xff\xff\xff",
14516 .ilen = 192,
14517 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
14518 "\xaa\xaa\xaa\xaa",
14519 .alen = 12,
14520 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
14521 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
14522 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
14523 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
14524 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
14525 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
14526 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
14527 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
14528 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
14529 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
14530 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
14531 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
14532 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
14533 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
14534 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
14535 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
14536 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
14537 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
14538 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
14539 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
14540 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
14541 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
14542 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
14543 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
14544 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
14545 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
14546 .rlen = 208,
14547 }
14548};
14549
14550static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
14551 { /* Generated using Crypto++ */
14552 .key = zeroed_string,
14553 .klen = 20,
14554 .iv = zeroed_string,
14555 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
14556 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
14557 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
14558 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
14559 .ilen = 32,
14560 .assoc = zeroed_string,
14561 .alen = 8,
14562 .result = zeroed_string,
14563 .rlen = 16,
14564
14565 },{
14566 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14567 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14568 "\x00\x00\x00\x00",
14569 .klen = 20,
14570 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14571 "\x00\x00\x00\x00",
14572 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
14573 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
14574 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
14575 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
14576 .ilen = 32,
14577 .assoc = zeroed_string,
14578 .alen = 8,
14579 .result = zeroed_string,
14580 .rlen = 16,
14581 }, {
14582 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14583 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14584 "\x00\x00\x00\x00",
14585 .klen = 20,
14586 .iv = zeroed_string,
14587 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
14588 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
14589 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
14590 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
14591 .ilen = 32,
14592 .assoc = zeroed_string,
14593 .alen = 8,
14594 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
14595 "\x01\x01\x01\x01\x01\x01\x01\x01",
14596 .rlen = 16,
14597 }, {
14598 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14599 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14600 "\x00\x00\x00\x00",
14601 .klen = 20,
14602 .iv = zeroed_string,
14603 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
14604 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
14605 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
14606 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
14607 .ilen = 32,
14608 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14609 .alen = 8,
14610 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
14611 "\x01\x01\x01\x01\x01\x01\x01\x01",
14612 .rlen = 16,
14613
14614 }, {
14615 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14616 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14617 "\x00\x00\x00\x00",
14618 .klen = 20,
14619 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14620 "\x00\x00\x00\x00",
14621 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
14622 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
14623 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
14624 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
14625 .ilen = 32,
14626 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14627 .alen = 8,
14628 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
14629 "\x01\x01\x01\x01\x01\x01\x01\x01",
14630 .rlen = 16,
14631 }, {
14632 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
14633 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
14634 "\x00\x00\x00\x00",
14635 .klen = 20,
14636 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
14637 "\x00\x00\x00\x00",
14638 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
14639 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
14640 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
14641 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
14642 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
14643 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
14644 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
14645 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
14646 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
14647 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
14648 .ilen = 80,
14649 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
14650 .alen = 8,
14651 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
14652 "\x01\x01\x01\x01\x01\x01\x01\x01"
14653 "\x01\x01\x01\x01\x01\x01\x01\x01"
14654 "\x01\x01\x01\x01\x01\x01\x01\x01"
14655 "\x01\x01\x01\x01\x01\x01\x01\x01"
14656 "\x01\x01\x01\x01\x01\x01\x01\x01"
14657 "\x01\x01\x01\x01\x01\x01\x01\x01"
14658 "\x01\x01\x01\x01\x01\x01\x01\x01",
14659 .rlen = 64,
14660 }, {
14661 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14663 "\x00\x00\x00\x00",
14664 .klen = 20,
14665 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
14666 "\x00\x00\x00\x00",
14667 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
14668 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
14669 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
14670 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
14671 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
14672 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
14673 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
14674 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
14675 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
14676 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
14677 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
14678 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
14679 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
14680 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
14681 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
14682 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
14683 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
14684 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
14685 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
14686 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
14687 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
14688 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
14689 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
14690 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
14691 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
14692 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
14693 .ilen = 208,
14694 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
14695 "\xaa\xaa\xaa\xaa",
14696 .alen = 12,
14697 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
14698 "\xff\xff\xff\xff\xff\xff\xff\xff"
14699 "\xff\xff\xff\xff\xff\xff\xff\xff"
14700 "\xff\xff\xff\xff\xff\xff\xff\xff"
14701 "\xff\xff\xff\xff\xff\xff\xff\xff"
14702 "\xff\xff\xff\xff\xff\xff\xff\xff"
14703 "\xff\xff\xff\xff\xff\xff\xff\xff"
14704 "\xff\xff\xff\xff\xff\xff\xff\xff"
14705 "\xff\xff\xff\xff\xff\xff\xff\xff"
14706 "\xff\xff\xff\xff\xff\xff\xff\xff"
14707 "\xff\xff\xff\xff\xff\xff\xff\xff"
14708 "\xff\xff\xff\xff\xff\xff\xff\xff"
14709 "\xff\xff\xff\xff\xff\xff\xff\xff"
14710 "\xff\xff\xff\xff\xff\xff\xff\xff"
14711 "\xff\xff\xff\xff\xff\xff\xff\xff"
14712 "\xff\xff\xff\xff\xff\xff\xff\xff"
14713 "\xff\xff\xff\xff\xff\xff\xff\xff"
14714 "\xff\xff\xff\xff\xff\xff\xff\xff"
14715 "\xff\xff\xff\xff\xff\xff\xff\xff"
14716 "\xff\xff\xff\xff\xff\xff\xff\xff"
14717 "\xff\xff\xff\xff\xff\xff\xff\xff"
14718 "\xff\xff\xff\xff\xff\xff\xff\xff"
14719 "\xff\xff\xff\xff\xff\xff\xff\xff"
14720 "\xff\xff\xff\xff\xff\xff\xff\xff",
14721 .rlen = 192,
14722
14723 }
14724};
14725
Herbert Xuda7f0332008-07-31 17:08:25 +080014726static struct aead_testvec aes_ccm_enc_tv_template[] = {
14727 { /* From RFC 3610 */
14728 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14729 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14730 .klen = 16,
14731 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
14732 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14733 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
14734 .alen = 8,
14735 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14736 "\x10\x11\x12\x13\x14\x15\x16\x17"
14737 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
14738 .ilen = 23,
14739 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
14740 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
14741 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
14742 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
14743 .rlen = 31,
14744 }, {
14745 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14746 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14747 .klen = 16,
14748 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
14749 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14750 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
14751 "\x08\x09\x0a\x0b",
14752 .alen = 12,
14753 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
14754 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
14755 "\x1c\x1d\x1e\x1f",
14756 .ilen = 20,
14757 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
14758 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
14759 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
14760 "\x7d\x9c\x2d\x93",
14761 .rlen = 28,
14762 }, {
14763 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14764 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14765 .klen = 16,
14766 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
14767 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14768 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
14769 .alen = 8,
14770 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14771 "\x10\x11\x12\x13\x14\x15\x16\x17"
14772 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14773 "\x20",
14774 .ilen = 25,
14775 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
14776 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
14777 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
14778 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
14779 "\x7e\x5f\x4e",
14780 .rlen = 35,
14781 }, {
14782 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14783 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14784 .klen = 16,
14785 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
14786 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14787 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
14788 "\x08\x09\x0a\x0b",
14789 .alen = 12,
14790 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
14791 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
14792 "\x1c\x1d\x1e",
14793 .ilen = 19,
14794 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
14795 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
14796 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
14797 "\x4d\x99\x99\x88\xdd",
14798 .rlen = 29,
14799 }, {
14800 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14801 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14802 .klen = 16,
14803 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
14804 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14805 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
14806 .alen = 8,
14807 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
14808 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
14809 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
14810 .ilen = 24,
14811 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
14812 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
14813 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
14814 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
14815 .rlen = 32,
14816 }, {
14817 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14818 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14819 .klen = 16,
14820 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
14821 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14822 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
14823 "\x20\xea\x60\xc0",
14824 .alen = 12,
14825 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
14826 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
14827 "\x3a\x80\x3b\xa8\x7f",
14828 .ilen = 21,
14829 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
14830 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
14831 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
14832 "\x5a\xe0\x70\x45\x51",
14833 .rlen = 29,
14834 }, {
14835 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14836 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14837 .klen = 16,
14838 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
14839 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14840 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
14841 .alen = 8,
14842 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
14843 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
14844 "\x98\x09\xd6\x7d\xbe\xdd\x18",
14845 .ilen = 23,
14846 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
14847 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
14848 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
14849 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
14850 "\xba",
14851 .rlen = 33,
14852 },
14853};
14854
14855static struct aead_testvec aes_ccm_dec_tv_template[] = {
14856 { /* From RFC 3610 */
14857 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14858 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14859 .klen = 16,
14860 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
14861 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14862 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
14863 .alen = 8,
14864 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
14865 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
14866 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
14867 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
14868 .ilen = 31,
14869 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14870 "\x10\x11\x12\x13\x14\x15\x16\x17"
14871 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
14872 .rlen = 23,
14873 }, {
14874 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14875 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14876 .klen = 16,
14877 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
14878 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14879 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
14880 "\x08\x09\x0a\x0b",
14881 .alen = 12,
14882 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
14883 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
14884 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
14885 "\x7d\x9c\x2d\x93",
14886 .ilen = 28,
14887 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
14888 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
14889 "\x1c\x1d\x1e\x1f",
14890 .rlen = 20,
14891 }, {
14892 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14893 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14894 .klen = 16,
14895 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
14896 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14897 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
14898 .alen = 8,
14899 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
14900 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
14901 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
14902 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
14903 "\x7e\x5f\x4e",
14904 .ilen = 35,
14905 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14906 "\x10\x11\x12\x13\x14\x15\x16\x17"
14907 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14908 "\x20",
14909 .rlen = 25,
14910 }, {
14911 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14912 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
14913 .klen = 16,
14914 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
14915 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
14916 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
14917 "\x08\x09\x0a\x0b",
14918 .alen = 12,
14919 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
14920 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
14921 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
14922 "\x4d\x99\x99\x88\xdd",
14923 .ilen = 29,
14924 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
14925 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
14926 "\x1c\x1d\x1e",
14927 .rlen = 19,
14928 }, {
14929 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14930 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14931 .klen = 16,
14932 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
14933 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14934 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
14935 .alen = 8,
14936 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
14937 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
14938 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
14939 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
14940 .ilen = 32,
14941 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
14942 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
14943 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
14944 .rlen = 24,
14945 }, {
14946 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14947 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14948 .klen = 16,
14949 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
14950 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14951 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
14952 "\x20\xea\x60\xc0",
14953 .alen = 12,
14954 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
14955 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
14956 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
14957 "\x5a\xe0\x70\x45\x51",
14958 .ilen = 29,
14959 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
14960 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
14961 "\x3a\x80\x3b\xa8\x7f",
14962 .rlen = 21,
14963 }, {
14964 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14965 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14966 .klen = 16,
14967 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
14968 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14969 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
14970 .alen = 8,
14971 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
14972 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
14973 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
14974 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
14975 "\xba",
14976 .ilen = 33,
14977 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
14978 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
14979 "\x98\x09\xd6\x7d\xbe\xdd\x18",
14980 .rlen = 23,
14981 },
14982};
14983
Jarod Wilson5d667322009-05-04 19:23:40 +080014984/*
14985 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
14986 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
14987 * Special Publication 800-38C's test vectors also use nonce lengths our
14988 * implementation doesn't support. The following are taken from fips cavs
14989 * fax files on hand at Red Hat.
14990 *
14991 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
14992 * part of the nonce which combine w/the iv, but need to be input this way.
14993 */
14994static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
14995 {
14996 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
14997 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
14998 "\x96\xac\x59",
14999 .klen = 19,
15000 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
15001 .alen = 0,
15002 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
15003 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
15004 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
15005 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
15006 .ilen = 32,
15007 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
15008 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
15009 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
15010 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
15011 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
15012 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
15013 .rlen = 48,
15014 }, {
15015 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
15016 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
15017 "\x4f\xa3\x19",
15018 .klen = 19,
15019 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
15020 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
15021 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
15022 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
15023 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
15024 .alen = 32,
15025 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
15026 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
15027 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
15028 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
15029 .ilen = 32,
15030 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
15031 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
15032 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
15033 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
15034 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
15035 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
15036 .rlen = 48,
15037 }, {
15038 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
15039 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
15040 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
15041 "\xa0\x20\x35",
15042 .klen = 27,
15043 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
15044 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
15045 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
15046 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
15047 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
15048 .alen = 32,
15049 .ilen = 0,
15050 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
15051 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
15052 .rlen = 16,
15053 }, {
15054 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
15055 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
15056 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
15057 "\xd6\x3c\x8c",
15058 .klen = 27,
15059 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
15060 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
15061 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
15062 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
15063 "\xe3\x00\x73\x69\x84\x69\x87\x79",
15064 .alen = 32,
15065 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
15066 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
15067 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
15068 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
15069 .ilen = 32,
15070 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
15071 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
15072 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
15073 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
15074 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
15075 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
15076 .rlen = 48,
15077 }, {
15078 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
15079 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
15080 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
15081 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
15082 "\x1e\x29\x91",
15083 .klen = 35,
15084 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
15085 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
15086 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
15087 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
15088 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
15089 .alen = 32,
15090 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
15091 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
15092 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
15093 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
15094 .ilen = 32,
15095 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
15096 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
15097 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
15098 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
15099 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
15100 .rlen = 40,
15101 }, {
15102 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
15103 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
15104 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
15105 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
15106 "\xf9\xd9\x4e",
15107 .klen = 35,
15108 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
15109 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
15110 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
15111 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
15112 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
15113 .alen = 32,
15114 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
15115 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
15116 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
15117 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
15118 .ilen = 32,
15119 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
15120 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
15121 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
15122 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
15123 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
15124 "\x7b\x72\x8a\xf7",
15125 .rlen = 44,
15126 }, {
15127 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
15128 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
15129 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
15130 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
15131 "\x24\xa7\x8b",
15132 .klen = 35,
15133 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
15134 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
15135 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
15136 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
15137 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
15138 .alen = 32,
15139 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
15140 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
15141 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
15142 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
15143 .ilen = 32,
15144 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
15145 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
15146 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
15147 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
15148 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
15149 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
15150 .rlen = 48,
15151 },
15152};
15153
15154static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
15155 {
15156 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
15157 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
15158 "\xc6\xfb\x7d",
15159 .klen = 19,
15160 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
15161 .alen = 0,
15162 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
15163 .ilen = 8,
15164 .result = "\x00",
15165 .rlen = 0,
15166 .novrfy = 1,
15167 }, {
15168 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
15169 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
15170 "\xaf\x94\x87",
15171 .klen = 19,
15172 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
15173 .alen = 0,
15174 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
15175 .ilen = 8,
15176 .result = "\x00",
15177 .rlen = 0,
15178 }, {
15179 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
15180 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
15181 "\xc6\xfb\x7d",
15182 .klen = 19,
15183 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
15184 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
15185 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
15186 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
15187 "\xd8\x94\x99\x91\x81\x54\x62\x57",
15188 .alen = 32,
15189 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
15190 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
15191 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
15192 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
15193 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
15194 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
15195 .ilen = 48,
15196 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
15197 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
15198 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
15199 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
15200 .rlen = 32,
15201 .novrfy = 1,
15202 }, {
15203 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
15204 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
15205 "\x05\xe0\xc9",
15206 .klen = 19,
15207 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
15208 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
15209 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
15210 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
15211 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
15212 .alen = 32,
15213 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
15214 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
15215 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
15216 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
15217 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
15218 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
15219 .ilen = 48,
15220 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
15221 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
15222 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
15223 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
15224 .rlen = 32,
15225 }, {
15226 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
15227 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
15228 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
15229 "\xee\x49\x83",
15230 .klen = 27,
15231 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
15232 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
15233 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
15234 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
15235 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
15236 .alen = 32,
15237 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
15238 .ilen = 8,
15239 .result = "\x00",
15240 .rlen = 0,
15241 }, {
15242 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
15243 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
15244 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
15245 "\xee\x49\x83",
15246 .klen = 27,
15247 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
15248 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
15249 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
15250 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
15251 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
15252 .alen = 32,
15253 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
15254 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
15255 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
15256 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
15257 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
15258 .ilen = 40,
15259 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
15260 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
15261 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
15262 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
15263 .rlen = 32,
15264 }, {
15265 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
15266 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
15267 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
15268 "\xd1\xfc\x57",
15269 .klen = 27,
15270 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
15271 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
15272 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
15273 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
15274 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
15275 .alen = 32,
15276 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
15277 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
15278 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
15279 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
15280 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
15281 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
15282 .ilen = 48,
15283 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
15284 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
15285 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
15286 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
15287 .rlen = 32,
15288 .novrfy = 1,
15289 }, {
15290 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
15291 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
15292 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
15293 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
15294 "\xee\x49\x83",
15295 .klen = 35,
15296 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
15297 .alen = 0,
15298 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
15299 .ilen = 8,
15300 .result = "\x00",
15301 .rlen = 0,
15302 }, {
15303 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
15304 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
15305 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
15306 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
15307 "\x85\x34\x66",
15308 .klen = 35,
15309 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
15310 .alen = 0,
15311 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
15312 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
15313 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
15314 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
15315 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
15316 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
15317 .ilen = 48,
15318 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
15319 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
15320 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
15321 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
15322 .rlen = 32,
15323 .novrfy = 1,
15324 }, {
15325 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
15326 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
15327 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
15328 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
15329 "\xcf\x76\x3f",
15330 .klen = 35,
15331 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
15332 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
15333 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
15334 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
15335 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
15336 .alen = 32,
15337 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
15338 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
15339 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
15340 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
15341 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
15342 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
15343 .ilen = 48,
15344 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
15345 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
15346 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
15347 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
15348 .rlen = 32,
15349 },
15350};
15351
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080015352/*
15353 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
15354 * test vectors, taken from Appendix B.2.9 and B.2.10:
15355 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
15356 * Only AES-128 is supported at this time.
15357 */
15358#define ANSI_CPRNG_AES_TEST_VECTORS 6
15359
15360static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
15361 {
15362 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
15363 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
15364 .klen = 16,
15365 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
15366 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
15367 .dtlen = 16,
15368 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
15369 "\x00\x00\x00\x00\x00\x00\x00\x00",
15370 .vlen = 16,
15371 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
15372 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
15373 .rlen = 16,
15374 .loops = 1,
15375 }, {
15376 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
15377 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
15378 .klen = 16,
15379 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
15380 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
15381 .dtlen = 16,
15382 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
15383 "\x00\x00\x00\x00\x00\x00\x00\x00",
15384 .vlen = 16,
15385 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
15386 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
15387 .rlen = 16,
15388 .loops = 1,
15389 }, {
15390 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
15391 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
15392 .klen = 16,
15393 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
15394 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
15395 .dtlen = 16,
15396 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
15397 "\x00\x00\x00\x00\x00\x00\x00\x00",
15398 .vlen = 16,
15399 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
15400 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
15401 .rlen = 16,
15402 .loops = 1,
15403 }, {
15404 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
15405 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
15406 .klen = 16,
15407 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
15408 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
15409 .dtlen = 16,
15410 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
15411 "\x00\x00\x00\x00\x00\x00\x00\x00",
15412 .vlen = 16,
15413 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
15414 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
15415 .rlen = 16,
15416 .loops = 1,
15417 }, {
15418 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
15419 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
15420 .klen = 16,
15421 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
15422 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
15423 .dtlen = 16,
15424 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
15425 "\x00\x00\x00\x00\x00\x00\x00\x00",
15426 .vlen = 16,
15427 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
15428 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
15429 .rlen = 16,
15430 .loops = 1,
15431 }, { /* Monte Carlo Test */
15432 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
15433 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
15434 .klen = 16,
15435 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
15436 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
15437 .dtlen = 16,
15438 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
15439 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
15440 .vlen = 16,
15441 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
15442 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
15443 .rlen = 16,
15444 .loops = 10000,
15445 },
15446};
15447
Herbert Xuda7f0332008-07-31 17:08:25 +080015448/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015449#define CAST5_ENC_TEST_VECTORS 4
15450#define CAST5_DEC_TEST_VECTORS 4
15451#define CAST5_CBC_ENC_TEST_VECTORS 1
15452#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030015453#define CAST5_CTR_ENC_TEST_VECTORS 2
15454#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080015455
15456static struct cipher_testvec cast5_enc_tv_template[] = {
15457 {
15458 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
15459 "\x23\x45\x67\x89\x34\x56\x78\x9a",
15460 .klen = 16,
15461 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15462 .ilen = 8,
15463 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
15464 .rlen = 8,
15465 }, {
15466 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
15467 "\x23\x45",
15468 .klen = 10,
15469 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15470 .ilen = 8,
15471 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
15472 .rlen = 8,
15473 }, {
15474 .key = "\x01\x23\x45\x67\x12",
15475 .klen = 5,
15476 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15477 .ilen = 8,
15478 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
15479 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015480 }, { /* Generated from TF test vectors */
15481 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15482 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15483 .klen = 16,
15484 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15485 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15486 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15487 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15488 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15489 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15490 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15491 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15492 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15493 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15494 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15495 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15496 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15497 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15498 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15499 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15500 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15501 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15502 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15503 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15504 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15505 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15506 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15507 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15508 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15509 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15510 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15511 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15512 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15513 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15514 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15515 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15516 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15517 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15518 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15519 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15520 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15521 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15522 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15523 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15524 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15525 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15526 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15527 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15528 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15529 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15530 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15531 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15532 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15533 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15534 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15535 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15536 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15537 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15538 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15539 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15540 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15541 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15542 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15543 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15544 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15545 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15546 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15547 .ilen = 496,
15548 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
15549 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
15550 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
15551 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
15552 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
15553 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
15554 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
15555 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
15556 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
15557 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
15558 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
15559 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
15560 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
15561 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
15562 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
15563 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
15564 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
15565 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
15566 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
15567 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
15568 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
15569 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
15570 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
15571 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
15572 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
15573 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
15574 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
15575 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
15576 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
15577 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
15578 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
15579 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
15580 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
15581 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
15582 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
15583 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
15584 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
15585 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
15586 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
15587 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
15588 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
15589 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
15590 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
15591 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
15592 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
15593 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
15594 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
15595 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
15596 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
15597 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
15598 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
15599 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
15600 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
15601 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
15602 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
15603 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
15604 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
15605 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
15606 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
15607 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
15608 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
15609 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
15610 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015611 .also_non_np = 1,
15612 .np = 2,
15613 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015614 },
15615};
15616
15617static struct cipher_testvec cast5_dec_tv_template[] = {
15618 {
15619 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
15620 "\x23\x45\x67\x89\x34\x56\x78\x9a",
15621 .klen = 16,
15622 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
15623 .ilen = 8,
15624 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15625 .rlen = 8,
15626 }, {
15627 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
15628 "\x23\x45",
15629 .klen = 10,
15630 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
15631 .ilen = 8,
15632 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15633 .rlen = 8,
15634 }, {
15635 .key = "\x01\x23\x45\x67\x12",
15636 .klen = 5,
15637 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
15638 .ilen = 8,
15639 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15640 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015641 }, { /* Generated from TF test vectors */
15642 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15643 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15644 .klen = 16,
15645 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15646 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
15647 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
15648 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
15649 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
15650 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
15651 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
15652 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
15653 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
15654 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
15655 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
15656 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
15657 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
15658 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
15659 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
15660 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
15661 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
15662 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
15663 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
15664 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
15665 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
15666 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
15667 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
15668 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
15669 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
15670 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
15671 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
15672 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
15673 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
15674 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
15675 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
15676 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
15677 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
15678 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
15679 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
15680 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
15681 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
15682 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
15683 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
15684 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
15685 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
15686 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
15687 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
15688 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
15689 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
15690 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
15691 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
15692 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
15693 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
15694 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
15695 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
15696 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
15697 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
15698 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
15699 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
15700 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
15701 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
15702 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
15703 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
15704 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
15705 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
15706 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
15707 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
15708 .ilen = 496,
15709 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15710 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15711 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15712 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15713 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15714 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15715 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15716 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15717 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15718 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15719 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15720 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15721 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15722 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15723 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15724 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15725 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15726 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15727 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15728 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15729 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15730 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15731 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15732 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15733 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15734 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15735 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15736 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15737 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15738 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15739 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15740 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15741 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15742 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15743 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15744 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15745 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15746 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15747 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15748 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15749 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15750 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15751 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15752 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15753 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15754 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15755 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15756 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15757 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15758 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15759 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15760 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15761 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15762 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15763 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15764 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15765 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15766 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15767 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15768 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15769 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15770 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15771 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015772 .also_non_np = 1,
15773 .np = 2,
15774 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015775 },
15776};
15777
15778static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
15779 { /* Generated from TF test vectors */
15780 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15781 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15782 .klen = 16,
15783 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15784 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15785 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15786 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15787 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15788 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15789 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15790 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15791 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15792 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15793 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15794 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15795 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15796 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15797 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15798 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15799 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15800 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15801 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15802 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15803 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15804 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15805 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15806 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15807 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15808 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15809 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15810 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15811 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15812 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15813 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15814 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15815 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15816 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15817 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15818 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15819 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15820 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15821 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15822 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15823 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15824 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15825 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15826 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15827 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15828 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15829 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15830 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15831 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15832 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15833 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15834 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15835 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15836 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15837 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15838 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15839 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15840 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15841 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15842 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15843 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15844 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15845 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15846 .ilen = 496,
15847 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
15848 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
15849 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
15850 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
15851 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
15852 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
15853 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
15854 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
15855 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
15856 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
15857 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
15858 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
15859 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
15860 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
15861 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
15862 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
15863 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
15864 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
15865 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
15866 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
15867 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
15868 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
15869 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
15870 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
15871 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
15872 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
15873 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
15874 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
15875 "\x90\x12\x37\x49\x27\x98\x69\x18"
15876 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
15877 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
15878 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
15879 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
15880 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
15881 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
15882 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
15883 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
15884 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
15885 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
15886 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
15887 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
15888 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
15889 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
15890 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
15891 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
15892 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
15893 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
15894 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
15895 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
15896 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
15897 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
15898 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
15899 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
15900 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
15901 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
15902 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
15903 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
15904 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
15905 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
15906 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
15907 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
15908 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
15909 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015910 .also_non_np = 1,
15911 .np = 2,
15912 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020015913 },
15914};
15915
15916static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
15917 { /* Generated from TF test vectors */
15918 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15919 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15920 .klen = 16,
15921 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15922 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
15923 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
15924 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
15925 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
15926 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
15927 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
15928 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
15929 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
15930 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
15931 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
15932 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
15933 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
15934 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
15935 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
15936 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
15937 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
15938 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
15939 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
15940 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
15941 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
15942 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
15943 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
15944 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
15945 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
15946 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
15947 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
15948 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
15949 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
15950 "\x90\x12\x37\x49\x27\x98\x69\x18"
15951 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
15952 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
15953 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
15954 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
15955 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
15956 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
15957 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
15958 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
15959 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
15960 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
15961 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
15962 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
15963 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
15964 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
15965 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
15966 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
15967 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
15968 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
15969 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
15970 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
15971 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
15972 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
15973 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
15974 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
15975 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
15976 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
15977 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
15978 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
15979 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
15980 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
15981 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
15982 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
15983 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
15984 .ilen = 496,
15985 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15986 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15987 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15988 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15989 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15990 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15991 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15992 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15993 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15994 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15995 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15996 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15997 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15998 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15999 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16000 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16001 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16002 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16003 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16004 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16005 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16006 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16007 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16008 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16009 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16010 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16011 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16012 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16013 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16014 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16015 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16016 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16017 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16018 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16019 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16020 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16021 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16022 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16023 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16024 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16025 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16026 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16027 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16028 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16029 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16030 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16031 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16032 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16033 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16034 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16035 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16036 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16037 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16038 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16039 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16040 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16041 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16042 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16043 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16044 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16045 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16046 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16047 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016048 .also_non_np = 1,
16049 .np = 2,
16050 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020016051 },
16052};
16053
16054static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
16055 { /* Generated from TF test vectors */
16056 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16057 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
16058 .klen = 16,
16059 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
16060 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16061 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030016062 "\x3A",
16063 .ilen = 17,
16064 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
16065 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
16066 "\x0C",
16067 .rlen = 17,
16068 }, { /* Generated from TF test vectors */
16069 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16070 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
16071 .klen = 16,
16072 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
16073 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16074 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020016075 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16076 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16077 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16078 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16079 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16080 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16081 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16082 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16083 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16084 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16085 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16086 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16087 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16088 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16089 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16090 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16091 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16092 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16093 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16094 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16095 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16096 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16097 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16098 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16099 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16100 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16101 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16102 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16103 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16104 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16105 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16106 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16107 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16108 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16109 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16110 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16111 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16112 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16113 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16114 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16115 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16116 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16117 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16118 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16119 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16120 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16121 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16122 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16123 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16124 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16125 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16126 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16127 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16128 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16129 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16130 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16131 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16132 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16133 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16134 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16135 .ilen = 496,
16136 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
16137 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
16138 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
16139 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
16140 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
16141 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
16142 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
16143 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
16144 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
16145 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
16146 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
16147 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
16148 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
16149 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
16150 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
16151 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
16152 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
16153 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
16154 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
16155 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
16156 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
16157 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
16158 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
16159 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
16160 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
16161 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
16162 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
16163 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
16164 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
16165 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
16166 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
16167 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
16168 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
16169 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
16170 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
16171 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
16172 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
16173 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
16174 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
16175 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
16176 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
16177 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
16178 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
16179 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
16180 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
16181 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
16182 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
16183 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
16184 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
16185 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
16186 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
16187 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
16188 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
16189 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
16190 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
16191 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
16192 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
16193 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
16194 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
16195 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
16196 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
16197 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
16198 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016199 .also_non_np = 1,
16200 .np = 2,
16201 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020016202 },
16203};
16204
16205static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
16206 { /* Generated from TF test vectors */
16207 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16208 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
16209 .klen = 16,
16210 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
16211 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
16212 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030016213 "\x0C",
16214 .ilen = 17,
16215 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16216 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16217 "\x3A",
16218 .rlen = 17,
16219 }, { /* Generated from TF test vectors */
16220 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16221 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
16222 .klen = 16,
16223 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
16224 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
16225 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020016226 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
16227 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
16228 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
16229 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
16230 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
16231 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
16232 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
16233 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
16234 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
16235 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
16236 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
16237 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
16238 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
16239 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
16240 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
16241 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
16242 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
16243 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
16244 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
16245 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
16246 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
16247 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
16248 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
16249 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
16250 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
16251 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
16252 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
16253 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
16254 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
16255 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
16256 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
16257 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
16258 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
16259 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
16260 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
16261 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
16262 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
16263 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
16264 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
16265 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
16266 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
16267 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
16268 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
16269 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
16270 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
16271 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
16272 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
16273 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
16274 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
16275 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
16276 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
16277 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
16278 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
16279 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
16280 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
16281 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
16282 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
16283 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
16284 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
16285 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
16286 .ilen = 496,
16287 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16288 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16289 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16290 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16291 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16292 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16293 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16294 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16295 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16296 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16297 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16298 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16299 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16300 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16301 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16302 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16303 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16304 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16305 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16306 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16307 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16308 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16309 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16310 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16311 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16312 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16313 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16314 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16315 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16316 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16317 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16318 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16319 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16320 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16321 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16322 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16323 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16324 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16325 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16326 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16327 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16328 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16329 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16330 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16331 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16332 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16333 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16334 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16335 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16336 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16337 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16338 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16339 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16340 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16341 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16342 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16343 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16344 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16345 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16346 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16347 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16348 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16349 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016350 .also_non_np = 1,
16351 .np = 2,
16352 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016353 },
16354};
16355
16356/*
16357 * ARC4 test vectors from OpenSSL
16358 */
16359#define ARC4_ENC_TEST_VECTORS 7
16360#define ARC4_DEC_TEST_VECTORS 7
16361
16362static struct cipher_testvec arc4_enc_tv_template[] = {
16363 {
16364 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16365 .klen = 8,
16366 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16367 .ilen = 8,
16368 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
16369 .rlen = 8,
16370 }, {
16371 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16372 .klen = 8,
16373 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
16374 .ilen = 8,
16375 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
16376 .rlen = 8,
16377 }, {
16378 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
16379 .klen = 8,
16380 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
16381 .ilen = 8,
16382 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
16383 .rlen = 8,
16384 }, {
16385 .key = "\xef\x01\x23\x45",
16386 .klen = 4,
16387 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16388 "\x00\x00\x00\x00\x00\x00\x00\x00"
16389 "\x00\x00\x00\x00",
16390 .ilen = 20,
16391 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
16392 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
16393 "\x36\xb6\x78\x58",
16394 .rlen = 20,
16395 }, {
16396 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16397 .klen = 8,
16398 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16399 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16400 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16401 "\x12\x34\x56\x78",
16402 .ilen = 28,
16403 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
16404 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
16405 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
16406 "\x40\x01\x1e\xcf",
16407 .rlen = 28,
16408 }, {
16409 .key = "\xef\x01\x23\x45",
16410 .klen = 4,
16411 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16412 "\x00\x00",
16413 .ilen = 10,
16414 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
16415 "\xbd\x61",
16416 .rlen = 10,
16417 }, {
16418 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
16419 "\x00\x00\x00\x00\x00\x00\x00\x00",
16420 .klen = 16,
16421 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
16422 .ilen = 8,
16423 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
16424 .rlen = 8,
16425 },
16426};
16427
16428static struct cipher_testvec arc4_dec_tv_template[] = {
16429 {
16430 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16431 .klen = 8,
16432 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
16433 .ilen = 8,
16434 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16435 .rlen = 8,
16436 }, {
16437 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16438 .klen = 8,
16439 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
16440 .ilen = 8,
16441 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
16442 .rlen = 8,
16443 }, {
16444 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
16445 .klen = 8,
16446 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
16447 .ilen = 8,
16448 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
16449 .rlen = 8,
16450 }, {
16451 .key = "\xef\x01\x23\x45",
16452 .klen = 4,
16453 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
16454 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
16455 "\x36\xb6\x78\x58",
16456 .ilen = 20,
16457 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
16458 "\x00\x00\x00\x00\x00\x00\x00\x00"
16459 "\x00\x00\x00\x00",
16460 .rlen = 20,
16461 }, {
16462 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
16463 .klen = 8,
16464 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
16465 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
16466 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
16467 "\x40\x01\x1e\xcf",
16468 .ilen = 28,
16469 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16470 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16471 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
16472 "\x12\x34\x56\x78",
16473 .rlen = 28,
16474 }, {
16475 .key = "\xef\x01\x23\x45",
16476 .klen = 4,
16477 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
16478 "\xbd\x61",
16479 .ilen = 10,
16480 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
16481 "\x00\x00",
16482 .rlen = 10,
16483 }, {
16484 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
16485 "\x00\x00\x00\x00\x00\x00\x00\x00",
16486 .klen = 16,
16487 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
16488 .ilen = 8,
16489 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
16490 .rlen = 8,
16491 },
16492};
16493
16494/*
16495 * TEA test vectors
16496 */
16497#define TEA_ENC_TEST_VECTORS 4
16498#define TEA_DEC_TEST_VECTORS 4
16499
16500static struct cipher_testvec tea_enc_tv_template[] = {
16501 {
16502 .key = zeroed_string,
16503 .klen = 16,
16504 .input = zeroed_string,
16505 .ilen = 8,
16506 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
16507 .rlen = 8,
16508 }, {
16509 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16510 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16511 .klen = 16,
16512 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16513 .ilen = 8,
16514 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
16515 .rlen = 8,
16516 }, {
16517 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16518 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16519 .klen = 16,
16520 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16521 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16522 .ilen = 16,
16523 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
16524 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
16525 .rlen = 16,
16526 }, {
16527 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16528 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16529 .klen = 16,
16530 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
16531 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16532 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16533 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16534 .ilen = 32,
16535 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
16536 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
16537 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
16538 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
16539 .rlen = 32,
16540 }
16541};
16542
16543static struct cipher_testvec tea_dec_tv_template[] = {
16544 {
16545 .key = zeroed_string,
16546 .klen = 16,
16547 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
16548 .ilen = 8,
16549 .result = zeroed_string,
16550 .rlen = 8,
16551 }, {
16552 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16553 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16554 .klen = 16,
16555 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
16556 .ilen = 8,
16557 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16558 .rlen = 8,
16559 }, {
16560 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16561 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16562 .klen = 16,
16563 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
16564 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
16565 .ilen = 16,
16566 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16567 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16568 .rlen = 16,
16569 }, {
16570 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16571 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16572 .klen = 16,
16573 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
16574 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
16575 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
16576 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
16577 .ilen = 32,
16578 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
16579 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16580 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16581 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16582 .rlen = 32,
16583 }
16584};
16585
16586/*
16587 * XTEA test vectors
16588 */
16589#define XTEA_ENC_TEST_VECTORS 4
16590#define XTEA_DEC_TEST_VECTORS 4
16591
16592static struct cipher_testvec xtea_enc_tv_template[] = {
16593 {
16594 .key = zeroed_string,
16595 .klen = 16,
16596 .input = zeroed_string,
16597 .ilen = 8,
16598 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
16599 .rlen = 8,
16600 }, {
16601 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16602 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16603 .klen = 16,
16604 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16605 .ilen = 8,
16606 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
16607 .rlen = 8,
16608 }, {
16609 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16610 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16611 .klen = 16,
16612 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16613 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16614 .ilen = 16,
16615 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
16616 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
16617 .rlen = 16,
16618 }, {
16619 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16620 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16621 .klen = 16,
16622 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
16623 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16624 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16625 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16626 .ilen = 32,
16627 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
16628 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
16629 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
16630 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
16631 .rlen = 32,
16632 }
16633};
16634
16635static struct cipher_testvec xtea_dec_tv_template[] = {
16636 {
16637 .key = zeroed_string,
16638 .klen = 16,
16639 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
16640 .ilen = 8,
16641 .result = zeroed_string,
16642 .rlen = 8,
16643 }, {
16644 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16645 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16646 .klen = 16,
16647 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
16648 .ilen = 8,
16649 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16650 .rlen = 8,
16651 }, {
16652 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
16653 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16654 .klen = 16,
16655 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
16656 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
16657 .ilen = 16,
16658 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16659 "\x65\x73\x74\x5f\x76\x65\x63\x74",
16660 .rlen = 16,
16661 }, {
16662 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16663 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16664 .klen = 16,
16665 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
16666 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
16667 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
16668 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
16669 .ilen = 32,
16670 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
16671 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16672 "\x79\x6f\x75\x21\x21\x21\x20\x72"
16673 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16674 .rlen = 32,
16675 }
16676};
16677
16678/*
16679 * KHAZAD test vectors.
16680 */
16681#define KHAZAD_ENC_TEST_VECTORS 5
16682#define KHAZAD_DEC_TEST_VECTORS 5
16683
16684static struct cipher_testvec khazad_enc_tv_template[] = {
16685 {
16686 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
16687 "\x00\x00\x00\x00\x00\x00\x00\x00",
16688 .klen = 16,
16689 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
16690 .ilen = 8,
16691 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
16692 .rlen = 8,
16693 }, {
16694 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
16695 "\x38\x38\x38\x38\x38\x38\x38\x38",
16696 .klen = 16,
16697 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
16698 .ilen = 8,
16699 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
16700 .rlen = 8,
16701 }, {
16702 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
16703 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
16704 .klen = 16,
16705 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
16706 .ilen = 8,
16707 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
16708 .rlen = 8,
16709 }, {
16710 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16711 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16712 .klen = 16,
16713 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16714 .ilen = 8,
16715 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
16716 .rlen = 8,
16717 }, {
16718 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16719 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16720 .klen = 16,
16721 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16722 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16723 .ilen = 16,
16724 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
16725 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
16726 .rlen = 16,
16727 },
16728};
16729
16730static struct cipher_testvec khazad_dec_tv_template[] = {
16731 {
16732 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
16733 "\x00\x00\x00\x00\x00\x00\x00\x00",
16734 .klen = 16,
16735 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
16736 .ilen = 8,
16737 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
16738 .rlen = 8,
16739 }, {
16740 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
16741 "\x38\x38\x38\x38\x38\x38\x38\x38",
16742 .klen = 16,
16743 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
16744 .ilen = 8,
16745 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
16746 .rlen = 8,
16747 }, {
16748 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
16749 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
16750 .klen = 16,
16751 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
16752 .ilen = 8,
16753 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
16754 .rlen = 8,
16755 }, {
16756 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16757 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16758 .klen = 16,
16759 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
16760 .ilen = 8,
16761 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16762 .rlen = 8,
16763 }, {
16764 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16765 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16766 .klen = 16,
16767 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
16768 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
16769 .ilen = 16,
16770 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
16771 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
16772 .rlen = 16,
16773 },
16774};
16775
16776/*
16777 * Anubis test vectors.
16778 */
16779
16780#define ANUBIS_ENC_TEST_VECTORS 5
16781#define ANUBIS_DEC_TEST_VECTORS 5
16782#define ANUBIS_CBC_ENC_TEST_VECTORS 2
16783#define ANUBIS_CBC_DEC_TEST_VECTORS 2
16784
16785static struct cipher_testvec anubis_enc_tv_template[] = {
16786 {
16787 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16788 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16789 .klen = 16,
16790 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16791 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16792 .ilen = 16,
16793 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
16794 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
16795 .rlen = 16,
16796 }, {
16797
16798 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
16799 "\x03\x03\x03\x03\x03\x03\x03\x03"
16800 "\x03\x03\x03\x03",
16801 .klen = 20,
16802 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
16803 "\x03\x03\x03\x03\x03\x03\x03\x03",
16804 .ilen = 16,
16805 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
16806 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
16807 .rlen = 16,
16808 }, {
16809 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
16810 "\x24\x24\x24\x24\x24\x24\x24\x24"
16811 "\x24\x24\x24\x24\x24\x24\x24\x24"
16812 "\x24\x24\x24\x24",
16813 .klen = 28,
16814 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
16815 "\x24\x24\x24\x24\x24\x24\x24\x24",
16816 .ilen = 16,
16817 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
16818 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
16819 .rlen = 16,
16820 }, {
16821 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
16822 "\x25\x25\x25\x25\x25\x25\x25\x25"
16823 "\x25\x25\x25\x25\x25\x25\x25\x25"
16824 "\x25\x25\x25\x25\x25\x25\x25\x25",
16825 .klen = 32,
16826 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
16827 "\x25\x25\x25\x25\x25\x25\x25\x25",
16828 .ilen = 16,
16829 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
16830 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
16831 .rlen = 16,
16832 }, {
16833 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16834 "\x35\x35\x35\x35\x35\x35\x35\x35"
16835 "\x35\x35\x35\x35\x35\x35\x35\x35"
16836 "\x35\x35\x35\x35\x35\x35\x35\x35"
16837 "\x35\x35\x35\x35\x35\x35\x35\x35",
16838 .klen = 40,
16839 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
16840 "\x35\x35\x35\x35\x35\x35\x35\x35",
16841 .ilen = 16,
16842 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16843 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
16844 .rlen = 16,
16845 },
16846};
16847
16848static struct cipher_testvec anubis_dec_tv_template[] = {
16849 {
16850 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16851 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16852 .klen = 16,
16853 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
16854 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
16855 .ilen = 16,
16856 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16857 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16858 .rlen = 16,
16859 }, {
16860
16861 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
16862 "\x03\x03\x03\x03\x03\x03\x03\x03"
16863 "\x03\x03\x03\x03",
16864 .klen = 20,
16865 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
16866 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
16867 .ilen = 16,
16868 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
16869 "\x03\x03\x03\x03\x03\x03\x03\x03",
16870 .rlen = 16,
16871 }, {
16872 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
16873 "\x24\x24\x24\x24\x24\x24\x24\x24"
16874 "\x24\x24\x24\x24\x24\x24\x24\x24"
16875 "\x24\x24\x24\x24",
16876 .klen = 28,
16877 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
16878 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
16879 .ilen = 16,
16880 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
16881 "\x24\x24\x24\x24\x24\x24\x24\x24",
16882 .rlen = 16,
16883 }, {
16884 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
16885 "\x25\x25\x25\x25\x25\x25\x25\x25"
16886 "\x25\x25\x25\x25\x25\x25\x25\x25"
16887 "\x25\x25\x25\x25\x25\x25\x25\x25",
16888 .klen = 32,
16889 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
16890 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
16891 .ilen = 16,
16892 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
16893 "\x25\x25\x25\x25\x25\x25\x25\x25",
16894 .rlen = 16,
16895 }, {
16896 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16897 "\x35\x35\x35\x35\x35\x35\x35\x35"
16898 "\x35\x35\x35\x35\x35\x35\x35\x35"
16899 "\x35\x35\x35\x35\x35\x35\x35\x35"
16900 "\x35\x35\x35\x35\x35\x35\x35\x35",
16901 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16902 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
16903 .klen = 40,
16904 .ilen = 16,
16905 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
16906 "\x35\x35\x35\x35\x35\x35\x35\x35",
16907 .rlen = 16,
16908 },
16909};
16910
16911static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
16912 {
16913 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16914 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16915 .klen = 16,
16916 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16917 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16918 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16919 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16920 .ilen = 32,
16921 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
16922 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
16923 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
16924 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
16925 .rlen = 32,
16926 }, {
16927 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16928 "\x35\x35\x35\x35\x35\x35\x35\x35"
16929 "\x35\x35\x35\x35\x35\x35\x35\x35"
16930 "\x35\x35\x35\x35\x35\x35\x35\x35"
16931 "\x35\x35\x35\x35\x35\x35\x35\x35",
16932 .klen = 40,
16933 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
16934 "\x35\x35\x35\x35\x35\x35\x35\x35"
16935 "\x35\x35\x35\x35\x35\x35\x35\x35"
16936 "\x35\x35\x35\x35\x35\x35\x35\x35",
16937 .ilen = 32,
16938 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16939 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
16940 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
16941 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
16942 .rlen = 32,
16943 },
16944};
16945
16946static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
16947 {
16948 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16949 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16950 .klen = 16,
16951 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
16952 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
16953 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
16954 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
16955 .ilen = 32,
16956 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16957 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16958 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16959 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16960 .rlen = 32,
16961 }, {
16962 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
16963 "\x35\x35\x35\x35\x35\x35\x35\x35"
16964 "\x35\x35\x35\x35\x35\x35\x35\x35"
16965 "\x35\x35\x35\x35\x35\x35\x35\x35"
16966 "\x35\x35\x35\x35\x35\x35\x35\x35",
16967 .klen = 40,
16968 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16969 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
16970 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
16971 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
16972 .ilen = 32,
16973 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
16974 "\x35\x35\x35\x35\x35\x35\x35\x35"
16975 "\x35\x35\x35\x35\x35\x35\x35\x35"
16976 "\x35\x35\x35\x35\x35\x35\x35\x35",
16977 .rlen = 32,
16978 },
16979};
16980
16981/*
16982 * XETA test vectors
16983 */
16984#define XETA_ENC_TEST_VECTORS 4
16985#define XETA_DEC_TEST_VECTORS 4
16986
16987static struct cipher_testvec xeta_enc_tv_template[] = {
16988 {
16989 .key = zeroed_string,
16990 .klen = 16,
16991 .input = zeroed_string,
16992 .ilen = 8,
16993 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
16994 .rlen = 8,
16995 }, {
16996 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16997 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16998 .klen = 16,
16999 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
17000 .ilen = 8,
17001 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
17002 .rlen = 8,
17003 }, {
17004 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
17005 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
17006 .klen = 16,
17007 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
17008 "\x65\x73\x74\x5f\x76\x65\x63\x74",
17009 .ilen = 16,
17010 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
17011 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
17012 .rlen = 16,
17013 }, {
17014 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
17015 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
17016 .klen = 16,
17017 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
17018 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
17019 "\x79\x6f\x75\x21\x21\x21\x20\x72"
17020 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
17021 .ilen = 32,
17022 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
17023 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
17024 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
17025 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
17026 .rlen = 32,
17027 }
17028};
17029
17030static struct cipher_testvec xeta_dec_tv_template[] = {
17031 {
17032 .key = zeroed_string,
17033 .klen = 16,
17034 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
17035 .ilen = 8,
17036 .result = zeroed_string,
17037 .rlen = 8,
17038 }, {
17039 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
17040 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
17041 .klen = 16,
17042 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
17043 .ilen = 8,
17044 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
17045 .rlen = 8,
17046 }, {
17047 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
17048 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
17049 .klen = 16,
17050 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
17051 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
17052 .ilen = 16,
17053 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
17054 "\x65\x73\x74\x5f\x76\x65\x63\x74",
17055 .rlen = 16,
17056 }, {
17057 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
17058 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
17059 .klen = 16,
17060 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
17061 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
17062 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
17063 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
17064 .ilen = 32,
17065 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
17066 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
17067 "\x79\x6f\x75\x21\x21\x21\x20\x72"
17068 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
17069 .rlen = 32,
17070 }
17071};
17072
17073/*
17074 * FCrypt test vectors
17075 */
17076#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
17077#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
17078
17079static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
17080 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
17081 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
17082 .klen = 8,
17083 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17084 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
17085 .ilen = 8,
17086 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
17087 .rlen = 8,
17088 }, {
17089 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
17090 .klen = 8,
17091 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17092 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
17093 .ilen = 8,
17094 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
17095 .rlen = 8,
17096 }, { /* From Arla */
17097 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17098 .klen = 8,
17099 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17100 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
17101 .ilen = 48,
17102 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
17103 "\xee\xac\x98\x62\x44\x51\xe4\x84"
17104 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
17105 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
17106 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
17107 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
17108 .rlen = 48,
17109 }, {
17110 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17111 .klen = 8,
17112 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17113 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
17114 .ilen = 48,
17115 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
17116 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
17117 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
17118 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
17119 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
17120 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
17121 .rlen = 48,
17122 }, { /* split-page version */
17123 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17124 .klen = 8,
17125 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17126 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
17127 .ilen = 48,
17128 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
17129 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
17130 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
17131 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
17132 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
17133 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
17134 .rlen = 48,
17135 .np = 2,
17136 .tap = { 20, 28 },
17137 }
17138};
17139
17140static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
17141 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
17142 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
17143 .klen = 8,
17144 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17145 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
17146 .ilen = 8,
17147 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
17148 .rlen = 8,
17149 }, {
17150 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
17151 .klen = 8,
17152 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17153 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
17154 .ilen = 8,
17155 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
17156 .rlen = 8,
17157 }, { /* From Arla */
17158 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17159 .klen = 8,
17160 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17161 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
17162 "\xee\xac\x98\x62\x44\x51\xe4\x84"
17163 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
17164 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
17165 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
17166 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
17167 .ilen = 48,
17168 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
17169 .rlen = 48,
17170 }, {
17171 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17172 .klen = 8,
17173 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17174 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
17175 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
17176 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
17177 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
17178 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
17179 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
17180 .ilen = 48,
17181 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
17182 .rlen = 48,
17183 }, { /* split-page version */
17184 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17185 .klen = 8,
17186 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
17187 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
17188 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
17189 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
17190 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
17191 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
17192 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
17193 .ilen = 48,
17194 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
17195 .rlen = 48,
17196 .np = 2,
17197 .tap = { 20, 28 },
17198 }
17199};
17200
17201/*
17202 * CAMELLIA test vectors.
17203 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017204#define CAMELLIA_ENC_TEST_VECTORS 4
17205#define CAMELLIA_DEC_TEST_VECTORS 4
17206#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
17207#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
17208#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
17209#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
17210#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
17211#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
17212#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
17213#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080017214
17215static struct cipher_testvec camellia_enc_tv_template[] = {
17216 {
17217 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17218 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17219 .klen = 16,
17220 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17221 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17222 .ilen = 16,
17223 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
17224 "\x08\x57\x06\x56\x48\xea\xbe\x43",
17225 .rlen = 16,
17226 }, {
17227 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17228 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
17229 "\x00\x11\x22\x33\x44\x55\x66\x77",
17230 .klen = 24,
17231 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17232 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17233 .ilen = 16,
17234 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
17235 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
17236 .rlen = 16,
17237 }, {
17238 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17239 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
17240 "\x00\x11\x22\x33\x44\x55\x66\x77"
17241 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
17242 .klen = 32,
17243 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17244 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17245 .ilen = 16,
17246 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
17247 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
17248 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017249 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017250 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
17251 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
17252 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
17253 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
17254 .klen = 32,
17255 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17256 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17257 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17258 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17259 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017260 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17261 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17262 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17263 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17264 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17265 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17266 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17267 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17268 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17269 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17270 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17271 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17272 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17273 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17274 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17275 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17276 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17277 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17278 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17279 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17280 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17281 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17282 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17283 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17284 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17285 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17286 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17287 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17288 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17289 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17290 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17291 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17292 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17293 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17294 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17295 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17296 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17297 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17298 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17299 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17300 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17301 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17302 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17303 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17304 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17305 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17306 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17307 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17308 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17309 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17310 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17311 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17312 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17313 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17314 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17315 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17316 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17317 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017318 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
17319 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
17320 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
17321 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
17322 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017323 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
17324 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
17325 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
17326 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
17327 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
17328 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
17329 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
17330 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
17331 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
17332 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
17333 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
17334 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
17335 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
17336 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
17337 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
17338 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
17339 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
17340 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
17341 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
17342 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
17343 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
17344 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
17345 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
17346 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
17347 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
17348 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
17349 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
17350 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
17351 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
17352 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
17353 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
17354 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
17355 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
17356 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
17357 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
17358 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
17359 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
17360 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
17361 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
17362 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
17363 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
17364 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
17365 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
17366 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
17367 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
17368 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
17369 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
17370 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
17371 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
17372 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
17373 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
17374 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
17375 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
17376 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
17377 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
17378 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
17379 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
17380 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017381 .also_non_np = 1,
17382 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017383 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020017384 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017385};
17386
17387static struct cipher_testvec camellia_dec_tv_template[] = {
17388 {
17389 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17390 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17391 .klen = 16,
17392 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
17393 "\x08\x57\x06\x56\x48\xea\xbe\x43",
17394 .ilen = 16,
17395 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17396 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17397 .rlen = 16,
17398 }, {
17399 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17400 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
17401 "\x00\x11\x22\x33\x44\x55\x66\x77",
17402 .klen = 24,
17403 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
17404 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
17405 .ilen = 16,
17406 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17407 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17408 .rlen = 16,
17409 }, {
17410 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17411 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
17412 "\x00\x11\x22\x33\x44\x55\x66\x77"
17413 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
17414 .klen = 32,
17415 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
17416 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
17417 .ilen = 16,
17418 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
17419 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
17420 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017421 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017422 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
17423 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
17424 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
17425 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
17426 .klen = 32,
17427 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
17428 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
17429 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
17430 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
17431 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017432 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
17433 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
17434 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
17435 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
17436 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
17437 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
17438 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
17439 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
17440 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
17441 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
17442 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
17443 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
17444 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
17445 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
17446 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
17447 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
17448 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
17449 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
17450 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
17451 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
17452 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
17453 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
17454 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
17455 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
17456 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
17457 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
17458 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
17459 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
17460 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
17461 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
17462 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
17463 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
17464 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
17465 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
17466 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
17467 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
17468 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
17469 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
17470 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
17471 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
17472 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
17473 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
17474 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
17475 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
17476 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
17477 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
17478 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
17479 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
17480 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
17481 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
17482 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
17483 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
17484 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
17485 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
17486 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
17487 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
17488 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
17489 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017490 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17491 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17492 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17493 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17494 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017495 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17496 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17497 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17498 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17499 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17500 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17501 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17502 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17503 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17504 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17505 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17506 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17507 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17508 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17509 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17510 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17511 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17512 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17513 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17514 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17515 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17516 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17517 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17518 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17519 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17520 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17521 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17522 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17523 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17524 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17525 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17526 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17527 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17528 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17529 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17530 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17531 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17532 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17533 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17534 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17535 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17536 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17537 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17538 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17539 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17540 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17541 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17542 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17543 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17544 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17545 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17546 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17547 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17548 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17549 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17550 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17551 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17552 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017553 .also_non_np = 1,
17554 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017555 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020017556 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017557};
17558
17559static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
17560 {
17561 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
17562 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
17563 .klen = 16,
17564 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
17565 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
17566 .input = "Single block msg",
17567 .ilen = 16,
17568 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
17569 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
17570 .rlen = 16,
17571 }, {
17572 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
17573 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
17574 .klen = 16,
17575 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
17576 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
17577 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17578 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17579 "\x10\x11\x12\x13\x14\x15\x16\x17"
17580 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17581 .ilen = 32,
17582 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
17583 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
17584 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
17585 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
17586 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017587 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017588 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17589 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17590 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17591 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17592 .klen = 32,
17593 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17594 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17595 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17596 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17597 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17598 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17599 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017600 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17601 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17602 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17603 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17604 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17605 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17606 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17607 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17608 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17609 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17610 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17611 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17612 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17613 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17614 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17615 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17616 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17617 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17618 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17619 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17620 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17621 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17622 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17623 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17624 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17625 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17626 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17627 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17628 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17629 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17630 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17631 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17632 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17633 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17634 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17635 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17636 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17637 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17638 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17639 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17640 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17641 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17642 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17643 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17644 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17645 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17646 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17647 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17648 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17649 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17650 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17651 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17652 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17653 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17654 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17655 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17656 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17657 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017658 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
17659 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
17660 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
17661 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
17662 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017663 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
17664 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
17665 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
17666 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
17667 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
17668 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
17669 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
17670 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
17671 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
17672 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
17673 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
17674 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
17675 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
17676 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
17677 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
17678 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
17679 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
17680 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
17681 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
17682 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
17683 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
17684 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
17685 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
17686 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
17687 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
17688 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
17689 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
17690 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
17691 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
17692 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
17693 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
17694 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
17695 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
17696 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
17697 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
17698 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
17699 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
17700 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
17701 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
17702 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
17703 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
17704 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
17705 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
17706 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
17707 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
17708 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
17709 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
17710 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
17711 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
17712 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
17713 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
17714 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
17715 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
17716 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
17717 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
17718 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
17719 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
17720 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017721 .also_non_np = 1,
17722 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017723 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020017724 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017725};
17726
17727static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
17728 {
17729 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
17730 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
17731 .klen = 16,
17732 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
17733 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
17734 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
17735 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
17736 .ilen = 16,
17737 .result = "Single block msg",
17738 .rlen = 16,
17739 }, {
17740 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
17741 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
17742 .klen = 16,
17743 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
17744 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
17745 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
17746 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
17747 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
17748 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
17749 .ilen = 32,
17750 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17751 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17752 "\x10\x11\x12\x13\x14\x15\x16\x17"
17753 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17754 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017755 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020017756 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17757 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17758 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17759 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17760 .klen = 32,
17761 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17762 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17763 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
17764 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
17765 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
17766 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
17767 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017768 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
17769 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
17770 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
17771 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
17772 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
17773 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
17774 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
17775 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
17776 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
17777 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
17778 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
17779 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
17780 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
17781 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
17782 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
17783 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
17784 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
17785 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
17786 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
17787 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
17788 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
17789 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
17790 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
17791 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
17792 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
17793 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
17794 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
17795 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
17796 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
17797 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
17798 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
17799 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
17800 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
17801 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
17802 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
17803 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
17804 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
17805 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
17806 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
17807 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
17808 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
17809 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
17810 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
17811 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
17812 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
17813 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
17814 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
17815 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
17816 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
17817 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
17818 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
17819 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
17820 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
17821 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
17822 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
17823 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
17824 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
17825 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017826 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17827 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17828 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17829 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17830 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017831 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17832 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17833 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17834 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17835 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17836 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17837 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17838 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17839 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17840 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17841 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17842 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17843 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17844 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17845 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17846 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17847 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17848 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17849 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17850 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17851 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17852 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17853 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17854 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17855 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17856 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17857 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17858 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17859 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17860 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17861 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17862 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17863 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17864 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17865 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17866 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17867 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17868 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17869 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17870 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17871 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17872 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17873 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17874 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17875 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17876 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17877 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17878 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17879 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17880 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17881 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17882 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17883 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17884 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17885 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17886 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17887 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17888 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017889 .also_non_np = 1,
17890 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017891 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020017892 },
17893};
17894
17895static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
17896 { /* Generated with Crypto++ */
17897 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
17898 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
17899 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
17900 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
17901 .klen = 32,
17902 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
17903 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
17904 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
17905 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
17906 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
17907 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
17908 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017909 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
17910 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
17911 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
17912 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
17913 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
17914 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
17915 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
17916 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
17917 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
17918 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
17919 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
17920 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
17921 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
17922 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
17923 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
17924 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
17925 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
17926 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
17927 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
17928 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
17929 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
17930 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
17931 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
17932 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
17933 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
17934 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
17935 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
17936 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
17937 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
17938 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
17939 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
17940 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
17941 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
17942 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
17943 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
17944 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
17945 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
17946 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
17947 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
17948 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
17949 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
17950 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
17951 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
17952 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
17953 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
17954 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
17955 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
17956 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
17957 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
17958 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
17959 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
17960 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
17961 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
17962 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
17963 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
17964 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
17965 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
17966 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020017967 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
17968 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
17969 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
17970 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
17971 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030017972 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
17973 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
17974 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
17975 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
17976 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
17977 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
17978 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
17979 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
17980 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
17981 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
17982 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
17983 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
17984 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
17985 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
17986 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
17987 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
17988 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
17989 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
17990 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
17991 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
17992 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
17993 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
17994 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
17995 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
17996 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
17997 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
17998 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
17999 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
18000 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
18001 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
18002 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
18003 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
18004 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
18005 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
18006 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
18007 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
18008 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
18009 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
18010 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
18011 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
18012 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
18013 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
18014 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
18015 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
18016 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
18017 "\x76\x44\x45\xF3\x24\x11\x57\x98"
18018 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
18019 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
18020 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
18021 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
18022 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
18023 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
18024 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
18025 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
18026 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
18027 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
18028 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
18029 .rlen = 496,
18030 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020018031 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18032 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
18033 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
18034 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
18035 .klen = 32,
18036 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
18037 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
18038 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18039 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18040 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18041 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18042 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
18043 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018044 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18045 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18046 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18047 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18048 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18049 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18050 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18051 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18052 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18053 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18054 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18055 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18056 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18057 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18058 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18059 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18060 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18061 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18062 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18063 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18064 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18065 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18066 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18067 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18068 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18069 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18070 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18071 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18072 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18073 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18074 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18075 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18076 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18077 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18078 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
18079 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
18080 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
18081 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
18082 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
18083 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
18084 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
18085 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
18086 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
18087 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
18088 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
18089 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
18090 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
18091 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
18092 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
18093 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
18094 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
18095 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
18096 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
18097 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
18098 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
18099 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
18100 "\x2B\xC2\x59",
18101 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020018102 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
18103 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
18104 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
18105 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
18106 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
18107 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018108 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
18109 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
18110 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
18111 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
18112 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
18113 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
18114 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
18115 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
18116 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
18117 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
18118 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
18119 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
18120 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
18121 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
18122 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
18123 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
18124 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
18125 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
18126 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
18127 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
18128 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
18129 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
18130 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
18131 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
18132 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
18133 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
18134 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
18135 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
18136 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
18137 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
18138 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
18139 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
18140 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
18141 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
18142 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
18143 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
18144 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
18145 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
18146 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
18147 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
18148 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
18149 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
18150 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
18151 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
18152 "\x76\x44\x45\xF3\x24\x11\x57\x98"
18153 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
18154 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
18155 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
18156 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
18157 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
18158 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
18159 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
18160 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
18161 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
18162 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
18163 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
18164 "\x93\x11\x1C",
18165 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018166 .also_non_np = 1,
18167 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018168 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030018169 }, { /* Generated with Crypto++ */
18170 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18171 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
18172 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
18173 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
18174 .klen = 32,
18175 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18176 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18177 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18178 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18179 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18180 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18181 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
18182 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
18183 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18184 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18185 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18186 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18187 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18188 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18189 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18190 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18191 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18192 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18193 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18194 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18195 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18196 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18197 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18198 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18199 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18200 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18201 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18202 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18203 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18204 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18205 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18206 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18207 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18208 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18209 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18210 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18211 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18212 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18213 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18214 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18215 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18216 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18217 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
18218 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
18219 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
18220 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
18221 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
18222 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
18223 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
18224 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
18225 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
18226 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
18227 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
18228 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
18229 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
18230 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
18231 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
18232 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
18233 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
18234 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
18235 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
18236 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
18237 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
18238 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
18239 .ilen = 496,
18240 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
18241 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
18242 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
18243 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
18244 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
18245 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
18246 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
18247 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
18248 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
18249 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
18250 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
18251 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
18252 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
18253 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
18254 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
18255 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
18256 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
18257 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
18258 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
18259 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
18260 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
18261 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
18262 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
18263 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
18264 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
18265 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
18266 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
18267 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
18268 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
18269 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
18270 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
18271 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
18272 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
18273 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
18274 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
18275 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
18276 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
18277 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
18278 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
18279 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
18280 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
18281 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
18282 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
18283 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
18284 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
18285 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
18286 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
18287 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
18288 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
18289 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
18290 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
18291 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
18292 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
18293 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
18294 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
18295 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
18296 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
18297 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
18298 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
18299 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
18300 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
18301 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
18302 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020018303 },
18304};
18305
18306static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
18307 { /* Generated with Crypto++ */
18308 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18309 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
18310 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
18311 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
18312 .klen = 32,
18313 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
18314 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
18315 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
18316 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
18317 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
18318 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
18319 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018320 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
18321 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
18322 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
18323 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
18324 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
18325 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
18326 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
18327 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
18328 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
18329 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
18330 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
18331 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
18332 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
18333 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
18334 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
18335 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
18336 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
18337 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
18338 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
18339 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
18340 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
18341 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
18342 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
18343 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
18344 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
18345 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
18346 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
18347 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
18348 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
18349 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
18350 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
18351 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
18352 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
18353 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
18354 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
18355 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
18356 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
18357 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
18358 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
18359 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
18360 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
18361 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
18362 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
18363 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
18364 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
18365 "\x76\x44\x45\xF3\x24\x11\x57\x98"
18366 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
18367 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
18368 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
18369 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
18370 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
18371 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
18372 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
18373 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
18374 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
18375 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
18376 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
18377 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020018378 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18379 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18380 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18381 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18382 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018383 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
18384 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18385 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18386 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18387 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18388 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18389 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18390 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18391 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18392 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18393 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18394 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18395 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18396 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18397 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18398 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18399 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18400 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18401 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18402 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18403 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18404 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18405 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18406 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18407 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18408 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18409 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18410 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18411 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18412 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18413 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18414 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18415 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18416 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18417 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18418 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
18419 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
18420 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
18421 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
18422 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
18423 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
18424 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
18425 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
18426 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
18427 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
18428 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
18429 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
18430 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
18431 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
18432 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
18433 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
18434 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
18435 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
18436 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
18437 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
18438 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
18439 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
18440 .rlen = 496,
18441 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020018442 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18443 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
18444 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
18445 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
18446 .klen = 32,
18447 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
18448 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
18449 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
18450 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
18451 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
18452 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
18453 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
18454 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018455 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
18456 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
18457 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
18458 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
18459 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
18460 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
18461 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
18462 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
18463 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
18464 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
18465 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
18466 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
18467 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
18468 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
18469 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
18470 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
18471 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
18472 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
18473 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
18474 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
18475 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
18476 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
18477 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
18478 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
18479 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
18480 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
18481 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
18482 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
18483 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
18484 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
18485 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
18486 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
18487 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
18488 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
18489 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
18490 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
18491 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
18492 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
18493 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
18494 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
18495 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
18496 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
18497 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
18498 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
18499 "\x76\x44\x45\xF3\x24\x11\x57\x98"
18500 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
18501 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
18502 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
18503 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
18504 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
18505 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
18506 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
18507 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
18508 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
18509 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
18510 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
18511 "\x93\x11\x1C",
18512 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020018513 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18514 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18515 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18516 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18517 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
18518 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018519 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18520 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18521 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18522 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18523 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18524 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18525 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18526 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18527 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18528 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18529 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18530 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18531 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18532 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18533 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18534 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18535 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18536 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18537 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18538 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18539 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18540 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18541 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18542 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18543 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18544 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18545 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18546 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18547 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18548 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18549 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18550 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18551 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18552 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18553 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
18554 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
18555 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
18556 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
18557 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
18558 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
18559 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
18560 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
18561 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
18562 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
18563 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
18564 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
18565 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
18566 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
18567 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
18568 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
18569 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
18570 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
18571 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
18572 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
18573 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
18574 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
18575 "\x2B\xC2\x59",
18576 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018577 .also_non_np = 1,
18578 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030018579 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030018580 }, { /* Generated with Crypto++ */
18581 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18582 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
18583 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
18584 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
18585 .klen = 32,
18586 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18587 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18588 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
18589 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
18590 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
18591 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
18592 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
18593 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
18594 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
18595 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
18596 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
18597 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
18598 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
18599 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
18600 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
18601 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
18602 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
18603 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
18604 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
18605 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
18606 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
18607 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
18608 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
18609 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
18610 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
18611 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
18612 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
18613 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
18614 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
18615 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
18616 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
18617 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
18618 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
18619 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
18620 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
18621 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
18622 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
18623 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
18624 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
18625 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
18626 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
18627 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
18628 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
18629 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
18630 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
18631 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
18632 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
18633 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
18634 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
18635 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
18636 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
18637 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
18638 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
18639 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
18640 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
18641 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
18642 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
18643 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
18644 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
18645 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
18646 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
18647 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
18648 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
18649 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
18650 .ilen = 496,
18651 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18652 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18653 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18654 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18655 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
18656 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
18657 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18658 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18659 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18660 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18661 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18662 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18663 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18664 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18665 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18666 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18667 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18668 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18669 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18670 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18671 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18672 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18673 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18674 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18675 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18676 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18677 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18678 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18679 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18680 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18681 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18682 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18683 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18684 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18685 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18686 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18687 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18688 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18689 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18690 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18691 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
18692 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
18693 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
18694 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
18695 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
18696 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
18697 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
18698 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
18699 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
18700 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
18701 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
18702 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
18703 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
18704 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
18705 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
18706 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
18707 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
18708 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
18709 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
18710 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
18711 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
18712 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
18713 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020018714 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018715};
18716
18717static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
18718 /* Generated from AES-LRW test vectors */
18719 {
18720 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
18721 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
18722 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
18723 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
18724 .klen = 32,
18725 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18726 "\x00\x00\x00\x00\x00\x00\x00\x01",
18727 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18728 "\x38\x39\x41\x42\x43\x44\x45\x46",
18729 .ilen = 16,
18730 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
18731 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
18732 .rlen = 16,
18733 }, {
18734 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
18735 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
18736 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
18737 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
18738 .klen = 32,
18739 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18740 "\x00\x00\x00\x00\x00\x00\x00\x02",
18741 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18742 "\x38\x39\x41\x42\x43\x44\x45\x46",
18743 .ilen = 16,
18744 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
18745 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
18746 .rlen = 16,
18747 }, {
18748 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
18749 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
18750 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
18751 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
18752 .klen = 32,
18753 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18754 "\x00\x00\x00\x02\x00\x00\x00\x00",
18755 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18756 "\x38\x39\x41\x42\x43\x44\x45\x46",
18757 .ilen = 16,
18758 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
18759 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
18760 .rlen = 16,
18761 }, {
18762 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
18763 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
18764 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
18765 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
18766 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
18767 .klen = 40,
18768 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18769 "\x00\x00\x00\x00\x00\x00\x00\x01",
18770 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18771 "\x38\x39\x41\x42\x43\x44\x45\x46",
18772 .ilen = 16,
18773 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
18774 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
18775 .rlen = 16,
18776 }, {
18777 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
18778 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
18779 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
18780 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
18781 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
18782 .klen = 40,
18783 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18784 "\x00\x00\x00\x02\x00\x00\x00\x00",
18785 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18786 "\x38\x39\x41\x42\x43\x44\x45\x46",
18787 .ilen = 16,
18788 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
18789 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
18790 .rlen = 16,
18791 }, {
18792 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
18793 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
18794 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
18795 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
18796 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
18797 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
18798 .klen = 48,
18799 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18800 "\x00\x00\x00\x00\x00\x00\x00\x01",
18801 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18802 "\x38\x39\x41\x42\x43\x44\x45\x46",
18803 .ilen = 16,
18804 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
18805 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
18806 .rlen = 16,
18807 }, {
18808 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
18809 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
18810 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
18811 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
18812 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
18813 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
18814 .klen = 48,
18815 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18816 "\x00\x00\x00\x02\x00\x00\x00\x00",
18817 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
18818 "\x38\x39\x41\x42\x43\x44\x45\x46",
18819 .ilen = 16,
18820 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
18821 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
18822 .rlen = 16,
18823 }, {
18824 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
18825 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
18826 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
18827 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
18828 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
18829 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
18830 .klen = 48,
18831 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18832 "\x00\x00\x00\x00\x00\x00\x00\x01",
18833 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
18834 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
18835 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
18836 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
18837 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
18838 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
18839 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
18840 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
18841 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
18842 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
18843 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
18844 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
18845 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
18846 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
18847 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
18848 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
18849 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
18850 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
18851 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
18852 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
18853 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
18854 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
18855 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
18856 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
18857 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
18858 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
18859 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
18860 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
18861 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
18862 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
18863 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
18864 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
18865 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
18866 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
18867 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
18868 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
18869 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
18870 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
18871 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
18872 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
18873 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
18874 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
18875 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
18876 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
18877 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
18878 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
18879 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
18880 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
18881 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
18882 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
18883 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
18884 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
18885 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
18886 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
18887 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
18888 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
18889 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
18890 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
18891 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
18892 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
18893 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
18894 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
18895 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
18896 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
18897 .ilen = 512,
18898 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
18899 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
18900 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
18901 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
18902 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
18903 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
18904 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
18905 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
18906 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
18907 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
18908 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
18909 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
18910 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
18911 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
18912 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
18913 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
18914 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
18915 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
18916 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
18917 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
18918 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
18919 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
18920 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
18921 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
18922 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
18923 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
18924 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
18925 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
18926 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
18927 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
18928 "\xed\x14\xa9\x57\x19\x63\x40\x04"
18929 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
18930 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
18931 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
18932 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
18933 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
18934 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
18935 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
18936 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
18937 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
18938 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
18939 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
18940 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
18941 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
18942 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
18943 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
18944 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
18945 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
18946 "\x35\xa5\x83\x04\x84\x01\x99\x56"
18947 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
18948 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
18949 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
18950 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
18951 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
18952 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
18953 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
18954 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
18955 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
18956 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
18957 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
18958 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
18959 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
18960 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
18961 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
18962 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030018963 .also_non_np = 1,
18964 .np = 2,
18965 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020018966 },
18967};
18968
18969static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
18970 /* Generated from AES-LRW test vectors */
18971 /* same as enc vectors with input and result reversed */
18972 {
18973 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
18974 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
18975 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
18976 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
18977 .klen = 32,
18978 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18979 "\x00\x00\x00\x00\x00\x00\x00\x01",
18980 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
18981 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
18982 .ilen = 16,
18983 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18984 "\x38\x39\x41\x42\x43\x44\x45\x46",
18985 .rlen = 16,
18986 }, {
18987 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
18988 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
18989 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
18990 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
18991 .klen = 32,
18992 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
18993 "\x00\x00\x00\x00\x00\x00\x00\x02",
18994 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
18995 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
18996 .ilen = 16,
18997 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
18998 "\x38\x39\x41\x42\x43\x44\x45\x46",
18999 .rlen = 16,
19000 }, {
19001 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
19002 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
19003 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
19004 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
19005 .klen = 32,
19006 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19007 "\x00\x00\x00\x02\x00\x00\x00\x00",
19008 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
19009 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
19010 .ilen = 16,
19011 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
19012 "\x38\x39\x41\x42\x43\x44\x45\x46",
19013 .rlen = 16,
19014 }, {
19015 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
19016 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
19017 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
19018 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
19019 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
19020 .klen = 40,
19021 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19022 "\x00\x00\x00\x00\x00\x00\x00\x01",
19023 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
19024 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
19025 .ilen = 16,
19026 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
19027 "\x38\x39\x41\x42\x43\x44\x45\x46",
19028 .rlen = 16,
19029 }, {
19030 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
19031 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
19032 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
19033 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
19034 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
19035 .klen = 40,
19036 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19037 "\x00\x00\x00\x02\x00\x00\x00\x00",
19038 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
19039 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
19040 .ilen = 16,
19041 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
19042 "\x38\x39\x41\x42\x43\x44\x45\x46",
19043 .rlen = 16,
19044 }, {
19045 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
19046 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
19047 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
19048 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
19049 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
19050 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
19051 .klen = 48,
19052 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19053 "\x00\x00\x00\x00\x00\x00\x00\x01",
19054 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
19055 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
19056 .ilen = 16,
19057 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
19058 "\x38\x39\x41\x42\x43\x44\x45\x46",
19059 .rlen = 16,
19060 }, {
19061 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
19062 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
19063 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
19064 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
19065 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
19066 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
19067 .klen = 48,
19068 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19069 "\x00\x00\x00\x02\x00\x00\x00\x00",
19070 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
19071 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
19072 .ilen = 16,
19073 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
19074 "\x38\x39\x41\x42\x43\x44\x45\x46",
19075 .rlen = 16,
19076 }, {
19077 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
19078 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
19079 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
19080 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
19081 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
19082 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
19083 .klen = 48,
19084 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19085 "\x00\x00\x00\x00\x00\x00\x00\x01",
19086 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
19087 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
19088 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
19089 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
19090 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
19091 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
19092 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
19093 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
19094 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
19095 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
19096 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
19097 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
19098 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
19099 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
19100 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
19101 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
19102 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
19103 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
19104 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
19105 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
19106 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
19107 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
19108 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
19109 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
19110 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
19111 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
19112 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
19113 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
19114 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
19115 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
19116 "\xed\x14\xa9\x57\x19\x63\x40\x04"
19117 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
19118 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
19119 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
19120 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
19121 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
19122 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
19123 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
19124 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
19125 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
19126 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
19127 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
19128 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
19129 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
19130 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
19131 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
19132 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
19133 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
19134 "\x35\xa5\x83\x04\x84\x01\x99\x56"
19135 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
19136 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
19137 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
19138 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
19139 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
19140 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
19141 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
19142 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
19143 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
19144 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
19145 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
19146 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
19147 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
19148 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
19149 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
19150 .ilen = 512,
19151 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
19152 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
19153 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
19154 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
19155 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
19156 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
19157 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
19158 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
19159 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
19160 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
19161 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
19162 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
19163 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
19164 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
19165 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
19166 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
19167 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
19168 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
19169 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
19170 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
19171 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
19172 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
19173 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
19174 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
19175 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
19176 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
19177 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
19178 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
19179 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
19180 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
19181 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
19182 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
19183 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
19184 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
19185 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
19186 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
19187 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
19188 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
19189 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
19190 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
19191 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
19192 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
19193 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
19194 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
19195 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
19196 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
19197 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
19198 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
19199 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
19200 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
19201 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
19202 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
19203 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
19204 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
19205 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
19206 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
19207 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
19208 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
19209 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
19210 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
19211 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
19212 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
19213 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
19214 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
19215 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019216 .also_non_np = 1,
19217 .np = 2,
19218 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020019219 },
19220};
19221
19222static struct cipher_testvec camellia_xts_enc_tv_template[] = {
19223 /* Generated from AES-XTS test vectors */
19224 {
19225 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
19226 "\x00\x00\x00\x00\x00\x00\x00\x00"
19227 "\x00\x00\x00\x00\x00\x00\x00\x00"
19228 "\x00\x00\x00\x00\x00\x00\x00\x00",
19229 .klen = 32,
19230 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19231 "\x00\x00\x00\x00\x00\x00\x00\x00",
19232 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19233 "\x00\x00\x00\x00\x00\x00\x00\x00"
19234 "\x00\x00\x00\x00\x00\x00\x00\x00"
19235 "\x00\x00\x00\x00\x00\x00\x00\x00",
19236 .ilen = 32,
19237 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
19238 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
19239 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
19240 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
19241 .rlen = 32,
19242 }, {
19243 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
19244 "\x11\x11\x11\x11\x11\x11\x11\x11"
19245 "\x22\x22\x22\x22\x22\x22\x22\x22"
19246 "\x22\x22\x22\x22\x22\x22\x22\x22",
19247 .klen = 32,
19248 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
19249 "\x00\x00\x00\x00\x00\x00\x00\x00",
19250 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
19251 "\x44\x44\x44\x44\x44\x44\x44\x44"
19252 "\x44\x44\x44\x44\x44\x44\x44\x44"
19253 "\x44\x44\x44\x44\x44\x44\x44\x44",
19254 .ilen = 32,
19255 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
19256 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
19257 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
19258 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
19259 .rlen = 32,
19260 }, {
19261 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
19262 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
19263 "\x22\x22\x22\x22\x22\x22\x22\x22"
19264 "\x22\x22\x22\x22\x22\x22\x22\x22",
19265 .klen = 32,
19266 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
19267 "\x00\x00\x00\x00\x00\x00\x00\x00",
19268 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
19269 "\x44\x44\x44\x44\x44\x44\x44\x44"
19270 "\x44\x44\x44\x44\x44\x44\x44\x44"
19271 "\x44\x44\x44\x44\x44\x44\x44\x44",
19272 .ilen = 32,
19273 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
19274 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
19275 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
19276 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
19277 .rlen = 32,
19278 }, {
19279 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
19280 "\x23\x53\x60\x28\x74\x71\x35\x26"
19281 "\x31\x41\x59\x26\x53\x58\x97\x93"
19282 "\x23\x84\x62\x64\x33\x83\x27\x95",
19283 .klen = 32,
19284 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19285 "\x00\x00\x00\x00\x00\x00\x00\x00",
19286 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19287 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19288 "\x10\x11\x12\x13\x14\x15\x16\x17"
19289 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19290 "\x20\x21\x22\x23\x24\x25\x26\x27"
19291 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19292 "\x30\x31\x32\x33\x34\x35\x36\x37"
19293 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19294 "\x40\x41\x42\x43\x44\x45\x46\x47"
19295 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19296 "\x50\x51\x52\x53\x54\x55\x56\x57"
19297 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19298 "\x60\x61\x62\x63\x64\x65\x66\x67"
19299 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19300 "\x70\x71\x72\x73\x74\x75\x76\x77"
19301 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19302 "\x80\x81\x82\x83\x84\x85\x86\x87"
19303 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19304 "\x90\x91\x92\x93\x94\x95\x96\x97"
19305 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19306 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19307 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19308 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19309 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19310 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19311 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19312 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19313 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19314 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19315 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19316 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19317 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19318 "\x00\x01\x02\x03\x04\x05\x06\x07"
19319 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19320 "\x10\x11\x12\x13\x14\x15\x16\x17"
19321 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19322 "\x20\x21\x22\x23\x24\x25\x26\x27"
19323 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19324 "\x30\x31\x32\x33\x34\x35\x36\x37"
19325 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19326 "\x40\x41\x42\x43\x44\x45\x46\x47"
19327 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19328 "\x50\x51\x52\x53\x54\x55\x56\x57"
19329 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19330 "\x60\x61\x62\x63\x64\x65\x66\x67"
19331 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19332 "\x70\x71\x72\x73\x74\x75\x76\x77"
19333 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19334 "\x80\x81\x82\x83\x84\x85\x86\x87"
19335 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19336 "\x90\x91\x92\x93\x94\x95\x96\x97"
19337 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19338 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19339 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19340 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19341 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19342 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19343 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19344 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19345 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19346 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19347 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19348 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19349 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
19350 .ilen = 512,
19351 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
19352 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
19353 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
19354 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
19355 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
19356 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
19357 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
19358 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
19359 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
19360 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
19361 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
19362 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
19363 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
19364 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
19365 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
19366 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
19367 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
19368 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
19369 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
19370 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
19371 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
19372 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
19373 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
19374 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
19375 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
19376 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
19377 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
19378 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
19379 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
19380 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
19381 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
19382 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
19383 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
19384 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
19385 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
19386 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
19387 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
19388 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
19389 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
19390 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
19391 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
19392 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
19393 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
19394 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
19395 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
19396 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
19397 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
19398 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
19399 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
19400 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
19401 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
19402 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
19403 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
19404 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
19405 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
19406 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
19407 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
19408 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
19409 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
19410 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
19411 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
19412 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
19413 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
19414 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
19415 .rlen = 512,
19416 }, {
19417 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
19418 "\x23\x53\x60\x28\x74\x71\x35\x26"
19419 "\x62\x49\x77\x57\x24\x70\x93\x69"
19420 "\x99\x59\x57\x49\x66\x96\x76\x27"
19421 "\x31\x41\x59\x26\x53\x58\x97\x93"
19422 "\x23\x84\x62\x64\x33\x83\x27\x95"
19423 "\x02\x88\x41\x97\x16\x93\x99\x37"
19424 "\x51\x05\x82\x09\x74\x94\x45\x92",
19425 .klen = 64,
19426 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
19427 "\x00\x00\x00\x00\x00\x00\x00\x00",
19428 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19429 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19430 "\x10\x11\x12\x13\x14\x15\x16\x17"
19431 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19432 "\x20\x21\x22\x23\x24\x25\x26\x27"
19433 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19434 "\x30\x31\x32\x33\x34\x35\x36\x37"
19435 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19436 "\x40\x41\x42\x43\x44\x45\x46\x47"
19437 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19438 "\x50\x51\x52\x53\x54\x55\x56\x57"
19439 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19440 "\x60\x61\x62\x63\x64\x65\x66\x67"
19441 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19442 "\x70\x71\x72\x73\x74\x75\x76\x77"
19443 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19444 "\x80\x81\x82\x83\x84\x85\x86\x87"
19445 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19446 "\x90\x91\x92\x93\x94\x95\x96\x97"
19447 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19448 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19449 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19450 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19451 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19452 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19453 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19454 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19455 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19456 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19457 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19458 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19459 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19460 "\x00\x01\x02\x03\x04\x05\x06\x07"
19461 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19462 "\x10\x11\x12\x13\x14\x15\x16\x17"
19463 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19464 "\x20\x21\x22\x23\x24\x25\x26\x27"
19465 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19466 "\x30\x31\x32\x33\x34\x35\x36\x37"
19467 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19468 "\x40\x41\x42\x43\x44\x45\x46\x47"
19469 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19470 "\x50\x51\x52\x53\x54\x55\x56\x57"
19471 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19472 "\x60\x61\x62\x63\x64\x65\x66\x67"
19473 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19474 "\x70\x71\x72\x73\x74\x75\x76\x77"
19475 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19476 "\x80\x81\x82\x83\x84\x85\x86\x87"
19477 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19478 "\x90\x91\x92\x93\x94\x95\x96\x97"
19479 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19480 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19481 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19482 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19483 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19484 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19485 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19486 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19487 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19488 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19489 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19490 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19491 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
19492 .ilen = 512,
19493 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
19494 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
19495 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
19496 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
19497 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
19498 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
19499 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
19500 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
19501 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
19502 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
19503 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
19504 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
19505 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
19506 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
19507 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
19508 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
19509 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
19510 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
19511 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
19512 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
19513 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
19514 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
19515 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
19516 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
19517 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
19518 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
19519 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
19520 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
19521 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
19522 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
19523 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
19524 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
19525 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
19526 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
19527 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
19528 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
19529 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
19530 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
19531 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
19532 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
19533 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
19534 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
19535 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
19536 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
19537 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
19538 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
19539 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
19540 "\x21\x17\xf8\x59\x15\x24\x64\x22"
19541 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
19542 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
19543 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
19544 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
19545 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
19546 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
19547 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
19548 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
19549 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
19550 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
19551 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
19552 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
19553 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
19554 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
19555 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
19556 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
19557 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019558 .also_non_np = 1,
19559 .np = 2,
19560 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020019561 },
19562};
19563
19564static struct cipher_testvec camellia_xts_dec_tv_template[] = {
19565 /* Generated from AES-XTS test vectors */
19566 /* same as enc vectors with input and result reversed */
19567 {
19568 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
19569 "\x00\x00\x00\x00\x00\x00\x00\x00"
19570 "\x00\x00\x00\x00\x00\x00\x00\x00"
19571 "\x00\x00\x00\x00\x00\x00\x00\x00",
19572 .klen = 32,
19573 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19574 "\x00\x00\x00\x00\x00\x00\x00\x00",
19575 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
19576 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
19577 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
19578 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
19579 .ilen = 32,
19580 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
19581 "\x00\x00\x00\x00\x00\x00\x00\x00"
19582 "\x00\x00\x00\x00\x00\x00\x00\x00"
19583 "\x00\x00\x00\x00\x00\x00\x00\x00",
19584 .rlen = 32,
19585 }, {
19586 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
19587 "\x11\x11\x11\x11\x11\x11\x11\x11"
19588 "\x22\x22\x22\x22\x22\x22\x22\x22"
19589 "\x22\x22\x22\x22\x22\x22\x22\x22",
19590 .klen = 32,
19591 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
19592 "\x00\x00\x00\x00\x00\x00\x00\x00",
19593 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
19594 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
19595 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
19596 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
19597 .ilen = 32,
19598 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
19599 "\x44\x44\x44\x44\x44\x44\x44\x44"
19600 "\x44\x44\x44\x44\x44\x44\x44\x44"
19601 "\x44\x44\x44\x44\x44\x44\x44\x44",
19602 .rlen = 32,
19603 }, {
19604 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
19605 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
19606 "\x22\x22\x22\x22\x22\x22\x22\x22"
19607 "\x22\x22\x22\x22\x22\x22\x22\x22",
19608 .klen = 32,
19609 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
19610 "\x00\x00\x00\x00\x00\x00\x00\x00",
19611 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
19612 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
19613 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
19614 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
19615 .ilen = 32,
19616 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
19617 "\x44\x44\x44\x44\x44\x44\x44\x44"
19618 "\x44\x44\x44\x44\x44\x44\x44\x44"
19619 "\x44\x44\x44\x44\x44\x44\x44\x44",
19620 .rlen = 32,
19621 }, {
19622 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
19623 "\x23\x53\x60\x28\x74\x71\x35\x26"
19624 "\x31\x41\x59\x26\x53\x58\x97\x93"
19625 "\x23\x84\x62\x64\x33\x83\x27\x95",
19626 .klen = 32,
19627 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
19628 "\x00\x00\x00\x00\x00\x00\x00\x00",
19629 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
19630 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
19631 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
19632 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
19633 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
19634 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
19635 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
19636 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
19637 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
19638 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
19639 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
19640 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
19641 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
19642 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
19643 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
19644 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
19645 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
19646 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
19647 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
19648 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
19649 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
19650 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
19651 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
19652 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
19653 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
19654 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
19655 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
19656 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
19657 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
19658 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
19659 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
19660 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
19661 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
19662 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
19663 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
19664 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
19665 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
19666 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
19667 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
19668 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
19669 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
19670 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
19671 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
19672 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
19673 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
19674 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
19675 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
19676 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
19677 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
19678 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
19679 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
19680 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
19681 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
19682 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
19683 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
19684 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
19685 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
19686 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
19687 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
19688 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
19689 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
19690 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
19691 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
19692 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
19693 .ilen = 512,
19694 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19695 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19696 "\x10\x11\x12\x13\x14\x15\x16\x17"
19697 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19698 "\x20\x21\x22\x23\x24\x25\x26\x27"
19699 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19700 "\x30\x31\x32\x33\x34\x35\x36\x37"
19701 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19702 "\x40\x41\x42\x43\x44\x45\x46\x47"
19703 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19704 "\x50\x51\x52\x53\x54\x55\x56\x57"
19705 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19706 "\x60\x61\x62\x63\x64\x65\x66\x67"
19707 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19708 "\x70\x71\x72\x73\x74\x75\x76\x77"
19709 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19710 "\x80\x81\x82\x83\x84\x85\x86\x87"
19711 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19712 "\x90\x91\x92\x93\x94\x95\x96\x97"
19713 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19714 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19715 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19716 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19717 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19718 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19719 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19720 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19721 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19722 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19723 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19724 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19725 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19726 "\x00\x01\x02\x03\x04\x05\x06\x07"
19727 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19728 "\x10\x11\x12\x13\x14\x15\x16\x17"
19729 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19730 "\x20\x21\x22\x23\x24\x25\x26\x27"
19731 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19732 "\x30\x31\x32\x33\x34\x35\x36\x37"
19733 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19734 "\x40\x41\x42\x43\x44\x45\x46\x47"
19735 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19736 "\x50\x51\x52\x53\x54\x55\x56\x57"
19737 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19738 "\x60\x61\x62\x63\x64\x65\x66\x67"
19739 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19740 "\x70\x71\x72\x73\x74\x75\x76\x77"
19741 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19742 "\x80\x81\x82\x83\x84\x85\x86\x87"
19743 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19744 "\x90\x91\x92\x93\x94\x95\x96\x97"
19745 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19746 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19747 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19748 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19749 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19750 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19751 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19752 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19753 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19754 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19755 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19756 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19757 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
19758 .rlen = 512,
19759 }, {
19760 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
19761 "\x23\x53\x60\x28\x74\x71\x35\x26"
19762 "\x62\x49\x77\x57\x24\x70\x93\x69"
19763 "\x99\x59\x57\x49\x66\x96\x76\x27"
19764 "\x31\x41\x59\x26\x53\x58\x97\x93"
19765 "\x23\x84\x62\x64\x33\x83\x27\x95"
19766 "\x02\x88\x41\x97\x16\x93\x99\x37"
19767 "\x51\x05\x82\x09\x74\x94\x45\x92",
19768 .klen = 64,
19769 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
19770 "\x00\x00\x00\x00\x00\x00\x00\x00",
19771 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
19772 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
19773 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
19774 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
19775 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
19776 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
19777 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
19778 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
19779 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
19780 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
19781 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
19782 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
19783 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
19784 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
19785 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
19786 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
19787 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
19788 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
19789 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
19790 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
19791 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
19792 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
19793 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
19794 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
19795 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
19796 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
19797 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
19798 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
19799 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
19800 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
19801 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
19802 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
19803 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
19804 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
19805 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
19806 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
19807 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
19808 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
19809 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
19810 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
19811 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
19812 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
19813 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
19814 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
19815 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
19816 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
19817 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
19818 "\x21\x17\xf8\x59\x15\x24\x64\x22"
19819 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
19820 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
19821 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
19822 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
19823 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
19824 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
19825 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
19826 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
19827 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
19828 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
19829 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
19830 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
19831 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
19832 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
19833 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
19834 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
19835 .ilen = 512,
19836 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19837 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19838 "\x10\x11\x12\x13\x14\x15\x16\x17"
19839 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19840 "\x20\x21\x22\x23\x24\x25\x26\x27"
19841 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19842 "\x30\x31\x32\x33\x34\x35\x36\x37"
19843 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19844 "\x40\x41\x42\x43\x44\x45\x46\x47"
19845 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19846 "\x50\x51\x52\x53\x54\x55\x56\x57"
19847 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19848 "\x60\x61\x62\x63\x64\x65\x66\x67"
19849 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19850 "\x70\x71\x72\x73\x74\x75\x76\x77"
19851 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19852 "\x80\x81\x82\x83\x84\x85\x86\x87"
19853 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19854 "\x90\x91\x92\x93\x94\x95\x96\x97"
19855 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19856 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19857 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19858 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19859 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19860 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19861 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19862 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19863 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19864 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19865 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19866 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19867 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
19868 "\x00\x01\x02\x03\x04\x05\x06\x07"
19869 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19870 "\x10\x11\x12\x13\x14\x15\x16\x17"
19871 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
19872 "\x20\x21\x22\x23\x24\x25\x26\x27"
19873 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
19874 "\x30\x31\x32\x33\x34\x35\x36\x37"
19875 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
19876 "\x40\x41\x42\x43\x44\x45\x46\x47"
19877 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
19878 "\x50\x51\x52\x53\x54\x55\x56\x57"
19879 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
19880 "\x60\x61\x62\x63\x64\x65\x66\x67"
19881 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
19882 "\x70\x71\x72\x73\x74\x75\x76\x77"
19883 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
19884 "\x80\x81\x82\x83\x84\x85\x86\x87"
19885 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
19886 "\x90\x91\x92\x93\x94\x95\x96\x97"
19887 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
19888 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
19889 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
19890 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
19891 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
19892 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
19893 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
19894 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
19895 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
19896 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
19897 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
19898 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
19899 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
19900 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019901 .also_non_np = 1,
19902 .np = 2,
19903 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020019904 },
Herbert Xuda7f0332008-07-31 17:08:25 +080019905};
19906
19907/*
19908 * SEED test vectors
19909 */
19910#define SEED_ENC_TEST_VECTORS 4
19911#define SEED_DEC_TEST_VECTORS 4
19912
19913static struct cipher_testvec seed_enc_tv_template[] = {
19914 {
19915 .key = zeroed_string,
19916 .klen = 16,
19917 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
19918 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19919 .ilen = 16,
19920 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
19921 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
19922 .rlen = 16,
19923 }, {
19924 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19925 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19926 .klen = 16,
19927 .input = zeroed_string,
19928 .ilen = 16,
19929 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
19930 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
19931 .rlen = 16,
19932 }, {
19933 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
19934 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
19935 .klen = 16,
19936 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
19937 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
19938 .ilen = 16,
19939 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
19940 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
19941 .rlen = 16,
19942 }, {
19943 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
19944 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
19945 .klen = 16,
19946 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
19947 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
19948 .ilen = 16,
19949 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
19950 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
19951 .rlen = 16,
19952 }
19953};
19954
19955static struct cipher_testvec seed_dec_tv_template[] = {
19956 {
19957 .key = zeroed_string,
19958 .klen = 16,
19959 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
19960 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
19961 .ilen = 16,
19962 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19963 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19964 .rlen = 16,
19965 }, {
19966 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
19967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19968 .klen = 16,
19969 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
19970 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
19971 .ilen = 16,
19972 .result = zeroed_string,
19973 .rlen = 16,
19974 }, {
19975 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
19976 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
19977 .klen = 16,
19978 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
19979 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
19980 .ilen = 16,
19981 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
19982 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
19983 .rlen = 16,
19984 }, {
19985 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
19986 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
19987 .klen = 16,
19988 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
19989 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
19990 .ilen = 16,
19991 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
19992 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
19993 .rlen = 16,
19994 }
19995};
19996
19997#define SALSA20_STREAM_ENC_TEST_VECTORS 5
19998static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
19999 /*
20000 * Testvectors from verified.test-vectors submitted to ECRYPT.
20001 * They are truncated to size 39, 64, 111, 129 to test a variety
20002 * of input length.
20003 */
20004 { /* Set 3, vector 0 */
20005 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20006 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
20007 .klen = 16,
20008 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20009 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20010 "\x00\x00\x00\x00\x00\x00\x00\x00"
20011 "\x00\x00\x00\x00\x00\x00\x00\x00"
20012 "\x00\x00\x00\x00\x00\x00\x00\x00"
20013 "\x00\x00\x00\x00\x00\x00\x00",
20014 .ilen = 39,
20015 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
20016 "\x68\x02\x41\x0C\x68\x86\x88\x89"
20017 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
20018 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
20019 "\x58\x3F\x52\x79\x70\xEB\xC1",
20020 .rlen = 39,
20021 }, { /* Set 5, vector 0 */
20022 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20023 "\x00\x00\x00\x00\x00\x00\x00\x00",
20024 .klen = 16,
20025 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
20026 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20027 "\x00\x00\x00\x00\x00\x00\x00\x00"
20028 "\x00\x00\x00\x00\x00\x00\x00\x00"
20029 "\x00\x00\x00\x00\x00\x00\x00\x00"
20030 "\x00\x00\x00\x00\x00\x00\x00\x00"
20031 "\x00\x00\x00\x00\x00\x00\x00\x00"
20032 "\x00\x00\x00\x00\x00\x00\x00\x00"
20033 "\x00\x00\x00\x00\x00\x00\x00\x00",
20034 .ilen = 64,
20035 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
20036 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
20037 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
20038 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
20039 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
20040 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
20041 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
20042 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
20043 .rlen = 64,
20044 }, { /* Set 3, vector 27 */
20045 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
20046 "\x23\x24\x25\x26\x27\x28\x29\x2A"
20047 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
20048 "\x33\x34\x35\x36\x37\x38\x39\x3A",
20049 .klen = 32,
20050 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20051 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20052 "\x00\x00\x00\x00\x00\x00\x00\x00"
20053 "\x00\x00\x00\x00\x00\x00\x00\x00"
20054 "\x00\x00\x00\x00\x00\x00\x00\x00"
20055 "\x00\x00\x00\x00\x00\x00\x00\x00"
20056 "\x00\x00\x00\x00\x00\x00\x00\x00"
20057 "\x00\x00\x00\x00\x00\x00\x00\x00"
20058 "\x00\x00\x00\x00\x00\x00\x00\x00"
20059 "\x00\x00\x00\x00\x00\x00\x00\x00"
20060 "\x00\x00\x00\x00\x00\x00\x00\x00"
20061 "\x00\x00\x00\x00\x00\x00\x00\x00"
20062 "\x00\x00\x00\x00\x00\x00\x00\x00"
20063 "\x00\x00\x00\x00\x00\x00\x00\x00"
20064 "\x00\x00\x00\x00\x00\x00\x00",
20065 .ilen = 111,
20066 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
20067 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
20068 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
20069 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
20070 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
20071 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
20072 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
20073 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
20074 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
20075 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
20076 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
20077 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
20078 "\x95\x46\x45\x54\xE9\x75\x03\x08"
20079 "\x44\xAF\xE5\x8A\x81\x12\x09",
20080 .rlen = 111,
20081 }, { /* Set 5, vector 27 */
20082 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20083 "\x00\x00\x00\x00\x00\x00\x00\x00"
20084 "\x00\x00\x00\x00\x00\x00\x00\x00"
20085 "\x00\x00\x00\x00\x00\x00\x00\x00",
20086 .klen = 32,
20087 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
20088 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20089 "\x00\x00\x00\x00\x00\x00\x00\x00"
20090 "\x00\x00\x00\x00\x00\x00\x00\x00"
20091 "\x00\x00\x00\x00\x00\x00\x00\x00"
20092 "\x00\x00\x00\x00\x00\x00\x00\x00"
20093 "\x00\x00\x00\x00\x00\x00\x00\x00"
20094 "\x00\x00\x00\x00\x00\x00\x00\x00"
20095 "\x00\x00\x00\x00\x00\x00\x00\x00"
20096 "\x00\x00\x00\x00\x00\x00\x00\x00"
20097 "\x00\x00\x00\x00\x00\x00\x00\x00"
20098 "\x00\x00\x00\x00\x00\x00\x00\x00"
20099 "\x00\x00\x00\x00\x00\x00\x00\x00"
20100 "\x00\x00\x00\x00\x00\x00\x00\x00"
20101 "\x00\x00\x00\x00\x00\x00\x00\x00"
20102 "\x00\x00\x00\x00\x00\x00\x00\x00"
20103 "\x00\x00\x00\x00\x00\x00\x00\x00"
20104 "\x00",
20105 .ilen = 129,
20106 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
20107 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
20108 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
20109 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
20110 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
20111 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
20112 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
20113 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
20114 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
20115 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
20116 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
20117 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
20118 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
20119 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
20120 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
20121 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
20122 "\x5A",
20123 .rlen = 129,
20124 }, { /* large test vector generated using Crypto++ */
20125 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20126 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20127 "\x10\x11\x12\x13\x14\x15\x16\x17"
20128 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
20129 .klen = 32,
20130 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
20131 "\x00\x00\x00\x00\x00\x00\x00\x00",
20132 .input =
20133 "\x00\x01\x02\x03\x04\x05\x06\x07"
20134 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20135 "\x10\x11\x12\x13\x14\x15\x16\x17"
20136 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
20137 "\x20\x21\x22\x23\x24\x25\x26\x27"
20138 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
20139 "\x30\x31\x32\x33\x34\x35\x36\x37"
20140 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
20141 "\x40\x41\x42\x43\x44\x45\x46\x47"
20142 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
20143 "\x50\x51\x52\x53\x54\x55\x56\x57"
20144 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
20145 "\x60\x61\x62\x63\x64\x65\x66\x67"
20146 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
20147 "\x70\x71\x72\x73\x74\x75\x76\x77"
20148 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
20149 "\x80\x81\x82\x83\x84\x85\x86\x87"
20150 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
20151 "\x90\x91\x92\x93\x94\x95\x96\x97"
20152 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
20153 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
20154 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
20155 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
20156 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
20157 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20158 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
20159 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
20160 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
20161 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
20162 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
20163 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
20164 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
20165 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
20166 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
20167 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
20168 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
20169 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
20170 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
20171 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
20172 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
20173 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
20174 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
20175 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
20176 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
20177 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
20178 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
20179 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
20180 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
20181 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
20182 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
20183 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
20184 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
20185 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
20186 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
20187 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
20188 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
20189 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
20190 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
20191 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
20192 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
20193 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
20194 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
20195 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
20196 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
20197 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
20198 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
20199 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
20200 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
20201 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
20202 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
20203 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
20204 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
20205 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
20206 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
20207 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
20208 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
20209 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
20210 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
20211 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
20212 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
20213 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
20214 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
20215 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
20216 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
20217 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
20218 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
20219 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
20220 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
20221 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
20222 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
20223 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
20224 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
20225 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
20226 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
20227 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
20228 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
20229 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
20230 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
20231 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
20232 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
20233 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
20234 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
20235 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
20236 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
20237 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
20238 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
20239 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
20240 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
20241 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
20242 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
20243 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
20244 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
20245 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
20246 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
20247 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
20248 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
20249 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
20250 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
20251 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
20252 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
20253 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
20254 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
20255 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
20256 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
20257 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
20258 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
20259 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
20260 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
20261 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
20262 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
20263 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
20264 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
20265 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
20266 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
20267 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
20268 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
20269 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
20270 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
20271 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
20272 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
20273 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
20274 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
20275 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
20276 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
20277 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
20278 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
20279 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
20280 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
20281 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
20282 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
20283 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
20284 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
20285 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
20286 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
20287 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
20288 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
20289 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
20290 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
20291 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
20292 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
20293 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
20294 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
20295 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
20296 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
20297 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
20298 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
20299 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
20300 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
20301 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
20302 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
20303 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
20304 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
20305 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
20306 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
20307 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
20308 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
20309 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
20310 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
20311 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
20312 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
20313 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
20314 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
20315 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
20316 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
20317 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
20318 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
20319 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
20320 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
20321 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
20322 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
20323 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
20324 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
20325 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
20326 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
20327 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
20328 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
20329 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
20330 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
20331 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
20332 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
20333 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
20334 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
20335 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
20336 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
20337 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
20338 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
20339 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
20340 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
20341 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
20342 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
20343 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
20344 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
20345 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
20346 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
20347 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
20348 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
20349 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
20350 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
20351 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
20352 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
20353 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
20354 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
20355 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
20356 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
20357 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
20358 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
20359 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
20360 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
20361 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
20362 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
20363 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
20364 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
20365 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
20366 "\x38\x47\x56\x65\x74\x83\x92\xa1"
20367 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
20368 "\x28\x37\x46\x55\x64\x73\x82\x91"
20369 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
20370 "\x18\x27\x36\x45\x54\x63\x72\x81"
20371 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
20372 "\x08\x17\x26\x35\x44\x53\x62\x71"
20373 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
20374 "\xf8\x07\x16\x25\x34\x43\x52\x61"
20375 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
20376 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
20377 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
20378 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
20379 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
20380 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
20381 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
20382 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
20383 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
20384 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
20385 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
20386 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
20387 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
20388 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
20389 "\x00\x11\x22\x33\x44\x55\x66\x77"
20390 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
20391 "\x10\x21\x32\x43\x54\x65\x76\x87"
20392 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
20393 "\x20\x31\x42\x53\x64\x75\x86\x97"
20394 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
20395 "\x30\x41\x52\x63\x74\x85\x96\xa7"
20396 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
20397 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
20398 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
20399 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
20400 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
20401 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
20402 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
20403 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
20404 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
20405 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
20406 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
20407 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
20408 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
20409 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
20410 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
20411 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
20412 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
20413 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
20414 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
20415 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
20416 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
20417 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
20418 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
20419 "\xf0\x01\x12\x23\x34\x45\x56\x67"
20420 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
20421 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
20422 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
20423 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
20424 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
20425 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
20426 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
20427 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
20428 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
20429 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
20430 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
20431 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
20432 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
20433 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
20434 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
20435 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
20436 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
20437 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
20438 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
20439 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
20440 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
20441 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
20442 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
20443 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
20444 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
20445 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
20446 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
20447 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
20448 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
20449 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
20450 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
20451 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
20452 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
20453 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
20454 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
20455 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
20456 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
20457 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
20458 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
20459 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
20460 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
20461 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
20462 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
20463 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
20464 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
20465 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
20466 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
20467 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
20468 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
20469 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
20470 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
20471 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
20472 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
20473 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
20474 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
20475 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
20476 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
20477 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
20478 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
20479 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
20480 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
20481 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
20482 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
20483 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
20484 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
20485 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
20486 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
20487 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
20488 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
20489 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
20490 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
20491 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
20492 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
20493 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
20494 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
20495 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
20496 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
20497 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
20498 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
20499 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
20500 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
20501 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
20502 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
20503 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
20504 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
20505 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
20506 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
20507 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
20508 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
20509 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
20510 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
20511 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
20512 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
20513 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
20514 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
20515 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
20516 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
20517 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
20518 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
20519 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
20520 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
20521 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
20522 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
20523 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
20524 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
20525 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
20526 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
20527 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
20528 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
20529 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
20530 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
20531 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
20532 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
20533 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
20534 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
20535 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
20536 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
20537 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
20538 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
20539 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
20540 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
20541 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
20542 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
20543 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
20544 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
20545 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
20546 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
20547 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
20548 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
20549 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
20550 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
20551 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
20552 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
20553 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
20554 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
20555 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
20556 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
20557 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
20558 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
20559 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
20560 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
20561 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
20562 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
20563 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
20564 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
20565 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
20566 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
20567 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
20568 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
20569 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
20570 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
20571 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
20572 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
20573 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
20574 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
20575 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
20576 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
20577 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
20578 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
20579 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
20580 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
20581 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
20582 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
20583 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
20584 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
20585 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
20586 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
20587 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
20588 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
20589 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
20590 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
20591 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
20592 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
20593 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
20594 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
20595 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
20596 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
20597 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
20598 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
20599 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
20600 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
20601 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
20602 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
20603 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
20604 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
20605 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
20606 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
20607 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
20608 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
20609 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
20610 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
20611 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
20612 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
20613 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
20614 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
20615 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
20616 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
20617 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
20618 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
20619 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
20620 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
20621 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
20622 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
20623 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
20624 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
20625 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
20626 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
20627 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
20628 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
20629 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
20630 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
20631 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
20632 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
20633 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
20634 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
20635 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
20636 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
20637 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
20638 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
20639 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
20640 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
20641 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
20642 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
20643 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
20644 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
20645 "\x00\x21\x42\x63",
20646 .ilen = 4100,
20647 .result =
20648 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
20649 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
20650 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
20651 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
20652 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
20653 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
20654 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
20655 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
20656 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
20657 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
20658 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
20659 "\xbb\xde\x56\x86\xab\x65\x21\x30"
20660 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
20661 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
20662 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
20663 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
20664 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
20665 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
20666 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
20667 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
20668 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
20669 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
20670 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
20671 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
20672 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
20673 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
20674 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
20675 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
20676 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
20677 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
20678 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
20679 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
20680 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
20681 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
20682 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
20683 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
20684 "\x62\x08\x18\x7a\x25\x49\x28\xac"
20685 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
20686 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
20687 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
20688 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
20689 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
20690 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
20691 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
20692 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
20693 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
20694 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
20695 "\x33\xee\x14\x19\x22\x52\x89\xa7"
20696 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
20697 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
20698 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
20699 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
20700 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
20701 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
20702 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
20703 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
20704 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
20705 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
20706 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
20707 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
20708 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
20709 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
20710 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
20711 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
20712 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
20713 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
20714 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
20715 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
20716 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
20717 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
20718 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
20719 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
20720 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
20721 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
20722 "\x49\x97\x33\xab\x36\x14\x0a\x70"
20723 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
20724 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
20725 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
20726 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
20727 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
20728 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
20729 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
20730 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
20731 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
20732 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
20733 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
20734 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
20735 "\xad\x04\x07\xae\x22\x90\x4a\x93"
20736 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
20737 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
20738 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
20739 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
20740 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
20741 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
20742 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
20743 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
20744 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
20745 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
20746 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
20747 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
20748 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
20749 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
20750 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
20751 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
20752 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
20753 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
20754 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
20755 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
20756 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
20757 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
20758 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
20759 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
20760 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
20761 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
20762 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
20763 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
20764 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
20765 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
20766 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
20767 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
20768 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
20769 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
20770 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
20771 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
20772 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
20773 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
20774 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
20775 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
20776 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
20777 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
20778 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
20779 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
20780 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
20781 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
20782 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
20783 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
20784 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
20785 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
20786 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
20787 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
20788 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
20789 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
20790 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
20791 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
20792 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
20793 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
20794 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
20795 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
20796 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
20797 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
20798 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
20799 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
20800 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
20801 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
20802 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
20803 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
20804 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
20805 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
20806 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
20807 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
20808 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
20809 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
20810 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
20811 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
20812 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
20813 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
20814 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
20815 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
20816 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
20817 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
20818 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
20819 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
20820 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
20821 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
20822 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
20823 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
20824 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
20825 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
20826 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
20827 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
20828 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
20829 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
20830 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
20831 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
20832 "\x2e\x53\x49\x97\x94\x33\xae\x40"
20833 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
20834 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
20835 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
20836 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
20837 "\xce\x87\xad\xcc\x72\x05\x00\x29"
20838 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
20839 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
20840 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
20841 "\xac\xc0\x79\x50\x69\xca\x59\x32"
20842 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
20843 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
20844 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
20845 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
20846 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
20847 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
20848 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
20849 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
20850 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
20851 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
20852 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
20853 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
20854 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
20855 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
20856 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
20857 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
20858 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
20859 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
20860 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
20861 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
20862 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
20863 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
20864 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
20865 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
20866 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
20867 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
20868 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
20869 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
20870 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
20871 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
20872 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
20873 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
20874 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
20875 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
20876 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
20877 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
20878 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
20879 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
20880 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
20881 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
20882 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
20883 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
20884 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
20885 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
20886 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
20887 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
20888 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
20889 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
20890 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
20891 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
20892 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
20893 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
20894 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
20895 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
20896 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
20897 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
20898 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
20899 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
20900 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
20901 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
20902 "\x38\x55\xab\x33\x26\xef\x9f\x43"
20903 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
20904 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
20905 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
20906 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
20907 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
20908 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
20909 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
20910 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
20911 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
20912 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
20913 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
20914 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
20915 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
20916 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
20917 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
20918 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
20919 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
20920 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
20921 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
20922 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
20923 "\x62\x36\x43\xb2\x82\x15\x75\x50"
20924 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
20925 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
20926 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
20927 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
20928 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
20929 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
20930 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
20931 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
20932 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
20933 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
20934 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
20935 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
20936 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
20937 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
20938 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
20939 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
20940 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
20941 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
20942 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
20943 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
20944 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
20945 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
20946 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
20947 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
20948 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
20949 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
20950 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
20951 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
20952 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
20953 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
20954 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
20955 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
20956 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
20957 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
20958 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
20959 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
20960 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
20961 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
20962 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
20963 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
20964 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
20965 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
20966 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
20967 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
20968 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
20969 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
20970 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
20971 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
20972 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
20973 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
20974 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
20975 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
20976 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
20977 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
20978 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
20979 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
20980 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
20981 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
20982 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
20983 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
20984 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
20985 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
20986 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
20987 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
20988 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
20989 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
20990 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
20991 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
20992 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
20993 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
20994 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
20995 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
20996 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
20997 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
20998 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
20999 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
21000 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
21001 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
21002 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
21003 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
21004 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
21005 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
21006 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
21007 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
21008 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
21009 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
21010 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
21011 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
21012 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
21013 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
21014 "\x73\x2e\x71\x79\x16\x06\x63\x28"
21015 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
21016 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
21017 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
21018 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
21019 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
21020 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
21021 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
21022 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
21023 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
21024 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
21025 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
21026 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
21027 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
21028 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
21029 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
21030 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
21031 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
21032 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
21033 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
21034 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
21035 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
21036 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
21037 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
21038 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
21039 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
21040 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
21041 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
21042 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
21043 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
21044 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
21045 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
21046 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
21047 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
21048 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
21049 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
21050 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
21051 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
21052 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
21053 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
21054 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
21055 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
21056 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
21057 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
21058 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
21059 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
21060 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
21061 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
21062 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
21063 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
21064 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
21065 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
21066 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
21067 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
21068 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
21069 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
21070 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
21071 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
21072 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
21073 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
21074 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
21075 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
21076 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
21077 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
21078 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
21079 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
21080 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
21081 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
21082 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
21083 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
21084 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
21085 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
21086 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
21087 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
21088 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
21089 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
21090 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
21091 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
21092 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
21093 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
21094 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
21095 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
21096 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
21097 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
21098 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
21099 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
21100 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
21101 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
21102 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
21103 "\x85\x73\x78\x45\x20\x7f\xae\x13"
21104 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
21105 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
21106 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
21107 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
21108 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
21109 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
21110 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
21111 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
21112 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
21113 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
21114 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
21115 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
21116 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
21117 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
21118 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
21119 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
21120 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
21121 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
21122 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
21123 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
21124 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
21125 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
21126 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
21127 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
21128 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
21129 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
21130 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
21131 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
21132 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
21133 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
21134 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
21135 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
21136 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
21137 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
21138 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
21139 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
21140 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
21141 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
21142 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
21143 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
21144 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
21145 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
21146 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
21147 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
21148 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
21149 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
21150 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
21151 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
21152 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
21153 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
21154 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
21155 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
21156 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
21157 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
21158 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
21159 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
21160 "\xaf\xdf\x11\x95",
21161 .rlen = 4100,
21162 .np = 2,
21163 .tap = { 4064, 36 },
21164 },
21165};
21166
21167/*
21168 * CTS (Cipher Text Stealing) mode tests
21169 */
21170#define CTS_MODE_ENC_TEST_VECTORS 6
21171#define CTS_MODE_DEC_TEST_VECTORS 6
21172static struct cipher_testvec cts_mode_enc_tv_template[] = {
21173 { /* from rfc3962 */
21174 .klen = 16,
21175 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21176 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21177 .ilen = 17,
21178 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21179 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21180 "\x20",
21181 .rlen = 17,
21182 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
21183 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
21184 "\x97",
21185 }, {
21186 .klen = 16,
21187 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21188 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21189 .ilen = 31,
21190 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21191 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21192 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21193 "\x20\x47\x61\x75\x27\x73\x20",
21194 .rlen = 31,
21195 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
21196 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
21197 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21198 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
21199 }, {
21200 .klen = 16,
21201 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21202 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21203 .ilen = 32,
21204 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21205 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21206 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21207 "\x20\x47\x61\x75\x27\x73\x20\x43",
21208 .rlen = 32,
21209 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21210 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
21211 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21212 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
21213 }, {
21214 .klen = 16,
21215 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21216 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21217 .ilen = 47,
21218 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21219 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21220 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21221 "\x20\x47\x61\x75\x27\x73\x20\x43"
21222 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21223 "\x70\x6c\x65\x61\x73\x65\x2c",
21224 .rlen = 47,
21225 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21226 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21227 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
21228 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
21229 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21230 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
21231 }, {
21232 .klen = 16,
21233 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21234 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21235 .ilen = 48,
21236 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21237 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21238 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21239 "\x20\x47\x61\x75\x27\x73\x20\x43"
21240 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21241 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
21242 .rlen = 48,
21243 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21244 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21245 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
21246 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
21247 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21248 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
21249 }, {
21250 .klen = 16,
21251 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21252 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21253 .ilen = 64,
21254 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21255 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21256 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21257 "\x20\x47\x61\x75\x27\x73\x20\x43"
21258 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21259 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
21260 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
21261 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
21262 .rlen = 64,
21263 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21264 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21265 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21266 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
21267 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
21268 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
21269 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
21270 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
21271 }
21272};
21273
21274static struct cipher_testvec cts_mode_dec_tv_template[] = {
21275 { /* from rfc3962 */
21276 .klen = 16,
21277 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21278 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21279 .rlen = 17,
21280 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21281 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21282 "\x20",
21283 .ilen = 17,
21284 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
21285 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
21286 "\x97",
21287 }, {
21288 .klen = 16,
21289 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21290 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21291 .rlen = 31,
21292 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21293 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21294 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21295 "\x20\x47\x61\x75\x27\x73\x20",
21296 .ilen = 31,
21297 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
21298 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
21299 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21300 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
21301 }, {
21302 .klen = 16,
21303 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21304 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21305 .rlen = 32,
21306 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21307 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21308 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21309 "\x20\x47\x61\x75\x27\x73\x20\x43",
21310 .ilen = 32,
21311 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21312 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
21313 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21314 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
21315 }, {
21316 .klen = 16,
21317 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21318 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21319 .rlen = 47,
21320 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21321 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21322 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21323 "\x20\x47\x61\x75\x27\x73\x20\x43"
21324 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21325 "\x70\x6c\x65\x61\x73\x65\x2c",
21326 .ilen = 47,
21327 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21328 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21329 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
21330 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
21331 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21332 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
21333 }, {
21334 .klen = 16,
21335 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21336 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21337 .rlen = 48,
21338 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21339 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21340 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21341 "\x20\x47\x61\x75\x27\x73\x20\x43"
21342 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21343 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
21344 .ilen = 48,
21345 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21346 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21347 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
21348 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
21349 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21350 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
21351 }, {
21352 .klen = 16,
21353 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
21354 "\x74\x65\x72\x69\x79\x61\x6b\x69",
21355 .rlen = 64,
21356 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
21357 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
21358 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
21359 "\x20\x47\x61\x75\x27\x73\x20\x43"
21360 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
21361 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
21362 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
21363 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
21364 .ilen = 64,
21365 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
21366 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
21367 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
21368 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
21369 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
21370 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
21371 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
21372 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
21373 }
21374};
21375
21376/*
21377 * Compression stuff.
21378 */
21379#define COMP_BUF_SIZE 512
21380
21381struct comp_testvec {
21382 int inlen, outlen;
21383 char input[COMP_BUF_SIZE];
21384 char output[COMP_BUF_SIZE];
21385};
21386
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080021387struct pcomp_testvec {
21388 void *params;
21389 unsigned int paramsize;
21390 int inlen, outlen;
21391 char input[COMP_BUF_SIZE];
21392 char output[COMP_BUF_SIZE];
21393};
21394
Herbert Xuda7f0332008-07-31 17:08:25 +080021395/*
21396 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110021397 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080021398 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080021399
Herbert Xuda7f0332008-07-31 17:08:25 +080021400#define DEFLATE_COMP_TEST_VECTORS 2
21401#define DEFLATE_DECOMP_TEST_VECTORS 2
21402
21403static struct comp_testvec deflate_comp_tv_template[] = {
21404 {
21405 .inlen = 70,
21406 .outlen = 38,
21407 .input = "Join us now and share the software "
21408 "Join us now and share the software ",
21409 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
21410 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
21411 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
21412 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
21413 "\x71\xbc\x08\x2b\x01\x00",
21414 }, {
21415 .inlen = 191,
21416 .outlen = 122,
21417 .input = "This document describes a compression method based on the DEFLATE"
21418 "compression algorithm. This document defines the application of "
21419 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
21420 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
21421 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
21422 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
21423 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
21424 "\x68\x12\x51\xae\x76\x67\xd6\x27"
21425 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
21426 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
21427 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
21428 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
21429 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
21430 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
21431 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
21432 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
21433 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
21434 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
21435 "\xfa\x02",
21436 },
21437};
21438
21439static struct comp_testvec deflate_decomp_tv_template[] = {
21440 {
21441 .inlen = 122,
21442 .outlen = 191,
21443 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
21444 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
21445 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
21446 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
21447 "\x68\x12\x51\xae\x76\x67\xd6\x27"
21448 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
21449 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
21450 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
21451 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
21452 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
21453 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
21454 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
21455 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
21456 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
21457 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
21458 "\xfa\x02",
21459 .output = "This document describes a compression method based on the DEFLATE"
21460 "compression algorithm. This document defines the application of "
21461 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
21462 }, {
21463 .inlen = 38,
21464 .outlen = 70,
21465 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
21466 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
21467 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
21468 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
21469 "\x71\xbc\x08\x2b\x01\x00",
21470 .output = "Join us now and share the software "
21471 "Join us now and share the software ",
21472 },
21473};
21474
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080021475#define ZLIB_COMP_TEST_VECTORS 2
21476#define ZLIB_DECOMP_TEST_VECTORS 2
21477
21478static const struct {
21479 struct nlattr nla;
21480 int val;
21481} deflate_comp_params[] = {
21482 {
21483 .nla = {
21484 .nla_len = NLA_HDRLEN + sizeof(int),
21485 .nla_type = ZLIB_COMP_LEVEL,
21486 },
21487 .val = Z_DEFAULT_COMPRESSION,
21488 }, {
21489 .nla = {
21490 .nla_len = NLA_HDRLEN + sizeof(int),
21491 .nla_type = ZLIB_COMP_METHOD,
21492 },
21493 .val = Z_DEFLATED,
21494 }, {
21495 .nla = {
21496 .nla_len = NLA_HDRLEN + sizeof(int),
21497 .nla_type = ZLIB_COMP_WINDOWBITS,
21498 },
21499 .val = -11,
21500 }, {
21501 .nla = {
21502 .nla_len = NLA_HDRLEN + sizeof(int),
21503 .nla_type = ZLIB_COMP_MEMLEVEL,
21504 },
21505 .val = MAX_MEM_LEVEL,
21506 }, {
21507 .nla = {
21508 .nla_len = NLA_HDRLEN + sizeof(int),
21509 .nla_type = ZLIB_COMP_STRATEGY,
21510 },
21511 .val = Z_DEFAULT_STRATEGY,
21512 }
21513};
21514
21515static const struct {
21516 struct nlattr nla;
21517 int val;
21518} deflate_decomp_params[] = {
21519 {
21520 .nla = {
21521 .nla_len = NLA_HDRLEN + sizeof(int),
21522 .nla_type = ZLIB_DECOMP_WINDOWBITS,
21523 },
21524 .val = -11,
21525 }
21526};
21527
21528static struct pcomp_testvec zlib_comp_tv_template[] = {
21529 {
21530 .params = &deflate_comp_params,
21531 .paramsize = sizeof(deflate_comp_params),
21532 .inlen = 70,
21533 .outlen = 38,
21534 .input = "Join us now and share the software "
21535 "Join us now and share the software ",
21536 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
21537 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
21538 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
21539 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
21540 "\x71\xbc\x08\x2b\x01\x00",
21541 }, {
21542 .params = &deflate_comp_params,
21543 .paramsize = sizeof(deflate_comp_params),
21544 .inlen = 191,
21545 .outlen = 122,
21546 .input = "This document describes a compression method based on the DEFLATE"
21547 "compression algorithm. This document defines the application of "
21548 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
21549 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
21550 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
21551 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
21552 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
21553 "\x68\x12\x51\xae\x76\x67\xd6\x27"
21554 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
21555 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
21556 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
21557 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
21558 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
21559 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
21560 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
21561 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
21562 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
21563 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
21564 "\xfa\x02",
21565 },
21566};
21567
21568static struct pcomp_testvec zlib_decomp_tv_template[] = {
21569 {
21570 .params = &deflate_decomp_params,
21571 .paramsize = sizeof(deflate_decomp_params),
21572 .inlen = 122,
21573 .outlen = 191,
21574 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
21575 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
21576 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
21577 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
21578 "\x68\x12\x51\xae\x76\x67\xd6\x27"
21579 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
21580 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
21581 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
21582 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
21583 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
21584 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
21585 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
21586 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
21587 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
21588 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
21589 "\xfa\x02",
21590 .output = "This document describes a compression method based on the DEFLATE"
21591 "compression algorithm. This document defines the application of "
21592 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
21593 }, {
21594 .params = &deflate_decomp_params,
21595 .paramsize = sizeof(deflate_decomp_params),
21596 .inlen = 38,
21597 .outlen = 70,
21598 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
21599 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
21600 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
21601 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
21602 "\x71\xbc\x08\x2b\x01\x00",
21603 .output = "Join us now and share the software "
21604 "Join us now and share the software ",
21605 },
21606};
21607
Herbert Xuda7f0332008-07-31 17:08:25 +080021608/*
21609 * LZO test vectors (null-terminated strings).
21610 */
21611#define LZO_COMP_TEST_VECTORS 2
21612#define LZO_DECOMP_TEST_VECTORS 2
21613
21614static struct comp_testvec lzo_comp_tv_template[] = {
21615 {
21616 .inlen = 70,
21617 .outlen = 46,
21618 .input = "Join us now and share the software "
21619 "Join us now and share the software ",
21620 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
21621 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
21622 "\x64\x20\x73\x68\x61\x72\x65\x20"
21623 "\x74\x68\x65\x20\x73\x6f\x66\x74"
21624 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
21625 "\x3d\x88\x00\x11\x00\x00",
21626 }, {
21627 .inlen = 159,
21628 .outlen = 133,
21629 .input = "This document describes a compression method based on the LZO "
21630 "compression algorithm. This document defines the application of "
21631 "the LZO algorithm used in UBIFS.",
21632 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
21633 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
21634 "\x64\x65\x73\x63\x72\x69\x62\x65"
21635 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
21636 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
21637 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
21638 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
21639 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
21640 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
21641 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
21642 "\x68\x69\x73\x2a\x54\x01\x02\x66"
21643 "\x69\x6e\x65\x73\x94\x06\x05\x61"
21644 "\x70\x70\x6c\x69\x63\x61\x74\x76"
21645 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
21646 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
21647 "\x20\x69\x6e\x20\x55\x42\x49\x46"
21648 "\x53\x2e\x11\x00\x00",
21649 },
21650};
21651
21652static struct comp_testvec lzo_decomp_tv_template[] = {
21653 {
21654 .inlen = 133,
21655 .outlen = 159,
21656 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
21657 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
21658 "\x64\x65\x73\x63\x72\x69\x62\x65"
21659 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
21660 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
21661 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
21662 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
21663 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
21664 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
21665 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
21666 "\x68\x69\x73\x2a\x54\x01\x02\x66"
21667 "\x69\x6e\x65\x73\x94\x06\x05\x61"
21668 "\x70\x70\x6c\x69\x63\x61\x74\x76"
21669 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
21670 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
21671 "\x20\x69\x6e\x20\x55\x42\x49\x46"
21672 "\x53\x2e\x11\x00\x00",
21673 .output = "This document describes a compression method based on the LZO "
21674 "compression algorithm. This document defines the application of "
21675 "the LZO algorithm used in UBIFS.",
21676 }, {
21677 .inlen = 46,
21678 .outlen = 70,
21679 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
21680 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
21681 "\x64\x20\x73\x68\x61\x72\x65\x20"
21682 "\x74\x68\x65\x20\x73\x6f\x66\x74"
21683 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
21684 "\x3d\x88\x00\x11\x00\x00",
21685 .output = "Join us now and share the software "
21686 "Join us now and share the software ",
21687 },
21688};
21689
21690/*
21691 * Michael MIC test vectors from IEEE 802.11i
21692 */
21693#define MICHAEL_MIC_TEST_VECTORS 6
21694
21695static struct hash_testvec michael_mic_tv_template[] = {
21696 {
21697 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
21698 .ksize = 8,
21699 .plaintext = zeroed_string,
21700 .psize = 0,
21701 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
21702 },
21703 {
21704 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
21705 .ksize = 8,
21706 .plaintext = "M",
21707 .psize = 1,
21708 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
21709 },
21710 {
21711 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
21712 .ksize = 8,
21713 .plaintext = "Mi",
21714 .psize = 2,
21715 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
21716 },
21717 {
21718 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
21719 .ksize = 8,
21720 .plaintext = "Mic",
21721 .psize = 3,
21722 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
21723 },
21724 {
21725 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
21726 .ksize = 8,
21727 .plaintext = "Mich",
21728 .psize = 4,
21729 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
21730 },
21731 {
21732 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
21733 .ksize = 8,
21734 .plaintext = "Michael",
21735 .psize = 7,
21736 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
21737 }
21738};
21739
21740/*
21741 * CRC32C test vectors
21742 */
21743#define CRC32C_TEST_VECTORS 14
21744
21745static struct hash_testvec crc32c_tv_template[] = {
21746 {
21747 .psize = 0,
21748 .digest = "\x00\x00\x00\x00",
21749 },
21750 {
21751 .key = "\x87\xa9\xcb\xed",
21752 .ksize = 4,
21753 .psize = 0,
21754 .digest = "\x78\x56\x34\x12",
21755 },
21756 {
21757 .key = "\xff\xff\xff\xff",
21758 .ksize = 4,
21759 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21760 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21761 "\x11\x12\x13\x14\x15\x16\x17\x18"
21762 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21763 "\x21\x22\x23\x24\x25\x26\x27\x28",
21764 .psize = 40,
21765 .digest = "\x7f\x15\x2c\x0e",
21766 },
21767 {
21768 .key = "\xff\xff\xff\xff",
21769 .ksize = 4,
21770 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
21771 "\x31\x32\x33\x34\x35\x36\x37\x38"
21772 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
21773 "\x41\x42\x43\x44\x45\x46\x47\x48"
21774 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
21775 .psize = 40,
21776 .digest = "\xf6\xeb\x80\xe9",
21777 },
21778 {
21779 .key = "\xff\xff\xff\xff",
21780 .ksize = 4,
21781 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
21782 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
21783 "\x61\x62\x63\x64\x65\x66\x67\x68"
21784 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
21785 "\x71\x72\x73\x74\x75\x76\x77\x78",
21786 .psize = 40,
21787 .digest = "\xed\xbd\x74\xde",
21788 },
21789 {
21790 .key = "\xff\xff\xff\xff",
21791 .ksize = 4,
21792 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
21793 "\x81\x82\x83\x84\x85\x86\x87\x88"
21794 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
21795 "\x91\x92\x93\x94\x95\x96\x97\x98"
21796 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
21797 .psize = 40,
21798 .digest = "\x62\xc8\x79\xd5",
21799 },
21800 {
21801 .key = "\xff\xff\xff\xff",
21802 .ksize = 4,
21803 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
21804 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
21805 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
21806 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
21807 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
21808 .psize = 40,
21809 .digest = "\xd0\x9a\x97\xba",
21810 },
21811 {
21812 .key = "\xff\xff\xff\xff",
21813 .ksize = 4,
21814 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
21815 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
21816 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
21817 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
21818 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
21819 .psize = 40,
21820 .digest = "\x13\xd9\x29\x2b",
21821 },
21822 {
21823 .key = "\x80\xea\xd3\xf1",
21824 .ksize = 4,
21825 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
21826 "\x31\x32\x33\x34\x35\x36\x37\x38"
21827 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
21828 "\x41\x42\x43\x44\x45\x46\x47\x48"
21829 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
21830 .psize = 40,
21831 .digest = "\x0c\xb5\xe2\xa2",
21832 },
21833 {
21834 .key = "\xf3\x4a\x1d\x5d",
21835 .ksize = 4,
21836 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
21837 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
21838 "\x61\x62\x63\x64\x65\x66\x67\x68"
21839 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
21840 "\x71\x72\x73\x74\x75\x76\x77\x78",
21841 .psize = 40,
21842 .digest = "\xd1\x7f\xfb\xa6",
21843 },
21844 {
21845 .key = "\x2e\x80\x04\x59",
21846 .ksize = 4,
21847 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
21848 "\x81\x82\x83\x84\x85\x86\x87\x88"
21849 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
21850 "\x91\x92\x93\x94\x95\x96\x97\x98"
21851 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
21852 .psize = 40,
21853 .digest = "\x59\x33\xe6\x7a",
21854 },
21855 {
21856 .key = "\xa6\xcc\x19\x85",
21857 .ksize = 4,
21858 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
21859 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
21860 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
21861 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
21862 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
21863 .psize = 40,
21864 .digest = "\xbe\x03\x01\xd2",
21865 },
21866 {
21867 .key = "\x41\xfc\xfe\x2d",
21868 .ksize = 4,
21869 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
21870 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
21871 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
21872 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
21873 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
21874 .psize = 40,
21875 .digest = "\x75\xd3\xc5\x24",
21876 },
21877 {
21878 .key = "\xff\xff\xff\xff",
21879 .ksize = 4,
21880 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21881 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21882 "\x11\x12\x13\x14\x15\x16\x17\x18"
21883 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21884 "\x21\x22\x23\x24\x25\x26\x27\x28"
21885 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
21886 "\x31\x32\x33\x34\x35\x36\x37\x38"
21887 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
21888 "\x41\x42\x43\x44\x45\x46\x47\x48"
21889 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
21890 "\x51\x52\x53\x54\x55\x56\x57\x58"
21891 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
21892 "\x61\x62\x63\x64\x65\x66\x67\x68"
21893 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
21894 "\x71\x72\x73\x74\x75\x76\x77\x78"
21895 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
21896 "\x81\x82\x83\x84\x85\x86\x87\x88"
21897 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
21898 "\x91\x92\x93\x94\x95\x96\x97\x98"
21899 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
21900 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
21901 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
21902 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
21903 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
21904 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
21905 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
21906 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
21907 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
21908 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
21909 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
21910 .psize = 240,
21911 .digest = "\x75\xd3\xc5\x24",
21912 .np = 2,
21913 .tap = { 31, 209 }
21914 },
21915};
21916
Sonic Zhanga482b082012-05-25 17:54:13 +080021917/*
21918 * Blakcifn CRC test vectors
21919 */
21920#define BFIN_CRC_TEST_VECTORS 6
21921
21922static struct hash_testvec bfin_crc_tv_template[] = {
21923 {
21924 .psize = 0,
21925 .digest = "\x00\x00\x00\x00",
21926 },
21927 {
21928 .key = "\x87\xa9\xcb\xed",
21929 .ksize = 4,
21930 .psize = 0,
21931 .digest = "\x87\xa9\xcb\xed",
21932 },
21933 {
21934 .key = "\xff\xff\xff\xff",
21935 .ksize = 4,
21936 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21937 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21938 "\x11\x12\x13\x14\x15\x16\x17\x18"
21939 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21940 "\x21\x22\x23\x24\x25\x26\x27\x28",
21941 .psize = 40,
21942 .digest = "\x84\x0c\x8d\xa2",
21943 },
21944 {
21945 .key = "\xff\xff\xff\xff",
21946 .ksize = 4,
21947 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21948 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21949 "\x11\x12\x13\x14\x15\x16\x17\x18"
21950 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21951 "\x21\x22\x23\x24\x25\x26",
21952 .psize = 38,
21953 .digest = "\x8c\x58\xec\xb7",
21954 },
21955 {
21956 .key = "\xff\xff\xff\xff",
21957 .ksize = 4,
21958 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21959 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21960 "\x11\x12\x13\x14\x15\x16\x17\x18"
21961 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21962 "\x21\x22\x23\x24\x25\x26\x27",
21963 .psize = 39,
21964 .digest = "\xdc\x50\x28\x7b",
21965 },
21966 {
21967 .key = "\xff\xff\xff\xff",
21968 .ksize = 4,
21969 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
21970 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
21971 "\x11\x12\x13\x14\x15\x16\x17\x18"
21972 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
21973 "\x21\x22\x23\x24\x25\x26\x27\x28"
21974 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
21975 "\x31\x32\x33\x34\x35\x36\x37\x38"
21976 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
21977 "\x41\x42\x43\x44\x45\x46\x47\x48"
21978 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
21979 "\x51\x52\x53\x54\x55\x56\x57\x58"
21980 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
21981 "\x61\x62\x63\x64\x65\x66\x67\x68"
21982 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
21983 "\x71\x72\x73\x74\x75\x76\x77\x78"
21984 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
21985 "\x81\x82\x83\x84\x85\x86\x87\x88"
21986 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
21987 "\x91\x92\x93\x94\x95\x96\x97\x98"
21988 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
21989 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
21990 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
21991 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
21992 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
21993 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
21994 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
21995 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
21996 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
21997 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
21998 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
21999 .psize = 240,
22000 .digest = "\x10\x19\x4a\x5c",
22001 .np = 2,
22002 .tap = { 31, 209 }
22003 },
22004
22005};
22006
Herbert Xuda7f0332008-07-31 17:08:25 +080022007#endif /* _CRYPTO_TESTMGR_H */