blob: 17db4a9c7265a3092bbf6b04c187248f28c94796 [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 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002027#define DES_ENC_TEST_VECTORS 11
2028#define DES_DEC_TEST_VECTORS 5
2029#define DES_CBC_ENC_TEST_VECTORS 6
2030#define DES_CBC_DEC_TEST_VECTORS 5
2031#define DES_CTR_ENC_TEST_VECTORS 2
2032#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03002033#define DES3_EDE_ENC_TEST_VECTORS 4
2034#define DES3_EDE_DEC_TEST_VECTORS 4
2035#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
2036#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
2037#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
2038#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08002039
2040static struct cipher_testvec des_enc_tv_template[] = {
2041 { /* From Applied Cryptography */
2042 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2043 .klen = 8,
2044 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2045 .ilen = 8,
2046 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2047 .rlen = 8,
2048 }, { /* Same key, different plaintext block */
2049 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2050 .klen = 8,
2051 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2052 .ilen = 8,
2053 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2054 .rlen = 8,
2055 }, { /* Sbox test from NBS */
2056 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2057 .klen = 8,
2058 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2059 .ilen = 8,
2060 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2061 .rlen = 8,
2062 }, { /* Three blocks */
2063 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2064 .klen = 8,
2065 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2066 "\x22\x33\x44\x55\x66\x77\x88\x99"
2067 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2068 .ilen = 24,
2069 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2070 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2071 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2072 .rlen = 24,
2073 }, { /* Weak key */
2074 .fail = 1,
2075 .wk = 1,
2076 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2077 .klen = 8,
2078 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2079 .ilen = 8,
2080 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2081 .rlen = 8,
2082 }, { /* Two blocks -- for testing encryption across pages */
2083 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2084 .klen = 8,
2085 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2086 "\x22\x33\x44\x55\x66\x77\x88\x99",
2087 .ilen = 16,
2088 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2089 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2090 .rlen = 16,
2091 .np = 2,
2092 .tap = { 8, 8 }
2093 }, { /* Four blocks -- for testing encryption with chunking */
2094 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2095 .klen = 8,
2096 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2097 "\x22\x33\x44\x55\x66\x77\x88\x99"
2098 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2099 "\x22\x33\x44\x55\x66\x77\x88\x99",
2100 .ilen = 32,
2101 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2102 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2103 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2104 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2105 .rlen = 32,
2106 .np = 3,
2107 .tap = { 14, 10, 8 }
2108 }, {
2109 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2110 .klen = 8,
2111 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2112 "\x22\x33\x44\x55\x66\x77\x88\x99"
2113 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2114 .ilen = 24,
2115 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2116 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2117 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2118 .rlen = 24,
2119 .np = 4,
2120 .tap = { 2, 1, 3, 18 }
2121 }, {
2122 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2123 .klen = 8,
2124 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2125 "\x22\x33\x44\x55\x66\x77\x88\x99",
2126 .ilen = 16,
2127 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2128 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2129 .rlen = 16,
2130 .np = 5,
2131 .tap = { 2, 2, 2, 2, 8 }
2132 }, {
2133 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2134 .klen = 8,
2135 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2136 .ilen = 8,
2137 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2138 .rlen = 8,
2139 .np = 8,
2140 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002141 }, { /* Generated with Crypto++ */
2142 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2143 .klen = 8,
2144 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2145 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2146 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2147 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2148 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2149 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2150 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2151 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2152 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2153 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2154 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2155 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2156 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2157 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2158 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2159 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2160 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2161 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2162 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2163 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2164 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2165 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2166 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2167 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2168 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2169 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2170 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2171 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2172 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2173 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2174 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2175 .ilen = 248,
2176 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
2177 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
2178 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
2179 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
2180 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
2181 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
2182 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
2183 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
2184 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
2185 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
2186 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
2187 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
2188 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
2189 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
2190 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
2191 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
2192 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
2193 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
2194 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
2195 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
2196 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
2197 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
2198 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
2199 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
2200 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
2201 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
2202 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
2203 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
2204 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
2205 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
2206 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
2207 .rlen = 248,
2208 .also_non_np = 1,
2209 .np = 2,
2210 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002211 },
2212};
2213
2214static struct cipher_testvec des_dec_tv_template[] = {
2215 { /* From Applied Cryptography */
2216 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2217 .klen = 8,
2218 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2219 .ilen = 8,
2220 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2221 .rlen = 8,
2222 }, { /* Sbox test from NBS */
2223 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2224 .klen = 8,
2225 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2226 .ilen = 8,
2227 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2228 .rlen = 8,
2229 }, { /* Two blocks, for chunking test */
2230 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2231 .klen = 8,
2232 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2233 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2234 .ilen = 16,
2235 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2236 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2237 .rlen = 16,
2238 .np = 2,
2239 .tap = { 8, 8 }
2240 }, {
2241 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2242 .klen = 8,
2243 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2244 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2245 .ilen = 16,
2246 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2247 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2248 .rlen = 16,
2249 .np = 3,
2250 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002251 }, { /* Generated with Crypto++ */
2252 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2253 .klen = 8,
2254 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
2255 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
2256 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
2257 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
2258 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
2259 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
2260 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
2261 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
2262 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
2263 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
2264 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
2265 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
2266 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
2267 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
2268 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
2269 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
2270 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
2271 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
2272 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
2273 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
2274 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
2275 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
2276 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
2277 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
2278 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
2279 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
2280 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
2281 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
2282 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
2283 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
2284 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
2285 .ilen = 248,
2286 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2287 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2288 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2289 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2290 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2291 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2292 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2293 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2294 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2295 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2296 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2297 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2298 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2299 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2300 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2301 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2302 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2303 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2304 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2305 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2306 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2307 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2308 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2309 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2310 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2311 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2312 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2313 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2314 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2315 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2316 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2317 .rlen = 248,
2318 .also_non_np = 1,
2319 .np = 2,
2320 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002321 },
2322};
2323
2324static struct cipher_testvec des_cbc_enc_tv_template[] = {
2325 { /* From OpenSSL */
2326 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2327 .klen = 8,
2328 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2329 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2330 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2331 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2332 .ilen = 24,
2333 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2334 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2335 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2336 .rlen = 24,
2337 }, { /* FIPS Pub 81 */
2338 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2339 .klen = 8,
2340 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2341 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2342 .ilen = 8,
2343 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2344 .rlen = 8,
2345 }, {
2346 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2347 .klen = 8,
2348 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2349 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2350 .ilen = 8,
2351 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2352 .rlen = 8,
2353 }, {
2354 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2355 .klen = 8,
2356 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2357 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2358 .ilen = 8,
2359 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2360 .rlen = 8,
2361 }, { /* Copy of openssl vector for chunk testing */
2362 /* From OpenSSL */
2363 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2364 .klen = 8,
2365 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2366 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2367 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2368 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2369 .ilen = 24,
2370 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2371 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2372 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2373 .rlen = 24,
2374 .np = 2,
2375 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002376 }, { /* Generated with Crypto++ */
2377 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2378 .klen = 8,
2379 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2380 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2381 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2382 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2383 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2384 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2385 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2386 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2387 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2388 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2389 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2390 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2391 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2392 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2393 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2394 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2395 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2396 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2397 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2398 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2399 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2400 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2401 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2402 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2403 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2404 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2405 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2406 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2407 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2408 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2409 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2410 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2411 .ilen = 248,
2412 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
2413 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
2414 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
2415 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
2416 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
2417 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
2418 "\x81\x72\x74\xDE\x30\x19\x69\x49"
2419 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
2420 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
2421 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
2422 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
2423 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
2424 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
2425 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
2426 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
2427 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
2428 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
2429 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
2430 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
2431 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
2432 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
2433 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
2434 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
2435 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
2436 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
2437 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
2438 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
2439 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
2440 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
2441 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
2442 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
2443 .rlen = 248,
2444 .also_non_np = 1,
2445 .np = 2,
2446 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002447 },
2448};
2449
2450static struct cipher_testvec des_cbc_dec_tv_template[] = {
2451 { /* FIPS Pub 81 */
2452 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2453 .klen = 8,
2454 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2455 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2456 .ilen = 8,
2457 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2458 .rlen = 8,
2459 }, {
2460 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2461 .klen = 8,
2462 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2463 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2464 .ilen = 8,
2465 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2466 .rlen = 8,
2467 }, {
2468 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2469 .klen = 8,
2470 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2471 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2472 .ilen = 8,
2473 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2474 .rlen = 8,
2475 }, { /* Copy of above, for chunk testing */
2476 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2477 .klen = 8,
2478 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2479 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2480 .ilen = 8,
2481 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2482 .rlen = 8,
2483 .np = 2,
2484 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002485 }, { /* Generated with Crypto++ */
2486 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2487 .klen = 8,
2488 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2489 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
2490 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
2491 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
2492 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
2493 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
2494 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
2495 "\x81\x72\x74\xDE\x30\x19\x69\x49"
2496 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
2497 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
2498 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
2499 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
2500 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
2501 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
2502 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
2503 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
2504 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
2505 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
2506 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
2507 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
2508 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
2509 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
2510 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
2511 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
2512 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
2513 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
2514 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
2515 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
2516 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
2517 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
2518 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
2519 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
2520 .ilen = 248,
2521 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2522 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2523 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2524 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2525 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2526 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2527 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2528 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2529 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2530 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2531 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2532 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2533 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2534 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2535 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2536 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2537 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2538 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2539 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2540 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2541 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2542 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2543 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2544 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2545 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2546 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2547 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2548 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2549 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2550 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2551 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2552 .rlen = 248,
2553 .also_non_np = 1,
2554 .np = 2,
2555 .tap = { 248 - 8, 8 },
2556 },
2557};
2558
2559static struct cipher_testvec des_ctr_enc_tv_template[] = {
2560 { /* Generated with Crypto++ */
2561 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2562 .klen = 8,
2563 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2564 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2565 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2566 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2567 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2568 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2569 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2570 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2571 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2572 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2573 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2574 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2575 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2576 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2577 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2578 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2579 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2580 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2581 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2582 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2583 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2584 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2585 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2586 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2587 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2588 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2589 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2590 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2591 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2592 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2593 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2594 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2595 .ilen = 248,
2596 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
2597 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
2598 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
2599 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
2600 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
2601 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
2602 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
2603 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
2604 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
2605 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
2606 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
2607 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
2608 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
2609 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
2610 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
2611 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
2612 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
2613 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
2614 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
2615 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
2616 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
2617 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
2618 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
2619 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
2620 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
2621 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
2622 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
2623 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
2624 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
2625 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
2626 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
2627 .rlen = 248,
2628 .also_non_np = 1,
2629 .np = 2,
2630 .tap = { 248 - 8, 8 },
2631 }, { /* Generated with Crypto++ */
2632 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2633 .klen = 8,
2634 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2635 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2636 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2637 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2638 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2639 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2640 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2641 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2642 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2643 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2644 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2645 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2646 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2647 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2648 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2649 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2650 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2651 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2652 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2653 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2654 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2655 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2656 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2657 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2658 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2659 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2660 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2661 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2662 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2663 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2664 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2665 "\xC6\x2F\xBB\x24\x8D\x19\x82",
2666 .ilen = 247,
2667 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
2668 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
2669 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
2670 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
2671 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
2672 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
2673 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
2674 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
2675 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
2676 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
2677 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
2678 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
2679 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
2680 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
2681 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
2682 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
2683 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
2684 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
2685 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
2686 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
2687 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
2688 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
2689 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
2690 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
2691 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
2692 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
2693 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
2694 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
2695 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
2696 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
2697 "\x91\x45\x05\x3E\x58\xBF\x32",
2698 .rlen = 247,
2699 .also_non_np = 1,
2700 .np = 2,
2701 .tap = { 247 - 8, 8 },
2702 },
2703};
2704
2705static struct cipher_testvec des_ctr_dec_tv_template[] = {
2706 { /* Generated with Crypto++ */
2707 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2708 .klen = 8,
2709 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2710 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
2711 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
2712 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
2713 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
2714 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
2715 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
2716 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
2717 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
2718 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
2719 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
2720 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
2721 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
2722 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
2723 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
2724 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
2725 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
2726 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
2727 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
2728 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
2729 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
2730 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
2731 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
2732 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
2733 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
2734 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
2735 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
2736 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
2737 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
2738 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
2739 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
2740 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
2741 .ilen = 248,
2742 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2743 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2744 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2745 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2746 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2747 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2748 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2749 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2750 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2751 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2752 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2753 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2754 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2755 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2756 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2757 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2758 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2759 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2760 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2761 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2762 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2763 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2764 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2765 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2766 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2767 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2768 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2769 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2770 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2771 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2772 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2773 .rlen = 248,
2774 .also_non_np = 1,
2775 .np = 2,
2776 .tap = { 248 - 8, 8 },
2777 }, { /* Generated with Crypto++ */
2778 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2779 .klen = 8,
2780 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2781 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
2782 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
2783 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
2784 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
2785 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
2786 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
2787 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
2788 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
2789 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
2790 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
2791 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
2792 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
2793 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
2794 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
2795 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
2796 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
2797 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
2798 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
2799 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
2800 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
2801 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
2802 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
2803 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
2804 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
2805 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
2806 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
2807 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
2808 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
2809 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
2810 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
2811 "\x91\x45\x05\x3E\x58\xBF\x32",
2812 .ilen = 247,
2813 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2814 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2815 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2816 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2817 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2818 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2819 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2820 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2821 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2822 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2823 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2824 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2825 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2826 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2827 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2828 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2829 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2830 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2831 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2832 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2833 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2834 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2835 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2836 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2837 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2838 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2839 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2840 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2841 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2842 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2843 "\xC6\x2F\xBB\x24\x8D\x19\x82",
2844 .rlen = 247,
2845 .also_non_np = 1,
2846 .np = 2,
2847 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002848 },
2849};
2850
2851static struct cipher_testvec des3_ede_enc_tv_template[] = {
2852 { /* These are from openssl */
2853 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2854 "\x55\x55\x55\x55\x55\x55\x55\x55"
2855 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2856 .klen = 24,
2857 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2858 .ilen = 8,
2859 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2860 .rlen = 8,
2861 }, {
2862 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2863 "\x86\x02\x87\x66\x59\x08\x21\x98"
2864 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2865 .klen = 24,
2866 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2867 .ilen = 8,
2868 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2869 .rlen = 8,
2870 }, {
2871 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2872 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2873 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2874 .klen = 24,
2875 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2876 .ilen = 8,
2877 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2878 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03002879 }, { /* Generated with Crypto++ */
2880 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
2881 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
2882 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
2883 .klen = 24,
2884 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
2885 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
2886 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
2887 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
2888 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
2889 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
2890 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
2891 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
2892 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
2893 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
2894 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
2895 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
2896 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
2897 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
2898 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
2899 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
2900 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
2901 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
2902 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
2903 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
2904 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
2905 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
2906 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
2907 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
2908 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
2909 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
2910 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
2911 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
2912 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
2913 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
2914 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
2915 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
2916 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
2917 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
2918 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
2919 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
2920 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
2921 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
2922 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
2923 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
2924 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
2925 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
2926 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
2927 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
2928 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
2929 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
2930 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
2931 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
2932 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
2933 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
2934 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
2935 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
2936 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
2937 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
2938 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
2939 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
2940 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
2941 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
2942 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
2943 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
2944 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
2945 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
2946 .ilen = 496,
2947 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
2948 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
2949 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
2950 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
2951 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
2952 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
2953 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
2954 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
2955 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
2956 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
2957 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
2958 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
2959 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
2960 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
2961 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
2962 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
2963 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
2964 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
2965 "\x45\x86\x50\x01\x70\x35\x99\x92"
2966 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
2967 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
2968 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
2969 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
2970 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
2971 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
2972 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
2973 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
2974 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
2975 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
2976 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
2977 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
2978 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
2979 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
2980 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
2981 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
2982 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
2983 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
2984 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
2985 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
2986 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
2987 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
2988 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
2989 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
2990 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
2991 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
2992 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
2993 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
2994 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
2995 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
2996 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
2997 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
2998 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
2999 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
3000 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
3001 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
3002 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
3003 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
3004 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
3005 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
3006 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
3007 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
3008 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
3009 .rlen = 496,
3010 .also_non_np = 1,
3011 .np = 2,
3012 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003013 },
3014};
3015
3016static struct cipher_testvec des3_ede_dec_tv_template[] = {
3017 { /* These are from openssl */
3018 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3019 "\x55\x55\x55\x55\x55\x55\x55\x55"
3020 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3021 .klen = 24,
3022 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
3023 .ilen = 8,
3024 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
3025 .rlen = 8,
3026 }, {
3027 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
3028 "\x86\x02\x87\x66\x59\x08\x21\x98"
3029 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
3030 .klen = 24,
3031 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
3032 .ilen = 8,
3033 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
3034 .rlen = 8,
3035 }, {
3036 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
3037 "\x91\x07\xd0\x15\x89\x19\x01\x01"
3038 "\x19\x07\x92\x10\x98\x1a\x01\x01",
3039 .klen = 24,
3040 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
3041 .ilen = 8,
3042 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
3043 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003044 }, { /* Generated with Crypto++ */
3045 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
3046 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
3047 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
3048 .klen = 24,
3049 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
3050 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
3051 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
3052 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
3053 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
3054 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
3055 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
3056 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
3057 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
3058 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
3059 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
3060 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
3061 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
3062 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
3063 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
3064 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
3065 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
3066 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
3067 "\x45\x86\x50\x01\x70\x35\x99\x92"
3068 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
3069 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
3070 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
3071 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
3072 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
3073 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
3074 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
3075 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
3076 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
3077 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
3078 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
3079 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
3080 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
3081 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
3082 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
3083 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
3084 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
3085 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
3086 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
3087 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
3088 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
3089 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
3090 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
3091 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
3092 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
3093 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
3094 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
3095 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
3096 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
3097 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
3098 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
3099 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
3100 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
3101 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
3102 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
3103 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
3104 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
3105 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
3106 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
3107 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
3108 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
3109 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
3110 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
3111 .ilen = 496,
3112 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3113 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3114 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3115 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3116 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3117 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3118 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3119 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3120 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3121 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3122 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3123 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3124 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3125 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3126 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3127 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3128 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3129 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3130 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3131 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3132 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3133 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3134 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3135 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3136 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3137 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3138 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3139 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3140 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3141 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3142 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3143 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3144 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3145 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3146 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3147 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3148 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3149 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3150 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3151 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3152 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3153 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3154 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3155 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3156 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3157 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3158 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3159 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3160 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3161 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3162 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3163 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3164 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3165 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3166 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3167 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3168 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3169 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3170 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3171 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3172 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3173 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3174 .rlen = 496,
3175 .also_non_np = 1,
3176 .np = 2,
3177 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003178 },
3179};
3180
3181static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
3182 { /* Generated from openssl */
3183 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
3184 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
3185 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
3186 .klen = 24,
3187 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
3188 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
3189 "\x53\x20\x63\x65\x65\x72\x73\x74"
3190 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
3191 "\x20\x79\x65\x53\x72\x63\x74\x65"
3192 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
3193 "\x79\x6e\x53\x20\x63\x65\x65\x72"
3194 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
3195 "\x6e\x61\x20\x79\x65\x53\x72\x63"
3196 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
3197 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
3198 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
3199 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
3200 "\x72\x63\x74\x65\x20\x73\x6f\x54"
3201 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
3202 "\x63\x65\x65\x72\x73\x74\x54\x20"
3203 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
3204 .ilen = 128,
3205 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
3206 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
3207 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
3208 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
3209 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
3210 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
3211 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
3212 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
3213 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
3214 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
3215 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
3216 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
3217 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
3218 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
3219 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
3220 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
3221 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003222 }, { /* Generated with Crypto++ */
3223 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3224 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3225 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3226 .klen = 24,
3227 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3228 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3229 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3230 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3231 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3232 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3233 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3234 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3235 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3236 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3237 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3238 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3239 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3240 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3241 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3242 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3243 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3244 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3245 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3246 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3247 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3248 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3249 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3250 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3251 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3252 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3253 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3254 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3255 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3256 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3257 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3258 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3259 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3260 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3261 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3262 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3263 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3264 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3265 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3266 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3267 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3268 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3269 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3270 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3271 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3272 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3273 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3274 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3275 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3276 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3277 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3278 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3279 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3280 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3281 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3282 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3283 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3284 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3285 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3286 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3287 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3288 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3289 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3290 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3291 .ilen = 496,
3292 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
3293 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
3294 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
3295 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
3296 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
3297 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
3298 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
3299 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
3300 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
3301 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
3302 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
3303 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
3304 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
3305 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
3306 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
3307 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
3308 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
3309 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
3310 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
3311 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
3312 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
3313 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
3314 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
3315 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
3316 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
3317 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
3318 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
3319 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
3320 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
3321 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
3322 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
3323 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
3324 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
3325 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
3326 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
3327 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
3328 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
3329 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
3330 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
3331 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
3332 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
3333 "\x73\x50\x08\x56\x20\x9B\x94\x23"
3334 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
3335 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
3336 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
3337 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
3338 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
3339 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
3340 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
3341 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
3342 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
3343 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
3344 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
3345 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
3346 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
3347 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
3348 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
3349 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
3350 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
3351 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
3352 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
3353 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
3354 .rlen = 496,
3355 .also_non_np = 1,
3356 .np = 2,
3357 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003358 },
3359};
3360
3361static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
3362 { /* Generated from openssl */
3363 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
3364 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
3365 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
3366 .klen = 24,
3367 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
3368 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
3369 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
3370 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
3371 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
3372 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
3373 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
3374 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
3375 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
3376 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
3377 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
3378 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
3379 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
3380 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
3381 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
3382 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
3383 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
3384 .ilen = 128,
3385 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
3386 "\x53\x20\x63\x65\x65\x72\x73\x74"
3387 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
3388 "\x20\x79\x65\x53\x72\x63\x74\x65"
3389 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
3390 "\x79\x6e\x53\x20\x63\x65\x65\x72"
3391 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
3392 "\x6e\x61\x20\x79\x65\x53\x72\x63"
3393 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
3394 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
3395 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
3396 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
3397 "\x72\x63\x74\x65\x20\x73\x6f\x54"
3398 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
3399 "\x63\x65\x65\x72\x73\x74\x54\x20"
3400 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
3401 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003402 }, { /* Generated with Crypto++ */
3403 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3404 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3405 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3406 .klen = 24,
3407 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3408 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3409 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
3410 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
3411 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
3412 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
3413 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
3414 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
3415 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
3416 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
3417 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
3418 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
3419 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
3420 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
3421 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
3422 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
3423 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
3424 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
3425 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
3426 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
3427 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
3428 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
3429 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
3430 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
3431 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
3432 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
3433 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
3434 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
3435 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
3436 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
3437 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
3438 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
3439 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
3440 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
3441 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
3442 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
3443 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
3444 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
3445 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
3446 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
3447 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
3448 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
3449 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
3450 "\x73\x50\x08\x56\x20\x9B\x94\x23"
3451 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
3452 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
3453 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
3454 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
3455 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
3456 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
3457 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
3458 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
3459 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
3460 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
3461 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
3462 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
3463 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
3464 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
3465 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
3466 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
3467 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
3468 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
3469 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
3470 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
3471 .ilen = 496,
3472 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3473 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3474 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3475 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3476 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3477 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3478 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3479 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3480 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3481 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3482 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3483 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3484 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3485 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3486 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3487 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3488 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3489 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3490 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3491 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3492 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3493 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3494 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3495 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3496 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3497 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3498 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3499 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3500 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3501 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3502 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3503 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3504 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3505 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3506 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3507 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3508 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3509 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3510 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3511 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3512 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3513 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3514 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3515 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3516 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3517 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3518 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3519 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3520 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3521 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3522 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3523 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3524 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3525 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3526 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3527 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3528 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3529 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3530 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3531 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3532 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3533 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3534 .rlen = 496,
3535 .also_non_np = 1,
3536 .np = 2,
3537 .tap = { 496 - 16, 16 },
3538 },
3539};
3540
3541static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
3542 { /* Generated with Crypto++ */
3543 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3544 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3545 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3546 .klen = 24,
3547 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3548 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3549 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3550 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3551 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3552 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3553 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3554 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3555 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3556 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3557 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3558 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3559 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3560 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3561 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3562 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3563 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3564 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3565 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3566 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3567 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3568 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3569 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3570 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3571 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3572 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3573 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3574 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3575 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3576 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3577 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3578 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3579 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3580 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3581 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3582 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3583 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3584 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3585 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3586 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3587 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3588 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3589 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3590 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3591 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3592 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3593 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3594 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3595 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3596 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3597 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3598 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3599 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3600 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3601 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3602 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3603 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3604 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3605 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3606 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3607 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3608 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3609 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3610 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3611 .ilen = 496,
3612 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
3613 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
3614 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
3615 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
3616 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
3617 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
3618 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
3619 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
3620 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
3621 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
3622 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
3623 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
3624 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
3625 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
3626 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
3627 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
3628 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
3629 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
3630 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
3631 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
3632 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
3633 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
3634 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
3635 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
3636 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
3637 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
3638 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
3639 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
3640 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
3641 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
3642 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
3643 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
3644 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
3645 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
3646 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
3647 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
3648 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
3649 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
3650 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
3651 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
3652 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
3653 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
3654 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
3655 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
3656 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
3657 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
3658 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
3659 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
3660 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
3661 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
3662 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
3663 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
3664 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
3665 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
3666 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
3667 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
3668 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
3669 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
3670 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
3671 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
3672 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
3673 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
3674 .rlen = 496,
3675 .also_non_np = 1,
3676 .np = 2,
3677 .tap = { 496 - 16, 16 },
3678 }, { /* Generated with Crypto++ */
3679 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3680 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3681 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3682 .klen = 24,
3683 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3684 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3685 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3686 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3687 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3688 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3689 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3690 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3691 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3692 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3693 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3694 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3695 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3696 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3697 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3698 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3699 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3700 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3701 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3702 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3703 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3704 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3705 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3706 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3707 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3708 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3709 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3710 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3711 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3712 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3713 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3714 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3715 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3716 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3717 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3718 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3719 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3720 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3721 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3722 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3723 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3724 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3725 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3726 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3727 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3728 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3729 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3730 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3731 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3732 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3733 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3734 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3735 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3736 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3737 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3738 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3739 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3740 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3741 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3742 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3743 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3744 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3745 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3746 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
3747 "\x2E\xB1\x18",
3748 .ilen = 499,
3749 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
3750 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
3751 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
3752 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
3753 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
3754 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
3755 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
3756 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
3757 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
3758 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
3759 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
3760 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
3761 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
3762 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
3763 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
3764 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
3765 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
3766 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
3767 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
3768 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
3769 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
3770 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
3771 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
3772 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
3773 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
3774 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
3775 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
3776 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
3777 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
3778 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
3779 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
3780 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
3781 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
3782 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
3783 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
3784 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
3785 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
3786 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
3787 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
3788 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
3789 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
3790 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
3791 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
3792 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
3793 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
3794 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
3795 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
3796 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
3797 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
3798 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
3799 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
3800 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
3801 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
3802 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
3803 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
3804 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
3805 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
3806 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
3807 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
3808 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
3809 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
3810 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
3811 "\xF2\x79\xD9",
3812 .rlen = 499,
3813 .also_non_np = 1,
3814 .np = 2,
3815 .tap = { 499 - 16, 16 },
3816 },
3817};
3818
3819static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
3820 { /* Generated with Crypto++ */
3821 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3822 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3823 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3824 .klen = 24,
3825 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3826 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3827 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
3828 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
3829 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
3830 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
3831 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
3832 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
3833 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
3834 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
3835 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
3836 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
3837 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
3838 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
3839 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
3840 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
3841 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
3842 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
3843 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
3844 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
3845 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
3846 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
3847 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
3848 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
3849 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
3850 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
3851 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
3852 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
3853 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
3854 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
3855 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
3856 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
3857 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
3858 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
3859 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
3860 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
3861 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
3862 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
3863 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
3864 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
3865 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
3866 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
3867 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
3868 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
3869 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
3870 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
3871 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
3872 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
3873 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
3874 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
3875 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
3876 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
3877 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
3878 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
3879 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
3880 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
3881 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
3882 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
3883 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
3884 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
3885 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
3886 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
3887 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
3888 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
3889 .ilen = 496,
3890 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3891 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3892 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3893 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3894 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3895 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3896 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3897 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3898 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3899 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3900 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3901 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3902 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3903 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3904 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3905 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3906 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3907 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3908 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3909 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3910 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3911 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3912 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3913 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3914 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3915 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3916 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3917 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3918 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3919 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3920 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3921 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3922 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3923 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3924 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3925 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3926 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3927 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3928 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3929 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3930 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3931 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3932 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3933 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3934 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3935 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3936 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3937 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3938 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3939 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3940 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3941 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3942 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3943 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3944 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3945 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3946 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3947 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3948 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3949 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3950 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3951 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3952 .rlen = 496,
3953 .also_non_np = 1,
3954 .np = 2,
3955 .tap = { 496 - 16, 16 },
3956 }, { /* Generated with Crypto++ */
3957 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3958 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3959 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3960 .klen = 24,
3961 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3962 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3963 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
3964 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
3965 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
3966 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
3967 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
3968 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
3969 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
3970 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
3971 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
3972 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
3973 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
3974 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
3975 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
3976 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
3977 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
3978 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
3979 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
3980 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
3981 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
3982 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
3983 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
3984 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
3985 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
3986 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
3987 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
3988 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
3989 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
3990 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
3991 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
3992 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
3993 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
3994 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
3995 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
3996 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
3997 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
3998 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
3999 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
4000 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
4001 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
4002 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
4003 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
4004 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
4005 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
4006 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
4007 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
4008 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
4009 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
4010 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
4011 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
4012 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
4013 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
4014 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
4015 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
4016 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
4017 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
4018 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
4019 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
4020 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
4021 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
4022 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
4023 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
4024 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
4025 "\xF2\x79\xD9",
4026 .ilen = 499,
4027 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4028 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4029 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4030 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4031 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4032 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4033 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4034 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4035 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4036 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4037 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4038 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4039 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4040 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4041 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4042 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4043 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4044 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4045 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4046 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4047 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4048 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4049 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4050 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4051 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4052 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4053 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4054 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4055 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4056 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4057 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4058 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4059 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4060 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4061 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4062 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4063 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4064 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4065 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4066 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4067 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4068 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4069 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4070 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4071 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4072 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4073 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4074 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4075 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4076 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4077 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4078 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4079 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4080 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4081 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4082 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4083 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4084 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4085 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4086 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4087 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4088 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
4089 "\x2E\xB1\x18",
4090 .rlen = 499,
4091 .also_non_np = 1,
4092 .np = 2,
4093 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004094 },
4095};
4096
4097/*
4098 * Blowfish test vectors.
4099 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004100#define BF_ENC_TEST_VECTORS 7
4101#define BF_DEC_TEST_VECTORS 7
4102#define BF_CBC_ENC_TEST_VECTORS 2
4103#define BF_CBC_DEC_TEST_VECTORS 2
4104#define BF_CTR_ENC_TEST_VECTORS 2
4105#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08004106
4107static struct cipher_testvec bf_enc_tv_template[] = {
4108 { /* DES test vectors from OpenSSL */
4109 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
4110 .klen = 8,
4111 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4112 .ilen = 8,
4113 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
4114 .rlen = 8,
4115 }, {
4116 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
4117 .klen = 8,
4118 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4119 .ilen = 8,
4120 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
4121 .rlen = 8,
4122 }, {
4123 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4124 .klen = 8,
4125 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4126 .ilen = 8,
4127 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
4128 .rlen = 8,
4129 }, { /* Vary the keylength... */
4130 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4131 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
4132 .klen = 16,
4133 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4134 .ilen = 8,
4135 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
4136 .rlen = 8,
4137 }, {
4138 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4139 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4140 "\x00\x11\x22\x33\x44",
4141 .klen = 21,
4142 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4143 .ilen = 8,
4144 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
4145 .rlen = 8,
4146 }, { /* Generated with bf488 */
4147 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4148 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4149 "\x00\x11\x22\x33\x44\x55\x66\x77"
4150 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
4151 "\x58\x40\x23\x64\x1a\xba\x61\x76"
4152 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
4153 "\xff\xff\xff\xff\xff\xff\xff\xff",
4154 .klen = 56,
4155 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4156 .ilen = 8,
4157 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
4158 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004159 }, { /* Generated with Crypto++ */
4160 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4161 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4162 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4163 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4164 .klen = 32,
4165 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4166 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4167 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4168 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004169 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4170 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4171 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4172 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4173 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4174 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4175 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4176 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4177 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4178 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4179 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4180 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4181 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4182 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4183 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4184 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4185 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4186 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4187 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4188 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4189 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4190 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4191 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4192 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4193 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4194 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4195 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4196 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4197 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4198 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4199 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4200 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4201 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4202 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4203 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4204 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4205 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4206 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4207 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4208 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4209 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4210 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4211 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4212 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4213 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4214 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4215 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4216 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4217 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4218 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4219 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4220 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4221 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4222 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4223 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4224 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4225 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4226 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4227 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4228 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004229 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
4230 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
4231 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
4232 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004233 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
4234 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
4235 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
4236 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
4237 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
4238 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
4239 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
4240 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
4241 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
4242 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
4243 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
4244 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
4245 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
4246 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
4247 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
4248 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
4249 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
4250 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
4251 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
4252 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
4253 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
4254 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
4255 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
4256 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
4257 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
4258 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
4259 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
4260 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
4261 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
4262 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
4263 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
4264 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
4265 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
4266 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
4267 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
4268 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
4269 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
4270 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
4271 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
4272 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
4273 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
4274 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
4275 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
4276 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
4277 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
4278 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
4279 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
4280 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
4281 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
4282 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
4283 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
4284 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
4285 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
4286 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
4287 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
4288 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
4289 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
4290 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
4291 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
4292 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004293 .also_non_np = 1,
4294 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004295 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004296 },
4297};
4298
4299static struct cipher_testvec bf_dec_tv_template[] = {
4300 { /* DES test vectors from OpenSSL */
4301 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
4302 .klen = 8,
4303 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
4304 .ilen = 8,
4305 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4306 .rlen = 8,
4307 }, {
4308 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
4309 .klen = 8,
4310 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
4311 .ilen = 8,
4312 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4313 .rlen = 8,
4314 }, {
4315 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4316 .klen = 8,
4317 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
4318 .ilen = 8,
4319 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4320 .rlen = 8,
4321 }, { /* Vary the keylength... */
4322 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4323 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
4324 .klen = 16,
4325 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
4326 .ilen = 8,
4327 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4328 .rlen = 8,
4329 }, {
4330 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4331 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4332 "\x00\x11\x22\x33\x44",
4333 .klen = 21,
4334 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
4335 .ilen = 8,
4336 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4337 .rlen = 8,
4338 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
4339 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4340 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4341 "\x00\x11\x22\x33\x44\x55\x66\x77"
4342 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
4343 "\x58\x40\x23\x64\x1a\xba\x61\x76"
4344 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
4345 "\xff\xff\xff\xff\xff\xff\xff\xff",
4346 .klen = 56,
4347 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
4348 .ilen = 8,
4349 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4350 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004351 }, { /* Generated with Crypto++ */
4352 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4353 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4354 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4355 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4356 .klen = 32,
4357 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
4358 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
4359 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
4360 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004361 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
4362 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
4363 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
4364 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
4365 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
4366 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
4367 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
4368 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
4369 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
4370 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
4371 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
4372 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
4373 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
4374 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
4375 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
4376 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
4377 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
4378 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
4379 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
4380 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
4381 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
4382 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
4383 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
4384 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
4385 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
4386 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
4387 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
4388 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
4389 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
4390 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
4391 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
4392 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
4393 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
4394 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
4395 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
4396 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
4397 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
4398 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
4399 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
4400 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
4401 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
4402 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
4403 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
4404 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
4405 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
4406 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
4407 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
4408 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
4409 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
4410 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
4411 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
4412 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
4413 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
4414 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
4415 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
4416 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
4417 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
4418 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
4419 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
4420 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004421 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4422 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4423 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4424 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004425 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4426 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4427 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4428 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4429 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4430 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4431 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4432 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4433 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4434 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4435 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4436 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4437 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4438 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4439 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4440 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4441 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4442 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4443 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4444 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4445 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4446 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4447 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4448 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4449 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4450 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4451 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4452 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4453 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4454 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4455 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4456 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4457 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4458 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4459 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4460 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4461 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4462 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4463 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4464 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4465 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4466 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4467 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4468 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4469 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4470 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4471 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4472 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4473 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4474 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4475 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4476 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4477 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4478 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4479 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4480 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4481 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4482 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4483 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4484 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004485 .also_non_np = 1,
4486 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004487 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004488 },
4489};
4490
4491static struct cipher_testvec bf_cbc_enc_tv_template[] = {
4492 { /* From OpenSSL */
4493 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4494 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4495 .klen = 16,
4496 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4497 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
4498 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4499 "\x68\x65\x20\x74\x69\x6d\x65\x20"
4500 "\x66\x6f\x72\x20\x00\x00\x00\x00",
4501 .ilen = 32,
4502 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
4503 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
4504 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
4505 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
4506 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004507 }, { /* Generated with Crypto++ */
4508 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4509 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4510 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4511 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4512 .klen = 32,
4513 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4514 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4515 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4516 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4517 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004518 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4519 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4520 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4521 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4522 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4523 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4524 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4525 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4526 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4527 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4528 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4529 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4530 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4531 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4532 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4533 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4534 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4535 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4536 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4537 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4538 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4539 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4540 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4541 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4542 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4543 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4544 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4545 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4546 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4547 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4548 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4549 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4550 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4551 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4552 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4553 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4554 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4555 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4556 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4557 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4558 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4559 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4560 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4561 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4562 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4563 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4564 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4565 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4566 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4567 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4568 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4569 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4570 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4571 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4572 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4573 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4574 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4575 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4576 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4577 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004578 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
4579 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
4580 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
4581 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004582 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
4583 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
4584 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
4585 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
4586 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
4587 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
4588 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
4589 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
4590 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
4591 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
4592 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
4593 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
4594 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
4595 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
4596 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
4597 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
4598 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
4599 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
4600 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
4601 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
4602 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
4603 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
4604 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
4605 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
4606 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
4607 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
4608 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
4609 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
4610 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
4611 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
4612 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
4613 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
4614 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
4615 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
4616 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
4617 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
4618 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
4619 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
4620 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
4621 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
4622 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
4623 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
4624 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
4625 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
4626 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
4627 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
4628 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
4629 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
4630 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
4631 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
4632 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
4633 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
4634 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
4635 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
4636 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
4637 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
4638 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
4639 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
4640 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
4641 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004642 .also_non_np = 1,
4643 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004644 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004645 },
4646};
4647
4648static struct cipher_testvec bf_cbc_dec_tv_template[] = {
4649 { /* From OpenSSL */
4650 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4651 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4652 .klen = 16,
4653 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4654 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
4655 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
4656 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
4657 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
4658 .ilen = 32,
4659 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
4660 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4661 "\x68\x65\x20\x74\x69\x6d\x65\x20"
4662 "\x66\x6f\x72\x20\x00\x00\x00\x00",
4663 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004664 }, { /* Generated with Crypto++ */
4665 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4666 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4667 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4668 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4669 .klen = 32,
4670 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4671 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
4672 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
4673 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
4674 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004675 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
4676 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
4677 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
4678 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
4679 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
4680 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
4681 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
4682 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
4683 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
4684 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
4685 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
4686 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
4687 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
4688 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
4689 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
4690 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
4691 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
4692 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
4693 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
4694 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
4695 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
4696 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
4697 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
4698 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
4699 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
4700 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
4701 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
4702 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
4703 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
4704 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
4705 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
4706 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
4707 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
4708 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
4709 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
4710 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
4711 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
4712 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
4713 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
4714 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
4715 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
4716 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
4717 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
4718 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
4719 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
4720 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
4721 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
4722 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
4723 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
4724 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
4725 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
4726 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
4727 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
4728 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
4729 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
4730 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
4731 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
4732 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
4733 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
4734 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004735 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4736 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4737 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4738 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004739 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4740 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4741 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4742 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4743 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4744 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4745 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4746 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4747 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4748 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4749 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4750 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4751 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4752 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4753 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4754 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4755 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4756 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4757 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4758 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4759 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4760 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4761 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4762 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4763 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4764 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4765 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4766 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4767 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4768 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4769 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4770 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4771 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4772 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4773 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4774 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4775 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4776 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4777 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4778 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4779 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4780 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4781 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4782 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4783 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4784 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4785 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4786 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4787 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4788 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4789 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4790 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4791 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4792 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4793 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4794 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4795 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4796 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4797 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4798 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004799 .also_non_np = 1,
4800 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004801 .tap = { 504 - 8, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004802 },
4803};
4804
4805static struct cipher_testvec bf_ctr_enc_tv_template[] = {
4806 { /* 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,
4812 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4813 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4814 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4815 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4816 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004817 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4818 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4819 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4820 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4821 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4822 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4823 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4824 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4825 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4826 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4827 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4828 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4829 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4830 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4831 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4832 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4833 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4834 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4835 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4836 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4837 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4838 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4839 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4840 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4841 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4842 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4843 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4844 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4845 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4846 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4847 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4848 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4849 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4850 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4851 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4852 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4853 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4854 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4855 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4856 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4857 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4858 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4859 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4860 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4861 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4862 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4863 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4864 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4865 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4866 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4867 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4868 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4869 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4870 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4871 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4872 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4873 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4874 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4875 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4876 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004877 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
4878 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
4879 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
4880 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004881 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
4882 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
4883 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
4884 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
4885 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
4886 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
4887 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
4888 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
4889 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
4890 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
4891 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
4892 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
4893 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
4894 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
4895 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
4896 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
4897 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
4898 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
4899 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
4900 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
4901 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
4902 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
4903 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
4904 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
4905 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
4906 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
4907 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
4908 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
4909 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
4910 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
4911 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
4912 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
4913 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
4914 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
4915 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
4916 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
4917 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
4918 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
4919 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
4920 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
4921 "\x82\x63\x11\xB3\x54\x49\x00\x08"
4922 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
4923 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
4924 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
4925 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
4926 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
4927 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
4928 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
4929 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
4930 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
4931 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
4932 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
4933 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
4934 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
4935 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
4936 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
4937 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
4938 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
4939 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
4940 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004941 }, { /* Generated with Crypto++ */
4942 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4943 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4944 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4945 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4946 .klen = 32,
4947 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
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"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004953 "\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"
4956 "\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\xF0\x64\xFB\x92",
5011 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005012 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5013 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5014 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5015 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
5016 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005017 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5018 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5019 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5020 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5021 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5022 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5023 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5024 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5025 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5026 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5027 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5028 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5029 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5030 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5031 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5032 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5033 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5034 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5035 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5036 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5037 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5038 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5039 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5040 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5041 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5042 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5043 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5044 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5045 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5046 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5047 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5048 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5049 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5050 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5051 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5052 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5053 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5054 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5055 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5056 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5057 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5058 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5059 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5060 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5061 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5062 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5063 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5064 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5065 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5066 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5067 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5068 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5069 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5070 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5071 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5072 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5073 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5074 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
5075 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005076 .also_non_np = 1,
5077 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005078 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03005079 }, { /* Generated with Crypto++ */
5080 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5081 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5082 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5083 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5084 .klen = 32,
5085 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5086 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5088 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5089 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5090 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5091 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5092 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5093 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5094 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5095 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5096 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5097 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5098 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5099 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5100 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5101 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5102 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5103 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5104 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5105 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5106 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5107 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5108 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5109 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5110 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5111 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5112 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5113 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5114 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5115 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5116 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5117 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5118 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5119 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5120 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5121 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5122 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5123 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5124 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5125 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5126 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5127 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5128 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5129 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5130 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5131 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5132 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5133 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5134 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5135 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5136 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5137 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5138 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5139 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5140 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5141 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5142 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5143 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5144 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5145 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5146 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5147 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5148 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5149 .ilen = 504,
5150 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
5151 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
5152 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
5153 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
5154 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
5155 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
5156 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
5157 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
5158 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
5159 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
5160 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
5161 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
5162 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
5163 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
5164 "\x0B\x82\x59\x14\x26\x67\x08\x09"
5165 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
5166 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
5167 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
5168 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
5169 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
5170 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
5171 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
5172 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
5173 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
5174 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
5175 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
5176 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
5177 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
5178 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
5179 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
5180 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
5181 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
5182 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
5183 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
5184 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
5185 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
5186 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
5187 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
5188 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
5189 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
5190 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
5191 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
5192 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
5193 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
5194 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
5195 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
5196 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
5197 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
5198 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
5199 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
5200 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
5201 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
5202 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
5203 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
5204 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
5205 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
5206 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
5207 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
5208 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
5209 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
5210 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
5211 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
5212 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
5213 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005214 },
5215};
5216
5217static struct cipher_testvec bf_ctr_dec_tv_template[] = {
5218 { /* Generated with Crypto++ */
5219 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5220 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5221 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5222 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5223 .klen = 32,
5224 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5225 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5226 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5227 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5228 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005229 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
5230 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5231 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5232 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5233 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5234 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5235 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5236 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5237 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5238 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5239 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5240 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5241 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5242 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5243 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5244 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5245 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5246 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5247 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5248 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5249 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5250 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5251 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5252 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5253 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5254 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5255 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5256 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5257 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5258 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5259 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5260 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5261 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5262 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5263 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5264 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5265 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5266 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5267 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5268 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5269 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5270 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5271 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5272 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5273 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5274 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5275 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5276 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5277 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5278 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5279 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5280 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5281 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5282 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5283 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5284 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5285 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5286 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5287 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
5288 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005289 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5290 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5291 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5292 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005293 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5294 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5295 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5296 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5297 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5298 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5299 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5300 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5301 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5302 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5303 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5304 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5305 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5306 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5307 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5308 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5309 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5310 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5311 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5312 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5313 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5314 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5315 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5316 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5317 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5318 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5319 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5320 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5321 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5322 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5323 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5324 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5325 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5326 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5327 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5328 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5329 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5330 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5331 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5332 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5333 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5334 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5335 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5336 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5337 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5338 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5339 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5340 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5341 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5342 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5343 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5344 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5345 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5346 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5347 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5348 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5349 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5350 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5351 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5352 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005353 }, { /* Generated with Crypto++ */
5354 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5355 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5356 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5357 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5358 .klen = 32,
5359 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5360 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5361 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5362 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5363 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
5364 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005365 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5366 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5367 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5368 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5369 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5370 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5371 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5372 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5373 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5374 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5375 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5376 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5377 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5378 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5379 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5380 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5381 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5382 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5383 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5384 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5385 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5386 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5387 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5388 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5389 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5390 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5391 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5392 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5393 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5394 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5395 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5396 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5397 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5398 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5399 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5400 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5401 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5402 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5403 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5404 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5405 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5406 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5407 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5408 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5409 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5410 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5411 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5412 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5413 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5414 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5415 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5416 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5417 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5418 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5419 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5420 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5421 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5422 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
5423 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005424 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5425 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5426 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5427 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5428 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005429 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5430 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5431 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5432 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5433 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5434 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5435 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5436 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5437 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5438 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5439 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5440 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5441 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5442 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5443 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5444 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5445 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5446 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5447 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5448 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5449 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5450 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5451 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5452 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5453 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5454 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5455 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5456 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5457 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5458 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5459 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5460 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5461 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5462 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5463 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5464 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5465 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5466 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5467 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5468 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5469 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5470 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5471 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5472 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5473 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5474 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5475 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5476 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5477 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5478 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5479 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5480 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5481 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5482 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5483 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5484 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5485 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5486 "\x2B\xC2\x59\xF0\x64\xFB\x92",
5487 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005488 .also_non_np = 1,
5489 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005490 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03005491 }, { /* Generated with Crypto++ */
5492 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5493 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5494 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5495 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5496 .klen = 32,
5497 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5498 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
5499 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
5500 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
5501 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
5502 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
5503 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
5504 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
5505 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
5506 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
5507 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
5508 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
5509 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
5510 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
5511 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
5512 "\x0B\x82\x59\x14\x26\x67\x08\x09"
5513 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
5514 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
5515 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
5516 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
5517 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
5518 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
5519 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
5520 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
5521 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
5522 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
5523 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
5524 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
5525 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
5526 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
5527 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
5528 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
5529 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
5530 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
5531 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
5532 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
5533 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
5534 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
5535 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
5536 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
5537 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
5538 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
5539 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
5540 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
5541 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
5542 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
5543 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
5544 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
5545 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
5546 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
5547 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
5548 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
5549 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
5550 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
5551 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
5552 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
5553 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
5554 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
5555 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
5556 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
5557 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
5558 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
5559 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
5560 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
5561 .ilen = 504,
5562 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5563 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5564 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5565 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5566 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5567 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5568 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5569 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5570 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5571 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5572 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5573 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5574 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5575 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5576 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5577 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5578 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5579 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5580 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5581 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5582 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5583 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5584 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5585 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5586 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5587 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5588 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5589 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5590 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5591 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5592 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5593 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5594 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5595 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5596 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5597 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5598 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5599 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5600 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5601 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5602 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5603 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5604 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5605 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5606 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5607 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5608 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5609 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5610 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5611 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5612 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5613 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5614 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5615 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5616 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5617 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5618 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5619 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5620 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5621 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5622 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5623 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5624 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5625 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08005626 },
5627};
5628
5629/*
5630 * Twofish test vectors.
5631 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03005632#define TF_ENC_TEST_VECTORS 4
5633#define TF_DEC_TEST_VECTORS 4
5634#define TF_CBC_ENC_TEST_VECTORS 5
5635#define TF_CBC_DEC_TEST_VECTORS 5
5636#define TF_CTR_ENC_TEST_VECTORS 2
5637#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005638#define TF_LRW_ENC_TEST_VECTORS 8
5639#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005640#define TF_XTS_ENC_TEST_VECTORS 5
5641#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08005642
5643static struct cipher_testvec tf_enc_tv_template[] = {
5644 {
5645 .key = zeroed_string,
5646 .klen = 16,
5647 .input = zeroed_string,
5648 .ilen = 16,
5649 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5650 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5651 .rlen = 16,
5652 }, {
5653 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5654 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5655 "\x00\x11\x22\x33\x44\x55\x66\x77",
5656 .klen = 24,
5657 .input = zeroed_string,
5658 .ilen = 16,
5659 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
5660 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
5661 .rlen = 16,
5662 }, {
5663 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5664 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5665 "\x00\x11\x22\x33\x44\x55\x66\x77"
5666 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5667 .klen = 32,
5668 .input = zeroed_string,
5669 .ilen = 16,
5670 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
5671 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
5672 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005673 }, { /* Generated with Crypto++ */
5674 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
5675 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
5676 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
5677 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
5678 .klen = 32,
5679 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5680 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5681 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5682 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5683 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5684 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5685 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005686 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5687 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5688 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5689 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5690 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5691 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5692 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5693 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5694 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5695 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5696 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5697 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5698 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5699 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5700 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5701 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5702 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5703 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5704 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5705 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5706 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5707 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5708 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5709 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5710 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5711 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5712 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5713 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5714 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5715 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5716 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5717 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5718 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5719 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5720 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5721 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5722 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5723 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5724 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5725 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5726 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5727 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5728 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5729 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5730 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5731 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5732 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5733 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5734 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5735 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5736 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5737 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5738 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5739 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5740 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
5741 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005742 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
5743 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
5744 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
5745 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
5746 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
5747 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
5748 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005749 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
5750 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
5751 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
5752 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
5753 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
5754 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
5755 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
5756 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
5757 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
5758 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
5759 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
5760 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
5761 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
5762 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
5763 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
5764 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
5765 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
5766 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
5767 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
5768 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
5769 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
5770 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
5771 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
5772 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
5773 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
5774 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
5775 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
5776 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
5777 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
5778 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
5779 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
5780 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
5781 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
5782 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
5783 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
5784 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
5785 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
5786 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
5787 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
5788 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
5789 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
5790 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
5791 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
5792 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
5793 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
5794 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
5795 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
5796 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
5797 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
5798 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
5799 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
5800 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
5801 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
5802 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
5803 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
5804 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005805 .also_non_np = 1,
5806 .np = 2,
5807 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005808 },
5809};
5810
5811static struct cipher_testvec tf_dec_tv_template[] = {
5812 {
5813 .key = zeroed_string,
5814 .klen = 16,
5815 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5816 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5817 .ilen = 16,
5818 .result = zeroed_string,
5819 .rlen = 16,
5820 }, {
5821 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5822 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5823 "\x00\x11\x22\x33\x44\x55\x66\x77",
5824 .klen = 24,
5825 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
5826 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
5827 .ilen = 16,
5828 .result = zeroed_string,
5829 .rlen = 16,
5830 }, {
5831 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5832 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5833 "\x00\x11\x22\x33\x44\x55\x66\x77"
5834 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5835 .klen = 32,
5836 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
5837 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
5838 .ilen = 16,
5839 .result = zeroed_string,
5840 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005841 }, { /* Generated with Crypto++ */
5842 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
5843 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
5844 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
5845 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
5846 .klen = 32,
5847 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
5848 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
5849 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
5850 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
5851 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
5852 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
5853 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005854 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
5855 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
5856 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
5857 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
5858 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
5859 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
5860 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
5861 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
5862 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
5863 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
5864 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
5865 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
5866 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
5867 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
5868 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
5869 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
5870 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
5871 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
5872 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
5873 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
5874 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
5875 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
5876 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
5877 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
5878 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
5879 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
5880 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
5881 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
5882 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
5883 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
5884 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
5885 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
5886 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
5887 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
5888 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
5889 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
5890 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
5891 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
5892 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
5893 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
5894 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
5895 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
5896 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
5897 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
5898 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
5899 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
5900 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
5901 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
5902 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
5903 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
5904 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
5905 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
5906 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
5907 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
5908 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
5909 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005910 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5911 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5912 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5913 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5914 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5915 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5916 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005917 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5918 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5919 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5920 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5921 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5922 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5923 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5924 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5925 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5926 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5927 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5928 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5929 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5930 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5931 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5932 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5933 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5934 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5935 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5936 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5937 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5938 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5939 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5940 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5941 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5942 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5943 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5944 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5945 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5946 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5947 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5948 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5949 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5950 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5951 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5952 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5953 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5954 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5955 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5956 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5957 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5958 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5959 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5960 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5961 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5962 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5963 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5964 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5965 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5966 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5967 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5968 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5969 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5970 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5971 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
5972 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005973 .also_non_np = 1,
5974 .np = 2,
5975 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005976 },
5977};
5978
5979static struct cipher_testvec tf_cbc_enc_tv_template[] = {
5980 { /* Generated with Nettle */
5981 .key = zeroed_string,
5982 .klen = 16,
5983 .iv = zeroed_string,
5984 .input = zeroed_string,
5985 .ilen = 16,
5986 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5987 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5988 .rlen = 16,
5989 }, {
5990 .key = zeroed_string,
5991 .klen = 16,
5992 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5993 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5994 .input = zeroed_string,
5995 .ilen = 16,
5996 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
5997 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
5998 .rlen = 16,
5999 }, {
6000 .key = zeroed_string,
6001 .klen = 16,
6002 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6003 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6004 .input = zeroed_string,
6005 .ilen = 16,
6006 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6007 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6008 .rlen = 16,
6009 }, {
6010 .key = zeroed_string,
6011 .klen = 16,
6012 .iv = zeroed_string,
6013 .input = zeroed_string,
6014 .ilen = 48,
6015 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6016 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
6017 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6018 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
6019 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6020 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6021 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006022 }, { /* Generated with Crypto++ */
6023 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6024 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6025 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6026 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6027 .klen = 32,
6028 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6029 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6030 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6031 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6032 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6033 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6034 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6035 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6036 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006037 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6038 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6039 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6040 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6041 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6042 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6043 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6044 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6045 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6046 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6047 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6048 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6049 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6050 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6051 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6052 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6053 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6054 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6055 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6056 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6057 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6058 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6059 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6060 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6061 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6062 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6063 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6064 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6065 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6066 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6067 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6068 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6069 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6070 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6071 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6072 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6073 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6074 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6075 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6076 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6077 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6078 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6079 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6080 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6081 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6082 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6083 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6084 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6085 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6086 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6087 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6088 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6089 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6090 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6091 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6092 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006093 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
6094 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
6095 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
6096 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
6097 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
6098 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
6099 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006100 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
6101 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
6102 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
6103 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
6104 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
6105 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
6106 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
6107 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
6108 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
6109 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
6110 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
6111 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
6112 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
6113 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
6114 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
6115 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
6116 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
6117 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
6118 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
6119 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
6120 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
6121 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
6122 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
6123 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
6124 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
6125 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
6126 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
6127 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
6128 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
6129 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
6130 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
6131 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
6132 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
6133 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
6134 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
6135 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
6136 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
6137 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
6138 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
6139 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
6140 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
6141 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
6142 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
6143 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
6144 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
6145 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
6146 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
6147 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
6148 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
6149 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
6150 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
6151 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
6152 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
6153 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
6154 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
6155 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006156 .also_non_np = 1,
6157 .np = 2,
6158 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006159 },
6160};
6161
6162static struct cipher_testvec tf_cbc_dec_tv_template[] = {
6163 { /* Reverse of the first four above */
6164 .key = zeroed_string,
6165 .klen = 16,
6166 .iv = zeroed_string,
6167 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6168 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6169 .ilen = 16,
6170 .result = zeroed_string,
6171 .rlen = 16,
6172 }, {
6173 .key = zeroed_string,
6174 .klen = 16,
6175 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6176 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6177 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6178 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6179 .ilen = 16,
6180 .result = zeroed_string,
6181 .rlen = 16,
6182 }, {
6183 .key = zeroed_string,
6184 .klen = 16,
6185 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6186 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6187 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6188 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6189 .ilen = 16,
6190 .result = zeroed_string,
6191 .rlen = 16,
6192 }, {
6193 .key = zeroed_string,
6194 .klen = 16,
6195 .iv = zeroed_string,
6196 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6197 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
6198 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6199 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
6200 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6201 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6202 .ilen = 48,
6203 .result = zeroed_string,
6204 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006205 }, { /* Generated with Crypto++ */
6206 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6207 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6208 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6209 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6210 .klen = 32,
6211 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6212 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6213 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
6214 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
6215 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
6216 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
6217 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
6218 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
6219 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006220 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
6221 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
6222 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
6223 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
6224 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
6225 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
6226 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
6227 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
6228 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
6229 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
6230 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
6231 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
6232 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
6233 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
6234 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
6235 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
6236 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
6237 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
6238 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
6239 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
6240 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
6241 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
6242 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
6243 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
6244 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
6245 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
6246 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
6247 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
6248 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
6249 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
6250 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
6251 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
6252 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
6253 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
6254 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
6255 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
6256 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
6257 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
6258 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
6259 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
6260 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
6261 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
6262 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
6263 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
6264 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
6265 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
6266 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
6267 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
6268 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
6269 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
6270 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
6271 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
6272 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
6273 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
6274 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
6275 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006276 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6277 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6278 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6279 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6280 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6281 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6282 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006283 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6284 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6285 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6286 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6287 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6288 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6289 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6290 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6291 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6292 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6293 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6294 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6295 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6296 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6297 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6298 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6299 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6300 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6301 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6302 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6303 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6304 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6305 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6306 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6307 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6308 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6309 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6310 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6311 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6312 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6313 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6314 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6315 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6316 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6317 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6318 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6319 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6320 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6321 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6322 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6323 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6324 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6325 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6326 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6327 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6328 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6329 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6330 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6331 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6332 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6333 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6334 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6335 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6336 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6337 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6338 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006339 .also_non_np = 1,
6340 .np = 2,
6341 .tap = { 496 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03006342 },
6343};
6344
6345static struct cipher_testvec tf_ctr_enc_tv_template[] = {
6346 { /* Generated with Crypto++ */
6347 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6348 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6349 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6350 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6351 .klen = 32,
6352 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6353 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6354 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6355 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6356 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6357 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6358 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6359 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6360 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006361 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6362 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6363 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6364 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6365 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6366 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6367 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6368 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6369 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6370 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6371 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6372 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6373 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6374 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6375 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6376 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6377 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6378 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6379 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6380 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6381 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6382 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6383 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6384 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6385 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6386 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6387 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6388 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6389 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6390 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6391 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6392 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6393 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6394 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6395 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6396 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6397 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6398 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6399 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6400 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6401 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6402 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6403 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6404 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6405 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6406 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6407 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6408 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6409 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6410 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6411 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6412 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6413 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6414 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6415 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6416 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006417 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6418 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6419 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6420 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6421 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6422 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6423 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006424 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
6425 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6426 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6427 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6428 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6429 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6430 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6431 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6432 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6433 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6434 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6435 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6436 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6437 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6438 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6439 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6440 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6441 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6442 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6443 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6444 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6445 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6446 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6447 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6448 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6449 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6450 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6451 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6452 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6453 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6454 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6455 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6456 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6457 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6458 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6459 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6460 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6461 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6462 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6463 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6464 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6465 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6466 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6467 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6468 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6469 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6470 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6471 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6472 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6473 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6474 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6475 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6476 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6477 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6478 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
6479 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006480 }, { /* Generated with Crypto++ */
6481 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6482 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6483 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6484 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6485 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006486 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6487 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6488 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6489 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6490 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6491 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6492 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6493 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6494 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6495 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6496 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6497 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6498 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6499 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6500 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6501 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6502 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6503 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6504 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6505 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6506 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6507 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6508 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6509 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6510 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6511 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6512 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6513 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6514 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6515 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6516 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6517 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6518 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6519 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6520 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6521 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6522 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6523 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6524 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6525 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6526 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6527 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6528 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6529 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6530 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6531 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6532 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6533 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6534 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6535 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6536 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6537 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6538 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6539 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6540 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6541 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6542 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6543 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6544 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6545 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6546 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6547 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6548 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6549 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6550 .ilen = 496,
6551 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
6552 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
6553 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
6554 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
6555 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
6556 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
6557 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
6558 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
6559 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
6560 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
6561 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
6562 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
6563 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
6564 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
6565 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
6566 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
6567 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
6568 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
6569 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
6570 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
6571 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
6572 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
6573 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
6574 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
6575 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
6576 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
6577 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
6578 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
6579 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
6580 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
6581 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
6582 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
6583 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
6584 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
6585 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
6586 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
6587 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
6588 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
6589 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
6590 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
6591 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
6592 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
6593 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
6594 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
6595 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
6596 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
6597 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
6598 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
6599 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
6600 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
6601 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
6602 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
6603 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
6604 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
6605 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
6606 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
6607 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
6608 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
6609 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
6610 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
6611 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
6612 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
6613 .rlen = 496,
6614 }, { /* Generated with Crypto++ */
6615 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6616 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6617 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6618 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6619 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006620 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6621 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6622 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6623 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6624 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6625 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6626 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6627 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6628 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6629 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006630 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6631 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6632 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6633 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6634 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6635 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6636 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6637 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6638 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6639 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6640 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6641 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6642 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6643 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6644 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6645 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6646 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6647 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6648 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6649 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6650 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6651 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6652 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6653 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6654 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6655 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6656 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6657 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6658 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6659 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6660 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6661 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6662 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6663 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6664 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6665 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6666 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6667 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6668 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6669 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6670 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6671 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6672 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6673 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6674 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6675 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6676 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6677 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6678 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6679 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6680 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6681 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6682 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6683 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6684 "\x2B\xC2\x59",
6685 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006686 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6687 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6688 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6689 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6690 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6691 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6692 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
6693 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006694 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6695 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6696 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6697 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6698 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6699 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6700 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6701 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6702 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6703 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6704 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6705 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6706 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6707 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6708 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6709 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6710 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6711 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6712 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6713 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6714 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6715 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6716 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6717 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6718 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6719 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6720 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6721 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6722 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6723 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6724 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6725 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6726 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6727 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6728 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6729 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6730 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6731 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6732 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6733 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6734 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6735 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6736 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6737 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6738 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6739 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6740 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6741 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6742 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6743 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6744 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6745 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6746 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6747 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
6748 "\x6C\x82\x9D",
6749 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006750 .also_non_np = 1,
6751 .np = 2,
6752 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03006753 },
6754};
6755
6756static struct cipher_testvec tf_ctr_dec_tv_template[] = {
6757 { /* Generated with Crypto++ */
6758 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6759 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6760 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6761 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6762 .klen = 32,
6763 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6764 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6765 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6766 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6767 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6768 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6769 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6770 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6771 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006772 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
6773 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6774 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6775 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6776 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6777 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6778 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6779 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6780 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6781 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6782 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6783 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6784 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6785 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6786 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6787 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6788 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6789 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6790 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6791 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6792 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6793 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6794 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6795 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6796 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6797 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6798 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6799 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6800 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6801 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6802 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6803 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6804 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6805 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6806 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6807 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6808 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6809 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6810 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6811 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6812 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6813 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6814 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6815 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6816 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6817 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6818 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6819 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6820 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6821 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6822 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6823 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6824 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6825 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6826 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
6827 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006828 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6829 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6830 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6831 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6832 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6833 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6834 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006835 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6836 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6837 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6838 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6839 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6840 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6841 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6842 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6843 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6844 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6845 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6846 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6847 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6848 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6849 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6850 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6851 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6852 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6853 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6854 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6855 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6856 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6857 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6858 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6859 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6860 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6861 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6862 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6863 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6864 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6865 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6866 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6867 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6868 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6869 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6870 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6871 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6872 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6873 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6874 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6875 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6876 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6877 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6878 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6879 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6880 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6881 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6882 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6883 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6884 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6885 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6886 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6887 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6888 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6889 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6890 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006891 }, { /* Generated with Crypto++ */
6892 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6893 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6894 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6895 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6896 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006897 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6898 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6899 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
6900 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
6901 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
6902 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
6903 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
6904 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
6905 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
6906 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
6907 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
6908 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
6909 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
6910 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
6911 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
6912 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
6913 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
6914 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
6915 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
6916 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
6917 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
6918 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
6919 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
6920 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
6921 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
6922 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
6923 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
6924 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
6925 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
6926 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
6927 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
6928 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
6929 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
6930 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
6931 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
6932 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
6933 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
6934 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
6935 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
6936 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
6937 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
6938 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
6939 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
6940 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
6941 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
6942 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
6943 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
6944 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
6945 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
6946 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
6947 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
6948 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
6949 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
6950 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
6951 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
6952 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
6953 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
6954 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
6955 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
6956 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
6957 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
6958 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
6959 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
6960 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
6961 .ilen = 496,
6962 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6963 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6964 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6965 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6966 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6967 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6968 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6969 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6970 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6971 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6972 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6973 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6974 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6975 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6976 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6977 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6978 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6979 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6980 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6981 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6982 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6983 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6984 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6985 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6986 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6987 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6988 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6989 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6990 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6991 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6992 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6993 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6994 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6995 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6996 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6997 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6998 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6999 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7000 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7001 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7002 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7003 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7004 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7005 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7006 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7007 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7008 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7009 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7010 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7011 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7012 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7013 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7014 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7015 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7016 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7017 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7018 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7019 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7020 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7021 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7022 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7023 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7024 .rlen = 496,
7025 }, { /* Generated with Crypto++ */
7026 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7027 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7028 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7029 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7030 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007031 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7032 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7033 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7034 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7035 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7036 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7037 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7038 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7039 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7040 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007041 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7042 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7043 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7044 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7045 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7046 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7047 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7048 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7049 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7050 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7051 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7052 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7053 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7054 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7055 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7056 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7057 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7058 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7059 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7060 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7061 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7062 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7063 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7064 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7065 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7066 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7067 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7068 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7069 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7070 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7071 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7072 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7073 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7074 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7075 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7076 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7077 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7078 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7079 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7080 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7081 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7082 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7083 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7084 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7085 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7086 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7087 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7088 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7089 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7090 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7091 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7092 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7093 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7094 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
7095 "\x6C\x82\x9D",
7096 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007097 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7098 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7099 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7100 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7101 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7102 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7103 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7104 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007105 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7106 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7107 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7108 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7109 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7110 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7111 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7112 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7113 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7114 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7115 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7116 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7117 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7118 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7119 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7120 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7121 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7122 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7123 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7124 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7125 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7126 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7127 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7128 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7129 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7130 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7131 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7132 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7133 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7134 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7135 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7136 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7137 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7138 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7139 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7140 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7141 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7142 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7143 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7144 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7145 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7146 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7147 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7148 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7149 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7150 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7151 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7152 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7153 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7154 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7155 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7156 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7157 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7158 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7159 "\x2B\xC2\x59",
7160 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007161 .also_non_np = 1,
7162 .np = 2,
7163 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007164 },
7165};
7166
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007167static struct cipher_testvec tf_lrw_enc_tv_template[] = {
7168 /* Generated from AES-LRW test vectors */
7169 {
7170 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7171 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7172 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7173 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7174 .klen = 32,
7175 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7176 "\x00\x00\x00\x00\x00\x00\x00\x01",
7177 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7178 "\x38\x39\x41\x42\x43\x44\x45\x46",
7179 .ilen = 16,
7180 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
7181 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
7182 .rlen = 16,
7183 }, {
7184 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7185 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7186 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7187 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7188 .klen = 32,
7189 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7190 "\x00\x00\x00\x00\x00\x00\x00\x02",
7191 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7192 "\x38\x39\x41\x42\x43\x44\x45\x46",
7193 .ilen = 16,
7194 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
7195 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
7196 .rlen = 16,
7197 }, {
7198 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7199 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7200 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7201 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7202 .klen = 32,
7203 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7204 "\x00\x00\x00\x02\x00\x00\x00\x00",
7205 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7206 "\x38\x39\x41\x42\x43\x44\x45\x46",
7207 .ilen = 16,
7208 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
7209 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
7210 .rlen = 16,
7211 }, {
7212 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7213 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7214 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7215 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7216 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7217 .klen = 40,
7218 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7219 "\x00\x00\x00\x00\x00\x00\x00\x01",
7220 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7221 "\x38\x39\x41\x42\x43\x44\x45\x46",
7222 .ilen = 16,
7223 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
7224 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
7225 .rlen = 16,
7226 }, {
7227 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7228 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7229 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7230 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7231 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7232 .klen = 40,
7233 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7234 "\x00\x00\x00\x02\x00\x00\x00\x00",
7235 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7236 "\x38\x39\x41\x42\x43\x44\x45\x46",
7237 .ilen = 16,
7238 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
7239 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
7240 .rlen = 16,
7241 }, {
7242 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7243 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7244 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7245 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7246 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7247 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7248 .klen = 48,
7249 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7250 "\x00\x00\x00\x00\x00\x00\x00\x01",
7251 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7252 "\x38\x39\x41\x42\x43\x44\x45\x46",
7253 .ilen = 16,
7254 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
7255 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
7256 .rlen = 16,
7257 }, {
7258 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7259 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7260 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7261 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7262 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7263 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7264 .klen = 48,
7265 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7266 "\x00\x00\x00\x02\x00\x00\x00\x00",
7267 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7268 "\x38\x39\x41\x42\x43\x44\x45\x46",
7269 .ilen = 16,
7270 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
7271 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
7272 .rlen = 16,
7273 }, {
7274 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7275 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7276 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7277 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7278 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7279 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7280 .klen = 48,
7281 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7282 "\x00\x00\x00\x00\x00\x00\x00\x01",
7283 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7284 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7285 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7286 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7287 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7288 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7289 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7290 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7291 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7292 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7293 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7294 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7295 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7296 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7297 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7298 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7299 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7300 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7301 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7302 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7303 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7304 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7305 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7306 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7307 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7308 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7309 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7310 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7311 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7312 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7313 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7314 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7315 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7316 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7317 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7318 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7319 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7320 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7321 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7322 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7323 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7324 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7325 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7326 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7327 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7328 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7329 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7330 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7331 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7332 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7333 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7334 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7335 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7336 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7337 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7338 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7339 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7340 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7341 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7342 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7343 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7344 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7345 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7346 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7347 .ilen = 512,
7348 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
7349 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
7350 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
7351 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
7352 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
7353 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
7354 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
7355 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
7356 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
7357 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
7358 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
7359 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
7360 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
7361 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
7362 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
7363 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
7364 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
7365 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
7366 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
7367 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
7368 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
7369 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
7370 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
7371 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
7372 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
7373 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
7374 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
7375 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
7376 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
7377 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
7378 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
7379 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
7380 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
7381 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
7382 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
7383 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
7384 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
7385 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
7386 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
7387 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
7388 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
7389 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
7390 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
7391 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
7392 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
7393 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
7394 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
7395 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
7396 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
7397 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
7398 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
7399 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
7400 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
7401 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
7402 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
7403 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
7404 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
7405 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
7406 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
7407 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
7408 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
7409 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
7410 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
7411 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
7412 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007413 .also_non_np = 1,
7414 .np = 2,
7415 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007416 },
7417};
7418
7419static struct cipher_testvec tf_lrw_dec_tv_template[] = {
7420 /* Generated from AES-LRW test vectors */
7421 /* same as enc vectors with input and result reversed */
7422 {
7423 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7424 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7425 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7426 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7427 .klen = 32,
7428 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7429 "\x00\x00\x00\x00\x00\x00\x00\x01",
7430 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
7431 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
7432 .ilen = 16,
7433 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7434 "\x38\x39\x41\x42\x43\x44\x45\x46",
7435 .rlen = 16,
7436 }, {
7437 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7438 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7439 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7440 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7441 .klen = 32,
7442 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7443 "\x00\x00\x00\x00\x00\x00\x00\x02",
7444 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
7445 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
7446 .ilen = 16,
7447 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7448 "\x38\x39\x41\x42\x43\x44\x45\x46",
7449 .rlen = 16,
7450 }, {
7451 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7452 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7453 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7454 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7455 .klen = 32,
7456 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7457 "\x00\x00\x00\x02\x00\x00\x00\x00",
7458 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
7459 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
7460 .ilen = 16,
7461 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7462 "\x38\x39\x41\x42\x43\x44\x45\x46",
7463 .rlen = 16,
7464 }, {
7465 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7466 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7467 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7468 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7469 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7470 .klen = 40,
7471 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7472 "\x00\x00\x00\x00\x00\x00\x00\x01",
7473 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
7474 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
7475 .ilen = 16,
7476 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7477 "\x38\x39\x41\x42\x43\x44\x45\x46",
7478 .rlen = 16,
7479 }, {
7480 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7481 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7482 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7483 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7484 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7485 .klen = 40,
7486 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7487 "\x00\x00\x00\x02\x00\x00\x00\x00",
7488 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
7489 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
7490 .ilen = 16,
7491 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7492 "\x38\x39\x41\x42\x43\x44\x45\x46",
7493 .rlen = 16,
7494 }, {
7495 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7496 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7497 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7498 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7499 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7500 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7501 .klen = 48,
7502 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7503 "\x00\x00\x00\x00\x00\x00\x00\x01",
7504 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
7505 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
7506 .ilen = 16,
7507 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7508 "\x38\x39\x41\x42\x43\x44\x45\x46",
7509 .rlen = 16,
7510 }, {
7511 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7512 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7513 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7514 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7515 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7516 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7517 .klen = 48,
7518 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7519 "\x00\x00\x00\x02\x00\x00\x00\x00",
7520 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
7521 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
7522 .ilen = 16,
7523 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7524 "\x38\x39\x41\x42\x43\x44\x45\x46",
7525 .rlen = 16,
7526 }, {
7527 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7528 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7529 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7530 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7531 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7532 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7533 .klen = 48,
7534 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7535 "\x00\x00\x00\x00\x00\x00\x00\x01",
7536 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
7537 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
7538 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
7539 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
7540 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
7541 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
7542 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
7543 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
7544 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
7545 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
7546 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
7547 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
7548 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
7549 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
7550 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
7551 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
7552 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
7553 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
7554 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
7555 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
7556 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
7557 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
7558 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
7559 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
7560 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
7561 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
7562 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
7563 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
7564 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
7565 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
7566 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
7567 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
7568 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
7569 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
7570 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
7571 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
7572 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
7573 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
7574 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
7575 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
7576 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
7577 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
7578 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
7579 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
7580 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
7581 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
7582 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
7583 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
7584 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
7585 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
7586 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
7587 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
7588 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
7589 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
7590 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
7591 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
7592 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
7593 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
7594 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
7595 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
7596 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
7597 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
7598 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
7599 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
7600 .ilen = 512,
7601 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7602 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7603 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7604 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7605 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7606 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7607 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7608 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7609 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7610 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7611 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7612 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7613 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7614 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7615 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7616 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7617 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7618 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7619 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7620 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7621 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7622 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7623 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7624 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7625 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7626 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7627 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7628 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7629 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7630 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7631 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7632 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7633 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7634 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7635 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7636 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7637 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7638 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7639 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7640 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7641 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7642 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7643 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7644 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7645 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7646 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7647 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7648 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7649 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7650 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7651 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7652 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7653 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7654 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7655 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7656 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7657 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7658 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7659 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7660 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7661 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7662 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7663 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7664 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7665 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007666 .also_non_np = 1,
7667 .np = 2,
7668 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007669 },
7670};
7671
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007672static struct cipher_testvec tf_xts_enc_tv_template[] = {
7673 /* Generated from AES-XTS test vectors */
7674{
7675 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
7676 "\x00\x00\x00\x00\x00\x00\x00\x00"
7677 "\x00\x00\x00\x00\x00\x00\x00\x00"
7678 "\x00\x00\x00\x00\x00\x00\x00\x00",
7679 .klen = 32,
7680 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7681 "\x00\x00\x00\x00\x00\x00\x00\x00",
7682 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
7683 "\x00\x00\x00\x00\x00\x00\x00\x00"
7684 "\x00\x00\x00\x00\x00\x00\x00\x00"
7685 "\x00\x00\x00\x00\x00\x00\x00\x00",
7686 .ilen = 32,
7687 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
7688 "\x30\x74\xe4\x44\x52\x77\x97\x43"
7689 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
7690 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
7691 .rlen = 32,
7692 }, {
7693 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
7694 "\x11\x11\x11\x11\x11\x11\x11\x11"
7695 "\x22\x22\x22\x22\x22\x22\x22\x22"
7696 "\x22\x22\x22\x22\x22\x22\x22\x22",
7697 .klen = 32,
7698 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7699 "\x00\x00\x00\x00\x00\x00\x00\x00",
7700 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7701 "\x44\x44\x44\x44\x44\x44\x44\x44"
7702 "\x44\x44\x44\x44\x44\x44\x44\x44"
7703 "\x44\x44\x44\x44\x44\x44\x44\x44",
7704 .ilen = 32,
7705 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
7706 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
7707 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
7708 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
7709 .rlen = 32,
7710 }, {
7711 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7712 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7713 "\x22\x22\x22\x22\x22\x22\x22\x22"
7714 "\x22\x22\x22\x22\x22\x22\x22\x22",
7715 .klen = 32,
7716 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7717 "\x00\x00\x00\x00\x00\x00\x00\x00",
7718 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7719 "\x44\x44\x44\x44\x44\x44\x44\x44"
7720 "\x44\x44\x44\x44\x44\x44\x44\x44"
7721 "\x44\x44\x44\x44\x44\x44\x44\x44",
7722 .ilen = 32,
7723 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
7724 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
7725 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
7726 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
7727 .rlen = 32,
7728 }, {
7729 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7730 "\x23\x53\x60\x28\x74\x71\x35\x26"
7731 "\x31\x41\x59\x26\x53\x58\x97\x93"
7732 "\x23\x84\x62\x64\x33\x83\x27\x95",
7733 .klen = 32,
7734 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7735 "\x00\x00\x00\x00\x00\x00\x00\x00",
7736 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7737 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7738 "\x10\x11\x12\x13\x14\x15\x16\x17"
7739 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7740 "\x20\x21\x22\x23\x24\x25\x26\x27"
7741 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7742 "\x30\x31\x32\x33\x34\x35\x36\x37"
7743 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7744 "\x40\x41\x42\x43\x44\x45\x46\x47"
7745 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7746 "\x50\x51\x52\x53\x54\x55\x56\x57"
7747 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7748 "\x60\x61\x62\x63\x64\x65\x66\x67"
7749 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7750 "\x70\x71\x72\x73\x74\x75\x76\x77"
7751 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7752 "\x80\x81\x82\x83\x84\x85\x86\x87"
7753 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7754 "\x90\x91\x92\x93\x94\x95\x96\x97"
7755 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7756 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7757 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7758 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7759 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7760 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7761 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7762 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7763 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7764 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7765 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7766 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7767 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7768 "\x00\x01\x02\x03\x04\x05\x06\x07"
7769 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7770 "\x10\x11\x12\x13\x14\x15\x16\x17"
7771 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7772 "\x20\x21\x22\x23\x24\x25\x26\x27"
7773 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7774 "\x30\x31\x32\x33\x34\x35\x36\x37"
7775 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7776 "\x40\x41\x42\x43\x44\x45\x46\x47"
7777 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7778 "\x50\x51\x52\x53\x54\x55\x56\x57"
7779 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7780 "\x60\x61\x62\x63\x64\x65\x66\x67"
7781 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7782 "\x70\x71\x72\x73\x74\x75\x76\x77"
7783 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7784 "\x80\x81\x82\x83\x84\x85\x86\x87"
7785 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7786 "\x90\x91\x92\x93\x94\x95\x96\x97"
7787 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7788 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7789 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7790 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7791 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7792 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7793 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7794 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7795 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7796 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7797 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7798 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7799 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7800 .ilen = 512,
7801 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
7802 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
7803 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
7804 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
7805 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
7806 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
7807 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
7808 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
7809 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
7810 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
7811 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
7812 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
7813 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
7814 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
7815 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
7816 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
7817 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
7818 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
7819 "\x39\x80\x39\x09\x97\x65\xf2\x83"
7820 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
7821 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
7822 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
7823 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
7824 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
7825 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
7826 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
7827 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
7828 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
7829 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
7830 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
7831 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
7832 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
7833 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
7834 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
7835 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
7836 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
7837 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
7838 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
7839 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
7840 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
7841 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
7842 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
7843 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
7844 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
7845 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
7846 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
7847 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
7848 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
7849 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
7850 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
7851 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
7852 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
7853 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
7854 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
7855 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
7856 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
7857 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
7858 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
7859 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
7860 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
7861 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
7862 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
7863 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
7864 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
7865 .rlen = 512,
7866 }, {
7867 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7868 "\x23\x53\x60\x28\x74\x71\x35\x26"
7869 "\x62\x49\x77\x57\x24\x70\x93\x69"
7870 "\x99\x59\x57\x49\x66\x96\x76\x27"
7871 "\x31\x41\x59\x26\x53\x58\x97\x93"
7872 "\x23\x84\x62\x64\x33\x83\x27\x95"
7873 "\x02\x88\x41\x97\x16\x93\x99\x37"
7874 "\x51\x05\x82\x09\x74\x94\x45\x92",
7875 .klen = 64,
7876 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
7877 "\x00\x00\x00\x00\x00\x00\x00\x00",
7878 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7879 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7880 "\x10\x11\x12\x13\x14\x15\x16\x17"
7881 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7882 "\x20\x21\x22\x23\x24\x25\x26\x27"
7883 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7884 "\x30\x31\x32\x33\x34\x35\x36\x37"
7885 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7886 "\x40\x41\x42\x43\x44\x45\x46\x47"
7887 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7888 "\x50\x51\x52\x53\x54\x55\x56\x57"
7889 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7890 "\x60\x61\x62\x63\x64\x65\x66\x67"
7891 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7892 "\x70\x71\x72\x73\x74\x75\x76\x77"
7893 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7894 "\x80\x81\x82\x83\x84\x85\x86\x87"
7895 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7896 "\x90\x91\x92\x93\x94\x95\x96\x97"
7897 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7898 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7899 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7900 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7901 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7902 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7903 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7904 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7905 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7906 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7907 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7908 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7909 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7910 "\x00\x01\x02\x03\x04\x05\x06\x07"
7911 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7912 "\x10\x11\x12\x13\x14\x15\x16\x17"
7913 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7914 "\x20\x21\x22\x23\x24\x25\x26\x27"
7915 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7916 "\x30\x31\x32\x33\x34\x35\x36\x37"
7917 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7918 "\x40\x41\x42\x43\x44\x45\x46\x47"
7919 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7920 "\x50\x51\x52\x53\x54\x55\x56\x57"
7921 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7922 "\x60\x61\x62\x63\x64\x65\x66\x67"
7923 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7924 "\x70\x71\x72\x73\x74\x75\x76\x77"
7925 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7926 "\x80\x81\x82\x83\x84\x85\x86\x87"
7927 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7928 "\x90\x91\x92\x93\x94\x95\x96\x97"
7929 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7930 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7931 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7932 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7933 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7934 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7935 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7936 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7937 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7938 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7939 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7940 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7941 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7942 .ilen = 512,
7943 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
7944 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
7945 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
7946 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
7947 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
7948 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
7949 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
7950 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
7951 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
7952 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
7953 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
7954 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
7955 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
7956 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
7957 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
7958 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
7959 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
7960 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
7961 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
7962 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
7963 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
7964 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
7965 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
7966 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
7967 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
7968 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
7969 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
7970 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
7971 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
7972 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
7973 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
7974 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
7975 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
7976 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
7977 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
7978 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
7979 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
7980 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
7981 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
7982 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
7983 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
7984 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
7985 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
7986 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
7987 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
7988 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
7989 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
7990 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
7991 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
7992 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
7993 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
7994 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
7995 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
7996 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
7997 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
7998 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
7999 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
8000 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
8001 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
8002 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
8003 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
8004 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
8005 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
8006 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
8007 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008008 .also_non_np = 1,
8009 .np = 2,
8010 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008011 },
8012};
8013
8014static struct cipher_testvec tf_xts_dec_tv_template[] = {
8015 /* Generated from AES-XTS test vectors */
8016 /* same as enc vectors with input and result reversed */
8017 {
8018 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8019 "\x00\x00\x00\x00\x00\x00\x00\x00"
8020 "\x00\x00\x00\x00\x00\x00\x00\x00"
8021 "\x00\x00\x00\x00\x00\x00\x00\x00",
8022 .klen = 32,
8023 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8024 "\x00\x00\x00\x00\x00\x00\x00\x00",
8025 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
8026 "\x30\x74\xe4\x44\x52\x77\x97\x43"
8027 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
8028 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
8029 .ilen = 32,
8030 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
8031 "\x00\x00\x00\x00\x00\x00\x00\x00"
8032 "\x00\x00\x00\x00\x00\x00\x00\x00"
8033 "\x00\x00\x00\x00\x00\x00\x00\x00",
8034 .rlen = 32,
8035 }, {
8036 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8037 "\x11\x11\x11\x11\x11\x11\x11\x11"
8038 "\x22\x22\x22\x22\x22\x22\x22\x22"
8039 "\x22\x22\x22\x22\x22\x22\x22\x22",
8040 .klen = 32,
8041 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8042 "\x00\x00\x00\x00\x00\x00\x00\x00",
8043 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
8044 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
8045 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
8046 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
8047 .ilen = 32,
8048 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8049 "\x44\x44\x44\x44\x44\x44\x44\x44"
8050 "\x44\x44\x44\x44\x44\x44\x44\x44"
8051 "\x44\x44\x44\x44\x44\x44\x44\x44",
8052 .rlen = 32,
8053 }, {
8054 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8055 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8056 "\x22\x22\x22\x22\x22\x22\x22\x22"
8057 "\x22\x22\x22\x22\x22\x22\x22\x22",
8058 .klen = 32,
8059 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8060 "\x00\x00\x00\x00\x00\x00\x00\x00",
8061 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
8062 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
8063 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
8064 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
8065 .ilen = 32,
8066 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8067 "\x44\x44\x44\x44\x44\x44\x44\x44"
8068 "\x44\x44\x44\x44\x44\x44\x44\x44"
8069 "\x44\x44\x44\x44\x44\x44\x44\x44",
8070 .rlen = 32,
8071 }, {
8072 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8073 "\x23\x53\x60\x28\x74\x71\x35\x26"
8074 "\x31\x41\x59\x26\x53\x58\x97\x93"
8075 "\x23\x84\x62\x64\x33\x83\x27\x95",
8076 .klen = 32,
8077 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8078 "\x00\x00\x00\x00\x00\x00\x00\x00",
8079 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
8080 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
8081 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
8082 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
8083 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
8084 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
8085 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
8086 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
8087 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
8088 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
8089 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
8090 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
8091 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
8092 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
8093 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
8094 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
8095 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
8096 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
8097 "\x39\x80\x39\x09\x97\x65\xf2\x83"
8098 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
8099 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
8100 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
8101 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
8102 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
8103 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
8104 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
8105 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
8106 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
8107 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
8108 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
8109 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
8110 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
8111 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
8112 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
8113 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
8114 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
8115 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
8116 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
8117 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
8118 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
8119 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
8120 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
8121 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
8122 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
8123 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
8124 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
8125 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
8126 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
8127 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
8128 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
8129 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
8130 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
8131 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
8132 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
8133 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
8134 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
8135 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
8136 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
8137 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
8138 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
8139 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
8140 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
8141 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
8142 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
8143 .ilen = 512,
8144 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8145 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8146 "\x10\x11\x12\x13\x14\x15\x16\x17"
8147 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8148 "\x20\x21\x22\x23\x24\x25\x26\x27"
8149 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8150 "\x30\x31\x32\x33\x34\x35\x36\x37"
8151 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8152 "\x40\x41\x42\x43\x44\x45\x46\x47"
8153 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8154 "\x50\x51\x52\x53\x54\x55\x56\x57"
8155 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8156 "\x60\x61\x62\x63\x64\x65\x66\x67"
8157 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8158 "\x70\x71\x72\x73\x74\x75\x76\x77"
8159 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8160 "\x80\x81\x82\x83\x84\x85\x86\x87"
8161 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8162 "\x90\x91\x92\x93\x94\x95\x96\x97"
8163 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8164 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8165 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8166 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8167 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8168 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8169 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8170 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8171 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8172 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8173 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8174 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8175 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8176 "\x00\x01\x02\x03\x04\x05\x06\x07"
8177 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8178 "\x10\x11\x12\x13\x14\x15\x16\x17"
8179 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8180 "\x20\x21\x22\x23\x24\x25\x26\x27"
8181 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8182 "\x30\x31\x32\x33\x34\x35\x36\x37"
8183 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8184 "\x40\x41\x42\x43\x44\x45\x46\x47"
8185 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8186 "\x50\x51\x52\x53\x54\x55\x56\x57"
8187 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8188 "\x60\x61\x62\x63\x64\x65\x66\x67"
8189 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8190 "\x70\x71\x72\x73\x74\x75\x76\x77"
8191 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8192 "\x80\x81\x82\x83\x84\x85\x86\x87"
8193 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8194 "\x90\x91\x92\x93\x94\x95\x96\x97"
8195 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8196 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8197 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8198 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8199 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8200 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8201 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8202 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8203 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8204 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8205 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8206 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8207 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8208 .rlen = 512,
8209 }, {
8210 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8211 "\x23\x53\x60\x28\x74\x71\x35\x26"
8212 "\x62\x49\x77\x57\x24\x70\x93\x69"
8213 "\x99\x59\x57\x49\x66\x96\x76\x27"
8214 "\x31\x41\x59\x26\x53\x58\x97\x93"
8215 "\x23\x84\x62\x64\x33\x83\x27\x95"
8216 "\x02\x88\x41\x97\x16\x93\x99\x37"
8217 "\x51\x05\x82\x09\x74\x94\x45\x92",
8218 .klen = 64,
8219 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8220 "\x00\x00\x00\x00\x00\x00\x00\x00",
8221 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
8222 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
8223 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
8224 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
8225 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
8226 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
8227 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
8228 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
8229 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
8230 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
8231 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
8232 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
8233 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
8234 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
8235 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
8236 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
8237 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
8238 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
8239 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
8240 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
8241 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
8242 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
8243 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
8244 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
8245 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
8246 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
8247 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
8248 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
8249 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
8250 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
8251 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
8252 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
8253 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
8254 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
8255 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
8256 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
8257 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
8258 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
8259 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
8260 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
8261 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
8262 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
8263 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
8264 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
8265 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
8266 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
8267 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
8268 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
8269 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
8270 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
8271 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
8272 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
8273 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
8274 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
8275 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
8276 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
8277 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
8278 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
8279 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
8280 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
8281 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
8282 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
8283 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
8284 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
8285 .ilen = 512,
8286 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8287 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8288 "\x10\x11\x12\x13\x14\x15\x16\x17"
8289 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8290 "\x20\x21\x22\x23\x24\x25\x26\x27"
8291 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8292 "\x30\x31\x32\x33\x34\x35\x36\x37"
8293 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8294 "\x40\x41\x42\x43\x44\x45\x46\x47"
8295 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8296 "\x50\x51\x52\x53\x54\x55\x56\x57"
8297 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8298 "\x60\x61\x62\x63\x64\x65\x66\x67"
8299 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8300 "\x70\x71\x72\x73\x74\x75\x76\x77"
8301 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8302 "\x80\x81\x82\x83\x84\x85\x86\x87"
8303 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8304 "\x90\x91\x92\x93\x94\x95\x96\x97"
8305 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8306 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8307 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8308 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8309 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8310 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8311 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8312 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8313 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8314 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8315 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8316 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8317 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8318 "\x00\x01\x02\x03\x04\x05\x06\x07"
8319 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8320 "\x10\x11\x12\x13\x14\x15\x16\x17"
8321 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8322 "\x20\x21\x22\x23\x24\x25\x26\x27"
8323 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8324 "\x30\x31\x32\x33\x34\x35\x36\x37"
8325 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8326 "\x40\x41\x42\x43\x44\x45\x46\x47"
8327 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8328 "\x50\x51\x52\x53\x54\x55\x56\x57"
8329 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8330 "\x60\x61\x62\x63\x64\x65\x66\x67"
8331 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8332 "\x70\x71\x72\x73\x74\x75\x76\x77"
8333 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8334 "\x80\x81\x82\x83\x84\x85\x86\x87"
8335 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8336 "\x90\x91\x92\x93\x94\x95\x96\x97"
8337 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8338 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8339 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8340 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8341 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8342 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8343 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8344 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8345 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8346 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8347 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8348 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8349 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8350 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008351 .also_non_np = 1,
8352 .np = 2,
8353 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008354 },
8355};
8356
Herbert Xuda7f0332008-07-31 17:08:25 +08008357/*
8358 * Serpent test vectors. These are backwards because Serpent writes
8359 * octet sequences in right-to-left mode.
8360 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008361#define SERPENT_ENC_TEST_VECTORS 5
8362#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08008363
8364#define TNEPRES_ENC_TEST_VECTORS 4
8365#define TNEPRES_DEC_TEST_VECTORS 4
8366
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008367#define SERPENT_CBC_ENC_TEST_VECTORS 1
8368#define SERPENT_CBC_DEC_TEST_VECTORS 1
8369
8370#define SERPENT_CTR_ENC_TEST_VECTORS 2
8371#define SERPENT_CTR_DEC_TEST_VECTORS 2
8372
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03008373#define SERPENT_LRW_ENC_TEST_VECTORS 8
8374#define SERPENT_LRW_DEC_TEST_VECTORS 8
8375
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03008376#define SERPENT_XTS_ENC_TEST_VECTORS 5
8377#define SERPENT_XTS_DEC_TEST_VECTORS 5
8378
Herbert Xuda7f0332008-07-31 17:08:25 +08008379static struct cipher_testvec serpent_enc_tv_template[] = {
8380 {
8381 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8382 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8383 .ilen = 16,
8384 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
8385 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
8386 .rlen = 16,
8387 }, {
8388 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8389 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8390 .klen = 16,
8391 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8393 .ilen = 16,
8394 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
8395 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
8396 .rlen = 16,
8397 }, {
8398 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8399 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8400 "\x10\x11\x12\x13\x14\x15\x16\x17"
8401 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8402 .klen = 32,
8403 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8404 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8405 .ilen = 16,
8406 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
8407 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
8408 .rlen = 16,
8409 }, {
8410 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8411 .klen = 16,
8412 .input = zeroed_string,
8413 .ilen = 16,
8414 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
8415 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
8416 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008417 }, { /* Generated with Crypto++ */
8418 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8419 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8420 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8421 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8422 .klen = 32,
8423 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8424 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8425 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8426 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8427 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8428 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8429 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8430 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8431 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8432 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8433 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8434 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8435 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8436 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8437 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8438 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8439 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008440 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8441 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8442 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8443 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8444 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8445 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8446 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8447 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8448 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8449 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8450 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8451 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8452 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8453 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8454 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8455 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8456 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8457 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8458 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8459 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8460 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8461 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8462 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8463 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8464 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8465 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8466 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8467 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8468 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8469 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8470 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8471 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8472 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8473 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8474 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8475 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8476 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8477 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8478 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8479 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8480 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8481 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8482 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8483 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8484 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8485 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008486 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
8487 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
8488 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
8489 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
8490 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
8491 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
8492 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
8493 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
8494 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
8495 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
8496 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
8497 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
8498 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
8499 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
8500 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
8501 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
8502 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008503 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
8504 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
8505 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
8506 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
8507 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
8508 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
8509 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
8510 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
8511 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
8512 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
8513 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
8514 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
8515 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
8516 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
8517 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
8518 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
8519 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
8520 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
8521 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
8522 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
8523 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
8524 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
8525 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
8526 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
8527 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
8528 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
8529 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
8530 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
8531 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
8532 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
8533 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
8534 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
8535 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
8536 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
8537 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
8538 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
8539 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
8540 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
8541 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
8542 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
8543 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
8544 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
8545 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
8546 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
8547 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
8548 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008549 .also_non_np = 1,
8550 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008551 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008552 },
8553};
8554
8555static struct cipher_testvec tnepres_enc_tv_template[] = {
8556 { /* KeySize=128, PT=0, I=1 */
8557 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8558 "\x00\x00\x00\x00\x00\x00\x00\x00",
8559 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8560 "\x00\x00\x00\x00\x00\x00\x00\x00",
8561 .klen = 16,
8562 .ilen = 16,
8563 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
8564 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
8565 .rlen = 16,
8566 }, { /* KeySize=192, PT=0, I=1 */
8567 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8568 "\x00\x00\x00\x00\x00\x00\x00\x00"
8569 "\x00\x00\x00\x00\x00\x00\x00\x00",
8570 .klen = 24,
8571 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8572 "\x00\x00\x00\x00\x00\x00\x00\x00",
8573 .ilen = 16,
8574 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
8575 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
8576 .rlen = 16,
8577 }, { /* KeySize=256, PT=0, I=1 */
8578 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8579 "\x00\x00\x00\x00\x00\x00\x00\x00"
8580 "\x00\x00\x00\x00\x00\x00\x00\x00"
8581 "\x00\x00\x00\x00\x00\x00\x00\x00",
8582 .klen = 32,
8583 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8584 "\x00\x00\x00\x00\x00\x00\x00\x00",
8585 .ilen = 16,
8586 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
8587 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
8588 .rlen = 16,
8589 }, { /* KeySize=256, I=257 */
8590 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
8591 "\x17\x16\x15\x14\x13\x12\x11\x10"
8592 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
8593 "\x07\x06\x05\x04\x03\x02\x01\x00",
8594 .klen = 32,
8595 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
8596 "\x07\x06\x05\x04\x03\x02\x01\x00",
8597 .ilen = 16,
8598 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
8599 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
8600 .rlen = 16,
8601 },
8602};
8603
8604
8605static struct cipher_testvec serpent_dec_tv_template[] = {
8606 {
8607 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
8608 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
8609 .ilen = 16,
8610 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8611 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8612 .rlen = 16,
8613 }, {
8614 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8615 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8616 .klen = 16,
8617 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
8618 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
8619 .ilen = 16,
8620 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8621 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8622 .rlen = 16,
8623 }, {
8624 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8625 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8626 "\x10\x11\x12\x13\x14\x15\x16\x17"
8627 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8628 .klen = 32,
8629 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
8630 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
8631 .ilen = 16,
8632 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8633 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8634 .rlen = 16,
8635 }, {
8636 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8637 .klen = 16,
8638 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
8639 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
8640 .ilen = 16,
8641 .result = zeroed_string,
8642 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008643 }, { /* Generated with Crypto++ */
8644 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8645 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8646 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8647 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8648 .klen = 32,
8649 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
8650 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
8651 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
8652 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
8653 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
8654 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
8655 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
8656 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
8657 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
8658 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
8659 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
8660 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
8661 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
8662 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
8663 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
8664 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
8665 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008666 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
8667 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
8668 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
8669 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
8670 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
8671 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
8672 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
8673 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
8674 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
8675 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
8676 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
8677 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
8678 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
8679 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
8680 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
8681 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
8682 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
8683 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
8684 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
8685 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
8686 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
8687 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
8688 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
8689 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
8690 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
8691 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
8692 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
8693 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
8694 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
8695 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
8696 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
8697 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
8698 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
8699 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
8700 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
8701 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
8702 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
8703 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
8704 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
8705 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
8706 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
8707 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
8708 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
8709 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
8710 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
8711 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008712 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8713 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8714 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8715 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8716 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8717 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8718 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8719 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8720 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8721 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8722 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8723 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8724 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8725 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8726 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8727 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8728 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008729 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8730 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8731 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8732 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8733 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8734 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8735 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8736 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8737 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8738 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8739 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8740 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8741 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8742 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8743 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8744 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8745 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8746 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8747 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8748 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8749 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8750 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8751 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8752 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8753 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8754 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8755 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8756 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8757 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8758 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8759 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8760 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8761 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8762 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8763 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8764 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8765 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8766 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8767 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8768 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8769 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8770 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8771 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8772 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8773 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8774 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008775 .also_non_np = 1,
8776 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008777 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008778 },
8779};
8780
8781static struct cipher_testvec tnepres_dec_tv_template[] = {
8782 {
8783 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
8784 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
8785 .ilen = 16,
8786 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8787 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8788 .rlen = 16,
8789 }, {
8790 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8791 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8792 .klen = 16,
8793 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
8794 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
8795 .ilen = 16,
8796 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8797 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8798 .rlen = 16,
8799 }, {
8800 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8801 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8802 "\x10\x11\x12\x13\x14\x15\x16\x17"
8803 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8804 .klen = 32,
8805 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
8806 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
8807 .ilen = 16,
8808 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8809 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8810 .rlen = 16,
8811 }, { /* KeySize=128, I=121 */
8812 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8813 .klen = 16,
8814 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
8815 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
8816 .ilen = 16,
8817 .result = zeroed_string,
8818 .rlen = 16,
8819 },
8820};
8821
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008822static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
8823 { /* Generated with Crypto++ */
8824 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8825 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8826 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8827 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8828 .klen = 32,
8829 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8830 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8831 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8832 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8833 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8834 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8835 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8836 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8837 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8838 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8839 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8840 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8841 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8842 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8843 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8844 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8845 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8846 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8847 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008848 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8849 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8850 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8851 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8852 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8853 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8854 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8855 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8856 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8857 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8858 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8859 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8860 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8861 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8862 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8863 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8864 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8865 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8866 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8867 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8868 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8869 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8870 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8871 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8872 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8873 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8874 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8875 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8876 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8877 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8878 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8879 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8880 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8881 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8882 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8883 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8884 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8885 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8886 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8887 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8888 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8889 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8890 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8891 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8892 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8893 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008894 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
8895 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
8896 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
8897 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
8898 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
8899 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
8900 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
8901 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
8902 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
8903 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
8904 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
8905 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
8906 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
8907 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
8908 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
8909 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
8910 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008911 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
8912 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
8913 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
8914 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
8915 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
8916 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
8917 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
8918 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
8919 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
8920 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
8921 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
8922 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
8923 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
8924 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
8925 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
8926 "\x81\x92\x66\x67\x15\x1E\x39\x98"
8927 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
8928 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
8929 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
8930 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
8931 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
8932 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
8933 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
8934 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
8935 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
8936 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
8937 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
8938 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
8939 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
8940 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
8941 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
8942 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
8943 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
8944 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
8945 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
8946 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
8947 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
8948 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
8949 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
8950 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
8951 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
8952 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
8953 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
8954 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
8955 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
8956 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008957 .also_non_np = 1,
8958 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008959 .tap = { 496 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008960 },
8961};
8962
8963static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
8964 { /* Generated with Crypto++ */
8965 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8966 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8967 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8968 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8969 .klen = 32,
8970 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8971 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8972 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
8973 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
8974 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
8975 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
8976 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
8977 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
8978 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
8979 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
8980 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
8981 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
8982 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
8983 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
8984 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
8985 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
8986 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
8987 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
8988 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008989 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
8990 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
8991 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
8992 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
8993 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
8994 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
8995 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
8996 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
8997 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
8998 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
8999 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
9000 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
9001 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
9002 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
9003 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
9004 "\x81\x92\x66\x67\x15\x1E\x39\x98"
9005 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
9006 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
9007 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
9008 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
9009 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
9010 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
9011 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
9012 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
9013 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
9014 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
9015 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
9016 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
9017 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
9018 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
9019 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
9020 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
9021 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
9022 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
9023 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
9024 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
9025 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
9026 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
9027 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
9028 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
9029 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
9030 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
9031 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
9032 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
9033 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
9034 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009035 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9036 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9037 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9038 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9039 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9040 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9041 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9042 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9043 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9044 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9045 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9046 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9047 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9048 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9049 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9050 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9051 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009052 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9053 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9054 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9055 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9056 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9057 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9058 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9059 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9060 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9061 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9062 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9063 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9064 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9065 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9066 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9067 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9068 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9069 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9070 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9071 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9072 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9073 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9074 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9075 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9076 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9077 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9078 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9079 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9080 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9081 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9082 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9083 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9084 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9085 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9086 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9087 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9088 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9089 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9090 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9091 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9092 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9093 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9094 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9095 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9096 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9097 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009098 .also_non_np = 1,
9099 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009100 .tap = { 496 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009101 },
9102};
9103
9104static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
9105 { /* Generated with Crypto++ */
9106 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9107 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9108 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9109 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9110 .klen = 32,
9111 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9112 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9113 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9114 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9115 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9116 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9117 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9118 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9119 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9120 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9121 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9122 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9123 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9124 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9125 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9126 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9127 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9128 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9129 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009130 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9131 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9132 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9133 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9134 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9135 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9136 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9137 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9138 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9139 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9140 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9141 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9142 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9143 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9144 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9145 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9146 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9147 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9148 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9149 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9150 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9151 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9152 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9153 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9154 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9155 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9156 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9157 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9158 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9159 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9160 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9161 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9162 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9163 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9164 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9165 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9166 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9167 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9168 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9169 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9170 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9171 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9172 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9173 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9174 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9175 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009176 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9177 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9178 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9179 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9180 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9181 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9182 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9183 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9184 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9185 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9186 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9187 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9188 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9189 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9190 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9191 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9192 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009193 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
9194 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9195 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9196 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9197 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9198 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9199 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9200 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9201 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9202 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9203 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9204 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9205 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9206 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9207 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9208 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9209 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9210 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9211 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9212 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9213 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9214 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9215 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9216 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9217 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9218 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9219 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9220 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9221 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9222 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9223 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9224 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9225 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9226 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9227 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9228 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9229 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9230 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9231 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9232 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9233 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9234 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9235 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9236 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9237 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
9238 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009239 }, { /* Generated with Crypto++ */
9240 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9241 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9242 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9243 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9244 .klen = 32,
9245 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9246 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9247 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9248 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9249 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9250 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9251 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9252 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9253 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9254 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9255 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9256 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9257 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9258 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9259 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9260 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9261 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9262 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9263 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9264 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009265 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9266 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9267 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9268 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9269 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9270 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9271 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9272 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9273 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9274 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9275 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9276 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9277 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9278 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9279 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9280 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9281 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9282 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9283 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9284 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9285 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9286 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9287 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9288 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9289 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9290 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9291 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9292 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9293 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9294 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9295 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9296 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9297 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9298 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9299 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9300 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9301 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9302 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9303 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9304 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9305 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9306 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9307 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9308 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
9309 "\x2B\xC2\x59",
9310 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009311 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9312 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9313 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9314 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9315 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9316 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9317 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9318 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9319 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9320 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9321 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9322 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9323 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9324 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9325 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9326 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9327 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
9328 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009329 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9330 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9331 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9332 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9333 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9334 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9335 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9336 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9337 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9338 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9339 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9340 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9341 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9342 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9343 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9344 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9345 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9346 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9347 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9348 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9349 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9350 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9351 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9352 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9353 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9354 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9355 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9356 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9357 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9358 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9359 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9360 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9361 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9362 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9363 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9364 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9365 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9366 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9367 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9368 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9369 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9370 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9371 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9372 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
9373 "\x38\xE2\xE5",
9374 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009375 .also_non_np = 1,
9376 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009377 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03009378 }, { /* Generated with Crypto++ */
9379 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9380 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9381 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9382 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9383 .klen = 32,
9384 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
9385 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
9386 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9387 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9388 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9389 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9390 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9391 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9392 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9393 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9394 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9395 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9396 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9397 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9398 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9399 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9400 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9401 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9402 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9403 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9404 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9405 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9406 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9407 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9408 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9409 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9410 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9411 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9412 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9413 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9414 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9415 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9416 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9417 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9418 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9419 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9420 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9421 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9422 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9423 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9424 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9425 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9426 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9427 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9428 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9429 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9430 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9431 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9432 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9433 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9434 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9435 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9436 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9437 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9438 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9439 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9440 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9441 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9442 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9443 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9444 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9445 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9446 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9447 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9448 .ilen = 496,
9449 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
9450 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
9451 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
9452 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
9453 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
9454 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
9455 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
9456 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
9457 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
9458 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
9459 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
9460 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
9461 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
9462 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
9463 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
9464 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
9465 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
9466 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
9467 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
9468 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
9469 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
9470 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
9471 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
9472 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
9473 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
9474 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
9475 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
9476 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
9477 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
9478 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
9479 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
9480 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
9481 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
9482 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
9483 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
9484 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
9485 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
9486 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
9487 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
9488 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
9489 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
9490 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
9491 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
9492 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
9493 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
9494 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
9495 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
9496 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
9497 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
9498 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
9499 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
9500 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
9501 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
9502 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
9503 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
9504 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
9505 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
9506 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
9507 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
9508 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
9509 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
9510 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
9511 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009512 },
9513};
9514
9515static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
9516 { /* Generated with Crypto++ */
9517 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9518 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9519 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9520 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9521 .klen = 32,
9522 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9523 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9524 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9525 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9526 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9527 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9528 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9529 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9530 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9531 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9532 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9533 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9534 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9535 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9536 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9537 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9538 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9539 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9540 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009541 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
9542 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9543 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9544 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9545 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9546 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9547 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9548 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9549 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9550 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9551 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9552 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9553 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9554 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9555 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9556 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9557 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9558 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9559 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9560 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9561 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9562 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9563 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9564 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9565 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9566 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9567 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9568 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9569 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9570 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9571 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9572 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9573 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9574 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9575 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9576 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9577 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9578 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9579 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9580 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9581 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9582 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9583 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9584 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9585 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
9586 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009587 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9588 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9589 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9590 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9591 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9592 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9593 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9594 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9595 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9596 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9597 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9598 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9599 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9600 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9601 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9602 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9603 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009604 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9605 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9606 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9607 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9608 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9609 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9610 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9611 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9612 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9613 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9614 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9615 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9616 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9617 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9618 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9619 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9620 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9621 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9622 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9623 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9624 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9625 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9626 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9627 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9628 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9629 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9630 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9631 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9632 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9633 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9634 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9635 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9636 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9637 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9638 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9639 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9640 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9641 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9642 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9643 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9644 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9645 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9646 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9647 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9648 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9649 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009650 }, { /* Generated with Crypto++ */
9651 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9652 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9653 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9654 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9655 .klen = 32,
9656 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9657 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9658 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9659 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9660 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9661 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9662 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9663 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9664 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9665 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9666 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9667 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9668 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9669 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9670 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9671 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9672 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9673 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9674 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
9675 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009676 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9677 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9678 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9679 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9680 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9681 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9682 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9683 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9684 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9685 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9686 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9687 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9688 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9689 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9690 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9691 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9692 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9693 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9694 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9695 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9696 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9697 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9698 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9699 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9700 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9701 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9702 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9703 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9704 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9705 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9706 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9707 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9708 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9709 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9710 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9711 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9712 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9713 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9714 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9715 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9716 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9717 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9718 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9719 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
9720 "\x38\xE2\xE5",
9721 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009722 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9723 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9724 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9725 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9726 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9727 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9728 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9729 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9730 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9731 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9732 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9733 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9734 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9735 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9736 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9737 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9738 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9739 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009740 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9741 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9742 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9743 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9744 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9745 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9746 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9747 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9748 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9749 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9750 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9751 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9752 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9753 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9754 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9755 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9756 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9757 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9758 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9759 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9760 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9761 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9762 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9763 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9764 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9765 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9766 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9767 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9768 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9769 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9770 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9771 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9772 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9773 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9774 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9775 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9776 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9777 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9778 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9779 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9780 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9781 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9782 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9783 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
9784 "\x2B\xC2\x59",
9785 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009786 .also_non_np = 1,
9787 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009788 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03009789 }, { /* Generated with Crypto++ */
9790 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9791 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9792 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9793 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9794 .klen = 32,
9795 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
9796 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
9797 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
9798 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
9799 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
9800 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
9801 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
9802 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
9803 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
9804 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
9805 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
9806 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
9807 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
9808 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
9809 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
9810 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
9811 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
9812 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
9813 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
9814 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
9815 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
9816 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
9817 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
9818 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
9819 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
9820 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
9821 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
9822 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
9823 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
9824 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
9825 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
9826 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
9827 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
9828 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
9829 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
9830 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
9831 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
9832 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
9833 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
9834 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
9835 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
9836 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
9837 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
9838 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
9839 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
9840 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
9841 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
9842 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
9843 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
9844 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
9845 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
9846 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
9847 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
9848 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
9849 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
9850 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
9851 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
9852 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
9853 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
9854 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
9855 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
9856 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
9857 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
9858 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
9859 .ilen = 496,
9860 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9861 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9862 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9863 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9864 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9865 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9866 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9867 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9868 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9869 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9870 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9871 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9872 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9873 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9874 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9875 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9876 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9877 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9878 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9879 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9880 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9881 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9882 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9883 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9884 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9885 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9886 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9887 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9888 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9889 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9890 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9891 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9892 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9893 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9894 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9895 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9896 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9897 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9898 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9899 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9900 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9901 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9902 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9903 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9904 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9905 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9906 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9907 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9908 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9909 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9910 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9911 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9912 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9913 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9914 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9915 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9916 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9917 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9918 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9919 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9920 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9921 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9922 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009923 },
9924};
Herbert Xuda7f0332008-07-31 17:08:25 +08009925
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009926static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
9927 /* Generated from AES-LRW test vectors */
9928 {
9929 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
9930 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
9931 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
9932 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
9933 .klen = 32,
9934 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9935 "\x00\x00\x00\x00\x00\x00\x00\x01",
9936 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9937 "\x38\x39\x41\x42\x43\x44\x45\x46",
9938 .ilen = 16,
9939 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
9940 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
9941 .rlen = 16,
9942 }, {
9943 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
9944 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
9945 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
9946 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
9947 .klen = 32,
9948 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9949 "\x00\x00\x00\x00\x00\x00\x00\x02",
9950 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9951 "\x38\x39\x41\x42\x43\x44\x45\x46",
9952 .ilen = 16,
9953 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
9954 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
9955 .rlen = 16,
9956 }, {
9957 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
9958 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
9959 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
9960 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
9961 .klen = 32,
9962 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9963 "\x00\x00\x00\x02\x00\x00\x00\x00",
9964 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9965 "\x38\x39\x41\x42\x43\x44\x45\x46",
9966 .ilen = 16,
9967 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
9968 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
9969 .rlen = 16,
9970 }, {
9971 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
9972 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
9973 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
9974 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
9975 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
9976 .klen = 40,
9977 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9978 "\x00\x00\x00\x00\x00\x00\x00\x01",
9979 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9980 "\x38\x39\x41\x42\x43\x44\x45\x46",
9981 .ilen = 16,
9982 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
9983 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
9984 .rlen = 16,
9985 }, {
9986 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
9987 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
9988 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
9989 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
9990 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
9991 .klen = 40,
9992 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9993 "\x00\x00\x00\x02\x00\x00\x00\x00",
9994 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
9995 "\x38\x39\x41\x42\x43\x44\x45\x46",
9996 .ilen = 16,
9997 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
9998 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
9999 .rlen = 16,
10000 }, {
10001 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10002 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10003 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10004 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10005 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10006 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10007 .klen = 48,
10008 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10009 "\x00\x00\x00\x00\x00\x00\x00\x01",
10010 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10011 "\x38\x39\x41\x42\x43\x44\x45\x46",
10012 .ilen = 16,
10013 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
10014 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
10015 .rlen = 16,
10016 }, {
10017 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10018 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10019 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10020 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10021 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10022 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10023 .klen = 48,
10024 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10025 "\x00\x00\x00\x02\x00\x00\x00\x00",
10026 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10027 "\x38\x39\x41\x42\x43\x44\x45\x46",
10028 .ilen = 16,
10029 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
10030 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
10031 .rlen = 16,
10032 }, {
10033 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10034 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10035 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10036 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10037 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10038 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10039 .klen = 48,
10040 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10041 "\x00\x00\x00\x00\x00\x00\x00\x01",
10042 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10043 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10044 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10045 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10046 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10047 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10048 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10049 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10050 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10051 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10052 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10053 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10054 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10055 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10056 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10057 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10058 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10059 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10060 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10061 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10062 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10063 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10064 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10065 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10066 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10067 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10068 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10069 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10070 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10071 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10072 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10073 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10074 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10075 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10076 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10077 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10078 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10079 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10080 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10081 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10082 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10083 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10084 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10085 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10086 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10087 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10088 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10089 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10090 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10091 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10092 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10093 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10094 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10095 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10096 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10097 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10098 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10099 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10100 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10101 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10102 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10103 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10104 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10105 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10106 .ilen = 512,
10107 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
10108 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
10109 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
10110 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
10111 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
10112 "\xce\xab\xda\x33\x30\x20\x12\xfa"
10113 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
10114 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
10115 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
10116 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
10117 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
10118 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
10119 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
10120 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
10121 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
10122 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
10123 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
10124 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
10125 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
10126 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
10127 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
10128 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
10129 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
10130 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
10131 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
10132 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
10133 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
10134 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
10135 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
10136 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
10137 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
10138 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
10139 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
10140 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
10141 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
10142 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
10143 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
10144 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
10145 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
10146 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
10147 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
10148 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
10149 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
10150 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
10151 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
10152 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
10153 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
10154 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
10155 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
10156 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
10157 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
10158 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
10159 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
10160 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
10161 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
10162 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
10163 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
10164 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
10165 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
10166 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
10167 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
10168 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
10169 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
10170 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
10171 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010172 .also_non_np = 1,
10173 .np = 2,
10174 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010175 },
10176};
10177
10178static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
10179 /* Generated from AES-LRW test vectors */
10180 /* same as enc vectors with input and result reversed */
10181 {
10182 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10183 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10184 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10185 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10186 .klen = 32,
10187 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10188 "\x00\x00\x00\x00\x00\x00\x00\x01",
10189 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
10190 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
10191 .ilen = 16,
10192 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10193 "\x38\x39\x41\x42\x43\x44\x45\x46",
10194 .rlen = 16,
10195 }, {
10196 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10197 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10198 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10199 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10200 .klen = 32,
10201 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10202 "\x00\x00\x00\x00\x00\x00\x00\x02",
10203 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
10204 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
10205 .ilen = 16,
10206 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10207 "\x38\x39\x41\x42\x43\x44\x45\x46",
10208 .rlen = 16,
10209 }, {
10210 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10211 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10212 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10213 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10214 .klen = 32,
10215 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10216 "\x00\x00\x00\x02\x00\x00\x00\x00",
10217 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
10218 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
10219 .ilen = 16,
10220 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10221 "\x38\x39\x41\x42\x43\x44\x45\x46",
10222 .rlen = 16,
10223 }, {
10224 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10225 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10226 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10227 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10228 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10229 .klen = 40,
10230 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10231 "\x00\x00\x00\x00\x00\x00\x00\x01",
10232 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
10233 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
10234 .ilen = 16,
10235 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10236 "\x38\x39\x41\x42\x43\x44\x45\x46",
10237 .rlen = 16,
10238 }, {
10239 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10240 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10241 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10242 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10243 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10244 .klen = 40,
10245 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10246 "\x00\x00\x00\x02\x00\x00\x00\x00",
10247 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
10248 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
10249 .ilen = 16,
10250 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10251 "\x38\x39\x41\x42\x43\x44\x45\x46",
10252 .rlen = 16,
10253 }, {
10254 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10255 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10256 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10257 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10258 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10259 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10260 .klen = 48,
10261 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10262 "\x00\x00\x00\x00\x00\x00\x00\x01",
10263 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
10264 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
10265 .ilen = 16,
10266 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10267 "\x38\x39\x41\x42\x43\x44\x45\x46",
10268 .rlen = 16,
10269 }, {
10270 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10271 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10272 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10273 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10274 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10275 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10276 .klen = 48,
10277 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10278 "\x00\x00\x00\x02\x00\x00\x00\x00",
10279 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
10280 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
10281 .ilen = 16,
10282 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10283 "\x38\x39\x41\x42\x43\x44\x45\x46",
10284 .rlen = 16,
10285 }, {
10286 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10287 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10288 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10289 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10290 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10291 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10292 .klen = 48,
10293 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10294 "\x00\x00\x00\x00\x00\x00\x00\x01",
10295 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
10296 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
10297 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
10298 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
10299 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
10300 "\xce\xab\xda\x33\x30\x20\x12\xfa"
10301 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
10302 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
10303 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
10304 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
10305 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
10306 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
10307 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
10308 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
10309 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
10310 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
10311 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
10312 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
10313 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
10314 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
10315 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
10316 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
10317 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
10318 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
10319 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
10320 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
10321 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
10322 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
10323 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
10324 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
10325 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
10326 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
10327 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
10328 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
10329 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
10330 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
10331 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
10332 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
10333 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
10334 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
10335 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
10336 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
10337 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
10338 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
10339 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
10340 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
10341 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
10342 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
10343 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
10344 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
10345 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
10346 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
10347 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
10348 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
10349 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
10350 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
10351 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
10352 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
10353 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
10354 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
10355 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
10356 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
10357 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
10358 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
10359 .ilen = 512,
10360 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10361 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10362 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10363 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10364 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10365 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10366 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10367 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10368 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10369 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10370 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10371 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10372 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10373 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10374 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10375 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10376 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10377 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10378 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10379 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10380 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10381 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10382 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10383 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10384 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10385 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10386 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10387 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10388 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10389 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10390 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10391 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10392 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10393 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10394 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10395 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10396 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10397 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10398 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10399 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10400 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10401 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10402 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10403 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10404 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10405 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10406 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10407 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10408 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10409 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10410 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10411 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10412 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10413 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10414 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10415 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10416 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10417 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10418 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10419 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10420 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10421 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10422 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10423 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10424 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010425 .also_non_np = 1,
10426 .np = 2,
10427 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010428 },
10429};
10430
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030010431static struct cipher_testvec serpent_xts_enc_tv_template[] = {
10432 /* Generated from AES-XTS test vectors */
10433 {
10434 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10435 "\x00\x00\x00\x00\x00\x00\x00\x00"
10436 "\x00\x00\x00\x00\x00\x00\x00\x00"
10437 "\x00\x00\x00\x00\x00\x00\x00\x00",
10438 .klen = 32,
10439 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10440 "\x00\x00\x00\x00\x00\x00\x00\x00",
10441 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10442 "\x00\x00\x00\x00\x00\x00\x00\x00"
10443 "\x00\x00\x00\x00\x00\x00\x00\x00"
10444 "\x00\x00\x00\x00\x00\x00\x00\x00",
10445 .ilen = 32,
10446 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
10447 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
10448 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
10449 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
10450 .rlen = 32,
10451 }, {
10452 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10453 "\x11\x11\x11\x11\x11\x11\x11\x11"
10454 "\x22\x22\x22\x22\x22\x22\x22\x22"
10455 "\x22\x22\x22\x22\x22\x22\x22\x22",
10456 .klen = 32,
10457 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10458 "\x00\x00\x00\x00\x00\x00\x00\x00",
10459 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10460 "\x44\x44\x44\x44\x44\x44\x44\x44"
10461 "\x44\x44\x44\x44\x44\x44\x44\x44"
10462 "\x44\x44\x44\x44\x44\x44\x44\x44",
10463 .ilen = 32,
10464 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
10465 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
10466 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
10467 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
10468 .rlen = 32,
10469 }, {
10470 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10471 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10472 "\x22\x22\x22\x22\x22\x22\x22\x22"
10473 "\x22\x22\x22\x22\x22\x22\x22\x22",
10474 .klen = 32,
10475 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10476 "\x00\x00\x00\x00\x00\x00\x00\x00",
10477 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10478 "\x44\x44\x44\x44\x44\x44\x44\x44"
10479 "\x44\x44\x44\x44\x44\x44\x44\x44"
10480 "\x44\x44\x44\x44\x44\x44\x44\x44",
10481 .ilen = 32,
10482 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
10483 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
10484 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
10485 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
10486 .rlen = 32,
10487 }, {
10488 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10489 "\x23\x53\x60\x28\x74\x71\x35\x26"
10490 "\x31\x41\x59\x26\x53\x58\x97\x93"
10491 "\x23\x84\x62\x64\x33\x83\x27\x95",
10492 .klen = 32,
10493 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10494 "\x00\x00\x00\x00\x00\x00\x00\x00",
10495 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10496 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10497 "\x10\x11\x12\x13\x14\x15\x16\x17"
10498 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10499 "\x20\x21\x22\x23\x24\x25\x26\x27"
10500 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10501 "\x30\x31\x32\x33\x34\x35\x36\x37"
10502 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10503 "\x40\x41\x42\x43\x44\x45\x46\x47"
10504 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10505 "\x50\x51\x52\x53\x54\x55\x56\x57"
10506 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10507 "\x60\x61\x62\x63\x64\x65\x66\x67"
10508 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10509 "\x70\x71\x72\x73\x74\x75\x76\x77"
10510 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10511 "\x80\x81\x82\x83\x84\x85\x86\x87"
10512 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10513 "\x90\x91\x92\x93\x94\x95\x96\x97"
10514 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10515 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10516 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10517 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10518 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10519 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10520 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10521 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10522 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10523 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10524 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10525 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10526 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10527 "\x00\x01\x02\x03\x04\x05\x06\x07"
10528 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10529 "\x10\x11\x12\x13\x14\x15\x16\x17"
10530 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10531 "\x20\x21\x22\x23\x24\x25\x26\x27"
10532 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10533 "\x30\x31\x32\x33\x34\x35\x36\x37"
10534 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10535 "\x40\x41\x42\x43\x44\x45\x46\x47"
10536 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10537 "\x50\x51\x52\x53\x54\x55\x56\x57"
10538 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10539 "\x60\x61\x62\x63\x64\x65\x66\x67"
10540 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10541 "\x70\x71\x72\x73\x74\x75\x76\x77"
10542 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10543 "\x80\x81\x82\x83\x84\x85\x86\x87"
10544 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10545 "\x90\x91\x92\x93\x94\x95\x96\x97"
10546 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10547 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10548 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10549 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10550 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10551 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10552 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10553 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10554 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10555 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10556 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10557 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10558 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10559 .ilen = 512,
10560 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
10561 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
10562 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
10563 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
10564 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
10565 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
10566 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
10567 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
10568 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
10569 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
10570 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
10571 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
10572 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
10573 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
10574 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
10575 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
10576 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
10577 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
10578 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
10579 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
10580 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
10581 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
10582 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
10583 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
10584 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
10585 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
10586 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
10587 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
10588 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
10589 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
10590 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
10591 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
10592 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
10593 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
10594 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
10595 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
10596 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
10597 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
10598 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
10599 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
10600 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
10601 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
10602 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
10603 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
10604 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
10605 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
10606 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
10607 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
10608 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
10609 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
10610 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
10611 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
10612 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
10613 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
10614 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
10615 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
10616 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
10617 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
10618 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
10619 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
10620 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
10621 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
10622 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
10623 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
10624 .rlen = 512,
10625 }, {
10626 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10627 "\x23\x53\x60\x28\x74\x71\x35\x26"
10628 "\x62\x49\x77\x57\x24\x70\x93\x69"
10629 "\x99\x59\x57\x49\x66\x96\x76\x27"
10630 "\x31\x41\x59\x26\x53\x58\x97\x93"
10631 "\x23\x84\x62\x64\x33\x83\x27\x95"
10632 "\x02\x88\x41\x97\x16\x93\x99\x37"
10633 "\x51\x05\x82\x09\x74\x94\x45\x92",
10634 .klen = 64,
10635 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10636 "\x00\x00\x00\x00\x00\x00\x00\x00",
10637 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10638 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10639 "\x10\x11\x12\x13\x14\x15\x16\x17"
10640 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10641 "\x20\x21\x22\x23\x24\x25\x26\x27"
10642 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10643 "\x30\x31\x32\x33\x34\x35\x36\x37"
10644 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10645 "\x40\x41\x42\x43\x44\x45\x46\x47"
10646 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10647 "\x50\x51\x52\x53\x54\x55\x56\x57"
10648 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10649 "\x60\x61\x62\x63\x64\x65\x66\x67"
10650 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10651 "\x70\x71\x72\x73\x74\x75\x76\x77"
10652 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10653 "\x80\x81\x82\x83\x84\x85\x86\x87"
10654 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10655 "\x90\x91\x92\x93\x94\x95\x96\x97"
10656 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10657 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10658 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10659 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10660 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10661 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10662 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10663 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10664 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10665 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10666 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10667 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10668 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10669 "\x00\x01\x02\x03\x04\x05\x06\x07"
10670 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10671 "\x10\x11\x12\x13\x14\x15\x16\x17"
10672 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10673 "\x20\x21\x22\x23\x24\x25\x26\x27"
10674 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10675 "\x30\x31\x32\x33\x34\x35\x36\x37"
10676 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10677 "\x40\x41\x42\x43\x44\x45\x46\x47"
10678 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10679 "\x50\x51\x52\x53\x54\x55\x56\x57"
10680 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10681 "\x60\x61\x62\x63\x64\x65\x66\x67"
10682 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10683 "\x70\x71\x72\x73\x74\x75\x76\x77"
10684 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10685 "\x80\x81\x82\x83\x84\x85\x86\x87"
10686 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10687 "\x90\x91\x92\x93\x94\x95\x96\x97"
10688 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10689 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10690 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10691 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10692 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10693 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10694 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10695 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10696 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10697 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10698 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10699 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10700 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10701 .ilen = 512,
10702 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
10703 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
10704 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
10705 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
10706 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
10707 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
10708 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
10709 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
10710 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
10711 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
10712 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
10713 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
10714 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
10715 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
10716 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
10717 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
10718 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
10719 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
10720 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
10721 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
10722 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
10723 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
10724 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
10725 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
10726 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
10727 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
10728 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
10729 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
10730 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
10731 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
10732 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
10733 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
10734 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
10735 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
10736 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
10737 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
10738 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
10739 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
10740 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
10741 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
10742 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
10743 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
10744 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
10745 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
10746 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
10747 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
10748 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
10749 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
10750 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
10751 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
10752 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
10753 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
10754 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
10755 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
10756 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
10757 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
10758 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
10759 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
10760 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
10761 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
10762 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
10763 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
10764 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
10765 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
10766 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010767 .also_non_np = 1,
10768 .np = 2,
10769 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030010770 },
10771};
10772
10773static struct cipher_testvec serpent_xts_dec_tv_template[] = {
10774 /* Generated from AES-XTS test vectors */
10775 /* same as enc vectors with input and result reversed */
10776 {
10777 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10778 "\x00\x00\x00\x00\x00\x00\x00\x00"
10779 "\x00\x00\x00\x00\x00\x00\x00\x00"
10780 "\x00\x00\x00\x00\x00\x00\x00\x00",
10781 .klen = 32,
10782 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10783 "\x00\x00\x00\x00\x00\x00\x00\x00",
10784 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
10785 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
10786 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
10787 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
10788 .ilen = 32,
10789 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
10790 "\x00\x00\x00\x00\x00\x00\x00\x00"
10791 "\x00\x00\x00\x00\x00\x00\x00\x00"
10792 "\x00\x00\x00\x00\x00\x00\x00\x00",
10793 .rlen = 32,
10794 }, {
10795 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10796 "\x11\x11\x11\x11\x11\x11\x11\x11"
10797 "\x22\x22\x22\x22\x22\x22\x22\x22"
10798 "\x22\x22\x22\x22\x22\x22\x22\x22",
10799 .klen = 32,
10800 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10801 "\x00\x00\x00\x00\x00\x00\x00\x00",
10802 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
10803 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
10804 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
10805 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
10806 .ilen = 32,
10807 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10808 "\x44\x44\x44\x44\x44\x44\x44\x44"
10809 "\x44\x44\x44\x44\x44\x44\x44\x44"
10810 "\x44\x44\x44\x44\x44\x44\x44\x44",
10811 .rlen = 32,
10812 }, {
10813 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10814 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10815 "\x22\x22\x22\x22\x22\x22\x22\x22"
10816 "\x22\x22\x22\x22\x22\x22\x22\x22",
10817 .klen = 32,
10818 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10819 "\x00\x00\x00\x00\x00\x00\x00\x00",
10820 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
10821 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
10822 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
10823 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
10824 .ilen = 32,
10825 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10826 "\x44\x44\x44\x44\x44\x44\x44\x44"
10827 "\x44\x44\x44\x44\x44\x44\x44\x44"
10828 "\x44\x44\x44\x44\x44\x44\x44\x44",
10829 .rlen = 32,
10830 }, {
10831 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10832 "\x23\x53\x60\x28\x74\x71\x35\x26"
10833 "\x31\x41\x59\x26\x53\x58\x97\x93"
10834 "\x23\x84\x62\x64\x33\x83\x27\x95",
10835 .klen = 32,
10836 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10837 "\x00\x00\x00\x00\x00\x00\x00\x00",
10838 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
10839 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
10840 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
10841 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
10842 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
10843 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
10844 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
10845 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
10846 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
10847 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
10848 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
10849 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
10850 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
10851 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
10852 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
10853 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
10854 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
10855 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
10856 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
10857 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
10858 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
10859 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
10860 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
10861 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
10862 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
10863 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
10864 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
10865 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
10866 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
10867 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
10868 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
10869 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
10870 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
10871 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
10872 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
10873 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
10874 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
10875 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
10876 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
10877 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
10878 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
10879 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
10880 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
10881 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
10882 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
10883 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
10884 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
10885 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
10886 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
10887 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
10888 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
10889 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
10890 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
10891 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
10892 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
10893 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
10894 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
10895 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
10896 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
10897 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
10898 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
10899 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
10900 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
10901 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
10902 .ilen = 512,
10903 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10904 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10905 "\x10\x11\x12\x13\x14\x15\x16\x17"
10906 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10907 "\x20\x21\x22\x23\x24\x25\x26\x27"
10908 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10909 "\x30\x31\x32\x33\x34\x35\x36\x37"
10910 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10911 "\x40\x41\x42\x43\x44\x45\x46\x47"
10912 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10913 "\x50\x51\x52\x53\x54\x55\x56\x57"
10914 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10915 "\x60\x61\x62\x63\x64\x65\x66\x67"
10916 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10917 "\x70\x71\x72\x73\x74\x75\x76\x77"
10918 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10919 "\x80\x81\x82\x83\x84\x85\x86\x87"
10920 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10921 "\x90\x91\x92\x93\x94\x95\x96\x97"
10922 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10923 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10924 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10925 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10926 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10927 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10928 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10929 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10930 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10931 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10932 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10933 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10934 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10935 "\x00\x01\x02\x03\x04\x05\x06\x07"
10936 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10937 "\x10\x11\x12\x13\x14\x15\x16\x17"
10938 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10939 "\x20\x21\x22\x23\x24\x25\x26\x27"
10940 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10941 "\x30\x31\x32\x33\x34\x35\x36\x37"
10942 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10943 "\x40\x41\x42\x43\x44\x45\x46\x47"
10944 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10945 "\x50\x51\x52\x53\x54\x55\x56\x57"
10946 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10947 "\x60\x61\x62\x63\x64\x65\x66\x67"
10948 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10949 "\x70\x71\x72\x73\x74\x75\x76\x77"
10950 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10951 "\x80\x81\x82\x83\x84\x85\x86\x87"
10952 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10953 "\x90\x91\x92\x93\x94\x95\x96\x97"
10954 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10955 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10956 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10957 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10958 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10959 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10960 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10961 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10962 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10963 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10964 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10965 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10966 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10967 .rlen = 512,
10968 }, {
10969 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10970 "\x23\x53\x60\x28\x74\x71\x35\x26"
10971 "\x62\x49\x77\x57\x24\x70\x93\x69"
10972 "\x99\x59\x57\x49\x66\x96\x76\x27"
10973 "\x31\x41\x59\x26\x53\x58\x97\x93"
10974 "\x23\x84\x62\x64\x33\x83\x27\x95"
10975 "\x02\x88\x41\x97\x16\x93\x99\x37"
10976 "\x51\x05\x82\x09\x74\x94\x45\x92",
10977 .klen = 64,
10978 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10979 "\x00\x00\x00\x00\x00\x00\x00\x00",
10980 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
10981 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
10982 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
10983 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
10984 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
10985 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
10986 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
10987 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
10988 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
10989 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
10990 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
10991 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
10992 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
10993 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
10994 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
10995 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
10996 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
10997 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
10998 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
10999 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
11000 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
11001 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
11002 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
11003 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
11004 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
11005 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
11006 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
11007 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
11008 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
11009 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
11010 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
11011 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
11012 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
11013 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
11014 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
11015 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
11016 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
11017 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
11018 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
11019 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
11020 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
11021 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
11022 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
11023 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
11024 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
11025 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
11026 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
11027 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
11028 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
11029 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
11030 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
11031 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
11032 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
11033 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
11034 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
11035 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
11036 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
11037 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
11038 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
11039 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
11040 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
11041 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
11042 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
11043 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
11044 .ilen = 512,
11045 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11046 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11047 "\x10\x11\x12\x13\x14\x15\x16\x17"
11048 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11049 "\x20\x21\x22\x23\x24\x25\x26\x27"
11050 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11051 "\x30\x31\x32\x33\x34\x35\x36\x37"
11052 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11053 "\x40\x41\x42\x43\x44\x45\x46\x47"
11054 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11055 "\x50\x51\x52\x53\x54\x55\x56\x57"
11056 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11057 "\x60\x61\x62\x63\x64\x65\x66\x67"
11058 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11059 "\x70\x71\x72\x73\x74\x75\x76\x77"
11060 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11061 "\x80\x81\x82\x83\x84\x85\x86\x87"
11062 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11063 "\x90\x91\x92\x93\x94\x95\x96\x97"
11064 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11065 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11066 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11067 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11068 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11069 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11070 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11071 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11072 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11073 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11074 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11075 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11076 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11077 "\x00\x01\x02\x03\x04\x05\x06\x07"
11078 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11079 "\x10\x11\x12\x13\x14\x15\x16\x17"
11080 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11081 "\x20\x21\x22\x23\x24\x25\x26\x27"
11082 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11083 "\x30\x31\x32\x33\x34\x35\x36\x37"
11084 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11085 "\x40\x41\x42\x43\x44\x45\x46\x47"
11086 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11087 "\x50\x51\x52\x53\x54\x55\x56\x57"
11088 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11089 "\x60\x61\x62\x63\x64\x65\x66\x67"
11090 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11091 "\x70\x71\x72\x73\x74\x75\x76\x77"
11092 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11093 "\x80\x81\x82\x83\x84\x85\x86\x87"
11094 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11095 "\x90\x91\x92\x93\x94\x95\x96\x97"
11096 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11097 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11098 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11099 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11100 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11101 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11102 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11103 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11104 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11105 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11106 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11107 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11108 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11109 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011110 .also_non_np = 1,
11111 .np = 2,
11112 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030011113 },
11114};
11115
Herbert Xuda7f0332008-07-31 17:08:25 +080011116/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011117#define CAST6_ENC_TEST_VECTORS 4
11118#define CAST6_DEC_TEST_VECTORS 4
11119#define CAST6_CBC_ENC_TEST_VECTORS 1
11120#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030011121#define CAST6_CTR_ENC_TEST_VECTORS 2
11122#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011123#define CAST6_LRW_ENC_TEST_VECTORS 1
11124#define CAST6_LRW_DEC_TEST_VECTORS 1
11125#define CAST6_XTS_ENC_TEST_VECTORS 1
11126#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080011127
11128static struct cipher_testvec cast6_enc_tv_template[] = {
11129 {
11130 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11131 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
11132 .klen = 16,
11133 .input = zeroed_string,
11134 .ilen = 16,
11135 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
11136 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
11137 .rlen = 16,
11138 }, {
11139 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11140 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11141 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
11142 .klen = 24,
11143 .input = zeroed_string,
11144 .ilen = 16,
11145 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
11146 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
11147 .rlen = 16,
11148 }, {
11149 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11150 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11151 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
11152 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
11153 .klen = 32,
11154 .input = zeroed_string,
11155 .ilen = 16,
11156 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
11157 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
11158 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011159 }, { /* Generated from TF test vectors */
11160 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11161 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11162 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11163 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11164 .klen = 32,
11165 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11166 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11167 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11168 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11169 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11170 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11171 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11172 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11173 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11174 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11175 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11176 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11177 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11178 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11179 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11180 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11181 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11182 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11183 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11184 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11185 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11186 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11187 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11188 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11189 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11190 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11191 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11192 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11193 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11194 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11195 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11196 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11197 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11198 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11199 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11200 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11201 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11202 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11203 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11204 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11205 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11206 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11207 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11208 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11209 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11210 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11211 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11212 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11213 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11214 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11215 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11216 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11217 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11218 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11219 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11220 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11221 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11222 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11223 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11224 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11225 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11226 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11227 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11228 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11229 .ilen = 496,
11230 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
11231 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
11232 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
11233 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
11234 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
11235 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
11236 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
11237 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
11238 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
11239 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
11240 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
11241 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
11242 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
11243 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
11244 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
11245 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
11246 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
11247 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
11248 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
11249 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
11250 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
11251 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
11252 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
11253 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
11254 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
11255 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
11256 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
11257 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
11258 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
11259 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
11260 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
11261 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
11262 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
11263 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
11264 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
11265 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
11266 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
11267 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
11268 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
11269 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
11270 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
11271 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
11272 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
11273 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
11274 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
11275 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
11276 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
11277 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
11278 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
11279 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
11280 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
11281 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
11282 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
11283 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
11284 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
11285 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
11286 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
11287 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
11288 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
11289 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
11290 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
11291 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
11292 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011293 .also_non_np = 1,
11294 .np = 2,
11295 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011296 },
11297};
11298
11299static struct cipher_testvec cast6_dec_tv_template[] = {
11300 {
11301 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11302 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
11303 .klen = 16,
11304 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
11305 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
11306 .ilen = 16,
11307 .result = zeroed_string,
11308 .rlen = 16,
11309 }, {
11310 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11311 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11312 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
11313 .klen = 24,
11314 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
11315 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
11316 .ilen = 16,
11317 .result = zeroed_string,
11318 .rlen = 16,
11319 }, {
11320 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11321 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11322 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
11323 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
11324 .klen = 32,
11325 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
11326 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
11327 .ilen = 16,
11328 .result = zeroed_string,
11329 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011330 }, { /* Generated from TF test vectors */
11331 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11332 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11333 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11334 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11335 .klen = 32,
11336 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11337 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11338 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
11339 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
11340 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
11341 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
11342 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
11343 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
11344 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
11345 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
11346 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
11347 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
11348 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
11349 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
11350 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
11351 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
11352 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
11353 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
11354 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
11355 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
11356 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
11357 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
11358 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
11359 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
11360 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
11361 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
11362 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
11363 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
11364 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
11365 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
11366 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
11367 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
11368 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
11369 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
11370 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
11371 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
11372 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
11373 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
11374 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
11375 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
11376 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
11377 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
11378 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
11379 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
11380 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
11381 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
11382 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
11383 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
11384 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
11385 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
11386 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
11387 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
11388 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
11389 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
11390 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
11391 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
11392 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
11393 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
11394 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
11395 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
11396 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
11397 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
11398 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
11399 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
11400 .ilen = 496,
11401 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11402 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11403 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11404 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11405 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11406 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11407 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11408 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11409 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11410 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11411 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11412 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11413 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11414 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11415 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11416 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11417 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11418 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11419 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11420 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11421 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11422 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11423 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11424 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11425 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11426 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11427 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11428 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11429 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11430 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11431 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11432 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11433 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11434 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11435 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11436 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11437 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11438 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11439 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11440 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11441 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11442 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11443 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11444 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11445 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11446 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11447 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11448 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11449 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11450 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11451 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11452 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11453 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11454 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11455 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11456 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11457 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11458 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11459 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11460 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11461 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11462 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11463 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011464 .also_non_np = 1,
11465 .np = 2,
11466 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011467 },
11468};
11469
11470static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
11471 { /* Generated from TF test vectors */
11472 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11473 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11474 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11475 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11476 .klen = 32,
11477 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11478 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11479 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11480 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11481 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11482 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11483 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11484 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11485 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11486 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11487 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11488 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11489 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11490 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11491 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11492 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11493 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11494 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11495 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11496 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11497 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11498 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11499 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11500 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11501 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11502 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11503 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11504 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11505 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11506 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11507 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11508 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11509 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11510 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11511 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11512 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11513 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11514 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11515 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11516 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11517 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11518 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11519 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11520 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11521 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11522 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11523 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11524 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11525 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11526 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11527 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11528 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11529 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11530 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11531 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11532 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11533 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11534 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11535 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11536 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11537 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11538 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11539 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11540 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11541 .ilen = 496,
11542 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
11543 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
11544 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
11545 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
11546 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
11547 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
11548 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
11549 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
11550 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
11551 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
11552 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
11553 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
11554 "\x23\x16\x47\x72\x81\x13\x3A\x72"
11555 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
11556 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
11557 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
11558 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
11559 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
11560 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
11561 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
11562 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
11563 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
11564 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
11565 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
11566 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
11567 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
11568 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
11569 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
11570 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
11571 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
11572 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
11573 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
11574 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
11575 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
11576 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
11577 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
11578 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
11579 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
11580 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
11581 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
11582 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
11583 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
11584 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
11585 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
11586 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
11587 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
11588 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
11589 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
11590 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
11591 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
11592 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
11593 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
11594 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
11595 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
11596 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
11597 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
11598 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
11599 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
11600 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
11601 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
11602 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
11603 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
11604 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011605 .also_non_np = 1,
11606 .np = 2,
11607 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011608 },
11609};
11610
11611static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
11612 { /* Generated from TF test vectors */
11613 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11614 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11615 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11616 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11617 .klen = 32,
11618 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11619 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11620 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
11621 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
11622 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
11623 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
11624 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
11625 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
11626 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
11627 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
11628 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
11629 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
11630 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
11631 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
11632 "\x23\x16\x47\x72\x81\x13\x3A\x72"
11633 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
11634 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
11635 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
11636 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
11637 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
11638 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
11639 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
11640 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
11641 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
11642 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
11643 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
11644 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
11645 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
11646 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
11647 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
11648 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
11649 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
11650 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
11651 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
11652 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
11653 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
11654 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
11655 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
11656 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
11657 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
11658 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
11659 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
11660 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
11661 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
11662 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
11663 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
11664 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
11665 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
11666 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
11667 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
11668 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
11669 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
11670 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
11671 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
11672 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
11673 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
11674 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
11675 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
11676 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
11677 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
11678 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
11679 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
11680 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
11681 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
11682 .ilen = 496,
11683 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11684 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11685 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11686 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11687 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11688 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11689 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11690 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11691 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11692 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11693 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11694 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11695 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11696 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11697 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11698 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11699 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11700 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11701 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11702 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11703 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11704 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11705 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11706 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11707 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11708 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11709 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11710 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11711 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11712 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11713 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11714 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11715 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11716 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11717 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11718 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11719 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11720 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11721 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11722 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11723 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11724 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11725 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11726 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11727 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11728 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11729 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11730 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11731 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11732 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11733 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11734 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11735 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11736 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11737 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11738 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11739 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11740 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11741 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11742 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11743 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11744 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11745 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011746 .also_non_np = 1,
11747 .np = 2,
11748 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011749 },
11750};
11751
11752static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
11753 { /* Generated from TF test vectors */
11754 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11755 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11756 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11757 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11758 .klen = 32,
11759 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11760 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11761 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11762 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030011763 "\x3A",
11764 .ilen = 17,
11765 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11766 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
11767 "\x57",
11768 .rlen = 17,
11769 }, { /* Generated from TF test vectors */
11770 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11771 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11772 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11773 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11774 .klen = 32,
11775 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11776 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11777 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11778 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011779 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11780 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11781 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11782 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11783 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11784 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11785 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11786 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11787 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11788 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11789 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11790 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11791 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11792 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11793 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11794 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11795 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11796 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11797 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11798 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11799 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11800 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11801 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11802 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11803 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11804 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11805 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11806 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11807 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11808 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11809 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11810 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11811 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11812 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11813 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11814 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11815 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11816 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11817 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11818 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11819 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11820 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11821 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11822 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11823 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11824 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11825 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11826 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11827 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11828 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11829 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11830 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11831 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11832 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11833 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11834 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11835 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11836 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11837 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11838 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11839 .ilen = 496,
11840 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11841 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
11842 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
11843 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
11844 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
11845 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
11846 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
11847 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
11848 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
11849 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
11850 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
11851 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
11852 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
11853 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
11854 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
11855 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
11856 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
11857 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
11858 "\x49\x61\x22\x52\x64\x8C\x46\x41"
11859 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
11860 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
11861 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
11862 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
11863 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
11864 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
11865 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
11866 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
11867 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
11868 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
11869 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
11870 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
11871 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
11872 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
11873 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
11874 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
11875 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
11876 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
11877 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
11878 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
11879 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
11880 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
11881 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
11882 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
11883 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
11884 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
11885 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
11886 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
11887 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
11888 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
11889 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
11890 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
11891 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
11892 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
11893 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
11894 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
11895 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
11896 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
11897 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
11898 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
11899 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
11900 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
11901 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
11902 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011903 .also_non_np = 1,
11904 .np = 2,
11905 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011906 },
11907};
11908
11909static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
11910 { /* Generated from TF test vectors */
11911 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11912 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11913 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11914 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11915 .klen = 32,
11916 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11917 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11918 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11919 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030011920 "\x57",
11921 .ilen = 17,
11922 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11923 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11924 "\x3A",
11925 .rlen = 17,
11926 }, { /* Generated from TF test vectors */
11927 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11928 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11929 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11930 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11931 .klen = 32,
11932 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11933 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11934 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11935 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011936 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
11937 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
11938 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
11939 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
11940 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
11941 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
11942 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
11943 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
11944 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
11945 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
11946 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
11947 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
11948 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
11949 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
11950 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
11951 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
11952 "\x49\x61\x22\x52\x64\x8C\x46\x41"
11953 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
11954 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
11955 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
11956 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
11957 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
11958 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
11959 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
11960 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
11961 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
11962 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
11963 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
11964 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
11965 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
11966 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
11967 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
11968 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
11969 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
11970 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
11971 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
11972 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
11973 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
11974 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
11975 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
11976 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
11977 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
11978 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
11979 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
11980 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
11981 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
11982 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
11983 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
11984 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
11985 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
11986 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
11987 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
11988 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
11989 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
11990 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
11991 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
11992 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
11993 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
11994 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
11995 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
11996 .ilen = 496,
11997 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11998 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11999 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12000 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12001 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12002 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12003 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12004 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12005 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12006 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12007 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12008 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12009 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12010 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12011 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12012 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12013 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12014 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12015 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12016 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12017 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12018 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12019 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12020 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12021 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12022 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12023 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12024 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12025 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12026 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12027 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12028 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12029 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12030 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12031 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12032 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12033 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12034 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12035 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12036 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12037 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12038 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12039 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12040 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12041 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12042 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12043 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12044 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12045 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12046 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12047 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12048 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12049 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12050 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12051 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12052 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12053 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12054 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12055 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12056 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12057 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12058 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12059 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012060 .also_non_np = 1,
12061 .np = 2,
12062 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012063 },
12064};
12065
12066static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
12067 { /* Generated from TF test vectors */
12068 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12069 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12070 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12071 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12072 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12073 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12074 .klen = 48,
12075 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12076 "\x00\x00\x00\x00\x00\x00\x00\x01",
12077 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12078 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12079 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12080 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12081 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12082 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12083 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12084 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12085 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12086 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12087 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12088 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12089 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12090 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12091 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12092 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12093 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12094 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12095 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12096 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12097 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12098 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12099 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12100 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12101 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12102 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12103 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12104 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12105 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12106 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12107 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12108 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12109 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12110 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12111 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12112 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12113 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12114 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12115 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12116 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12117 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12118 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12119 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12120 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12121 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12122 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12123 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12124 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12125 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12126 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12127 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12128 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12129 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12130 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12131 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12132 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12133 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12134 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12135 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12136 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12137 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12138 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12139 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12140 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12141 .ilen = 512,
12142 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
12143 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
12144 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
12145 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
12146 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
12147 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
12148 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
12149 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
12150 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
12151 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
12152 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
12153 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
12154 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
12155 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
12156 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
12157 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
12158 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
12159 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
12160 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
12161 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
12162 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
12163 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
12164 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
12165 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
12166 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
12167 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
12168 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
12169 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
12170 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
12171 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
12172 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
12173 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
12174 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
12175 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
12176 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
12177 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
12178 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
12179 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
12180 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
12181 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
12182 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
12183 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
12184 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
12185 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
12186 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
12187 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
12188 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
12189 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
12190 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
12191 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
12192 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
12193 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
12194 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
12195 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
12196 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
12197 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
12198 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
12199 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
12200 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
12201 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
12202 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
12203 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
12204 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
12205 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
12206 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012207 .also_non_np = 1,
12208 .np = 2,
12209 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012210 },
12211};
12212
12213static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
12214 { /* Generated from TF test vectors */
12215 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12216 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12217 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12218 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12219 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12220 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12221 .klen = 48,
12222 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12223 "\x00\x00\x00\x00\x00\x00\x00\x01",
12224 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
12225 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
12226 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
12227 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
12228 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
12229 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
12230 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
12231 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
12232 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
12233 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
12234 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
12235 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
12236 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
12237 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
12238 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
12239 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
12240 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
12241 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
12242 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
12243 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
12244 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
12245 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
12246 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
12247 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
12248 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
12249 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
12250 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
12251 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
12252 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
12253 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
12254 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
12255 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
12256 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
12257 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
12258 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
12259 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
12260 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
12261 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
12262 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
12263 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
12264 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
12265 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
12266 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
12267 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
12268 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
12269 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
12270 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
12271 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
12272 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
12273 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
12274 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
12275 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
12276 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
12277 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
12278 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
12279 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
12280 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
12281 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
12282 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
12283 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
12284 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
12285 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
12286 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
12287 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
12288 .ilen = 512,
12289 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12290 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12291 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12292 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12293 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12294 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12295 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12296 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12297 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12298 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12299 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12300 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12301 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12302 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12303 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12304 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12305 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12306 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12307 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12308 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12309 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12310 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12311 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12312 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12313 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12314 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12315 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12316 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12317 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12318 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12319 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12320 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12321 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12322 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12323 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12324 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12325 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12326 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12327 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12328 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12329 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12330 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12331 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12332 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12333 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12334 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12335 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12336 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12337 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12338 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12339 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12340 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12341 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12342 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12343 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12344 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12345 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12346 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12347 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12348 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12349 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12350 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12351 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12352 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12353 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012354 .also_non_np = 1,
12355 .np = 2,
12356 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012357 },
12358};
12359
12360static struct cipher_testvec cast6_xts_enc_tv_template[] = {
12361 { /* Generated from TF test vectors */
12362 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12363 "\x23\x53\x60\x28\x74\x71\x35\x26"
12364 "\x62\x49\x77\x57\x24\x70\x93\x69"
12365 "\x99\x59\x57\x49\x66\x96\x76\x27"
12366 "\x31\x41\x59\x26\x53\x58\x97\x93"
12367 "\x23\x84\x62\x64\x33\x83\x27\x95"
12368 "\x02\x88\x41\x97\x16\x93\x99\x37"
12369 "\x51\x05\x82\x09\x74\x94\x45\x92",
12370 .klen = 64,
12371 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12372 "\x00\x00\x00\x00\x00\x00\x00\x00",
12373 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12374 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12375 "\x10\x11\x12\x13\x14\x15\x16\x17"
12376 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12377 "\x20\x21\x22\x23\x24\x25\x26\x27"
12378 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12379 "\x30\x31\x32\x33\x34\x35\x36\x37"
12380 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12381 "\x40\x41\x42\x43\x44\x45\x46\x47"
12382 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12383 "\x50\x51\x52\x53\x54\x55\x56\x57"
12384 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12385 "\x60\x61\x62\x63\x64\x65\x66\x67"
12386 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12387 "\x70\x71\x72\x73\x74\x75\x76\x77"
12388 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12389 "\x80\x81\x82\x83\x84\x85\x86\x87"
12390 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12391 "\x90\x91\x92\x93\x94\x95\x96\x97"
12392 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12393 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12394 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12395 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12396 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12397 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12398 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12399 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12400 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12401 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12402 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12403 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12404 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12405 "\x00\x01\x02\x03\x04\x05\x06\x07"
12406 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12407 "\x10\x11\x12\x13\x14\x15\x16\x17"
12408 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12409 "\x20\x21\x22\x23\x24\x25\x26\x27"
12410 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12411 "\x30\x31\x32\x33\x34\x35\x36\x37"
12412 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12413 "\x40\x41\x42\x43\x44\x45\x46\x47"
12414 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12415 "\x50\x51\x52\x53\x54\x55\x56\x57"
12416 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12417 "\x60\x61\x62\x63\x64\x65\x66\x67"
12418 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12419 "\x70\x71\x72\x73\x74\x75\x76\x77"
12420 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12421 "\x80\x81\x82\x83\x84\x85\x86\x87"
12422 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12423 "\x90\x91\x92\x93\x94\x95\x96\x97"
12424 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12425 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12426 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12427 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12428 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12429 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12430 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12431 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12432 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12433 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12434 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12435 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12436 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12437 .ilen = 512,
12438 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
12439 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
12440 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
12441 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
12442 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
12443 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
12444 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
12445 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
12446 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
12447 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
12448 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
12449 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
12450 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
12451 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
12452 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
12453 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
12454 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
12455 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
12456 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
12457 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
12458 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
12459 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
12460 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
12461 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
12462 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
12463 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
12464 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
12465 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
12466 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
12467 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
12468 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
12469 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
12470 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
12471 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
12472 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
12473 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
12474 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
12475 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
12476 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
12477 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
12478 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
12479 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
12480 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
12481 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
12482 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
12483 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
12484 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
12485 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
12486 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
12487 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
12488 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
12489 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
12490 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
12491 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
12492 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
12493 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
12494 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
12495 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
12496 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
12497 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
12498 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
12499 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
12500 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
12501 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
12502 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012503 .also_non_np = 1,
12504 .np = 2,
12505 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012506 },
12507};
12508
12509static struct cipher_testvec cast6_xts_dec_tv_template[] = {
12510 { /* Generated from TF test vectors */
12511 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12512 "\x23\x53\x60\x28\x74\x71\x35\x26"
12513 "\x62\x49\x77\x57\x24\x70\x93\x69"
12514 "\x99\x59\x57\x49\x66\x96\x76\x27"
12515 "\x31\x41\x59\x26\x53\x58\x97\x93"
12516 "\x23\x84\x62\x64\x33\x83\x27\x95"
12517 "\x02\x88\x41\x97\x16\x93\x99\x37"
12518 "\x51\x05\x82\x09\x74\x94\x45\x92",
12519 .klen = 64,
12520 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12521 "\x00\x00\x00\x00\x00\x00\x00\x00",
12522 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
12523 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
12524 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
12525 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
12526 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
12527 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
12528 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
12529 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
12530 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
12531 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
12532 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
12533 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
12534 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
12535 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
12536 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
12537 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
12538 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
12539 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
12540 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
12541 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
12542 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
12543 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
12544 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
12545 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
12546 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
12547 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
12548 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
12549 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
12550 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
12551 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
12552 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
12553 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
12554 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
12555 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
12556 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
12557 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
12558 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
12559 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
12560 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
12561 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
12562 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
12563 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
12564 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
12565 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
12566 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
12567 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
12568 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
12569 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
12570 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
12571 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
12572 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
12573 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
12574 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
12575 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
12576 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
12577 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
12578 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
12579 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
12580 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
12581 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
12582 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
12583 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
12584 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
12585 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
12586 .ilen = 512,
12587 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12588 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12589 "\x10\x11\x12\x13\x14\x15\x16\x17"
12590 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12591 "\x20\x21\x22\x23\x24\x25\x26\x27"
12592 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12593 "\x30\x31\x32\x33\x34\x35\x36\x37"
12594 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12595 "\x40\x41\x42\x43\x44\x45\x46\x47"
12596 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12597 "\x50\x51\x52\x53\x54\x55\x56\x57"
12598 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12599 "\x60\x61\x62\x63\x64\x65\x66\x67"
12600 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12601 "\x70\x71\x72\x73\x74\x75\x76\x77"
12602 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12603 "\x80\x81\x82\x83\x84\x85\x86\x87"
12604 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12605 "\x90\x91\x92\x93\x94\x95\x96\x97"
12606 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12607 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12608 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12609 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12610 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12611 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12612 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12613 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12614 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12615 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12616 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12617 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12618 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12619 "\x00\x01\x02\x03\x04\x05\x06\x07"
12620 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12621 "\x10\x11\x12\x13\x14\x15\x16\x17"
12622 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12623 "\x20\x21\x22\x23\x24\x25\x26\x27"
12624 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12625 "\x30\x31\x32\x33\x34\x35\x36\x37"
12626 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12627 "\x40\x41\x42\x43\x44\x45\x46\x47"
12628 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12629 "\x50\x51\x52\x53\x54\x55\x56\x57"
12630 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12631 "\x60\x61\x62\x63\x64\x65\x66\x67"
12632 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12633 "\x70\x71\x72\x73\x74\x75\x76\x77"
12634 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12635 "\x80\x81\x82\x83\x84\x85\x86\x87"
12636 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12637 "\x90\x91\x92\x93\x94\x95\x96\x97"
12638 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12639 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12640 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12641 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12642 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12643 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12644 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12645 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12646 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12647 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12648 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12649 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12650 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12651 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012652 .also_non_np = 1,
12653 .np = 2,
12654 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012655 },
12656};
12657
12658
12659/*
12660 * AES test vectors.
12661 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012662#define AES_ENC_TEST_VECTORS 4
12663#define AES_DEC_TEST_VECTORS 4
12664#define AES_CBC_ENC_TEST_VECTORS 5
12665#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantae46e9a42012-07-03 19:16:54 +030012666#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
12667#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
12668#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +080012669#define AES_LRW_ENC_TEST_VECTORS 8
12670#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100012671#define AES_XTS_ENC_TEST_VECTORS 5
12672#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012673#define AES_CTR_ENC_TEST_VECTORS 5
12674#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100012675#define AES_OFB_ENC_TEST_VECTORS 1
12676#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080012677#define AES_CTR_3686_ENC_TEST_VECTORS 7
12678#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080012679#define AES_GCM_ENC_TEST_VECTORS 9
12680#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -040012681#define AES_GCM_4106_ENC_TEST_VECTORS 7
12682#define AES_GCM_4106_DEC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +080012683#define AES_CCM_ENC_TEST_VECTORS 7
12684#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080012685#define AES_CCM_4309_ENC_TEST_VECTORS 7
12686#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080012687
12688static struct cipher_testvec aes_enc_tv_template[] = {
12689 { /* From FIPS-197 */
12690 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12691 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12692 .klen = 16,
12693 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12694 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12695 .ilen = 16,
12696 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
12697 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
12698 .rlen = 16,
12699 }, {
12700 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12701 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12702 "\x10\x11\x12\x13\x14\x15\x16\x17",
12703 .klen = 24,
12704 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12705 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12706 .ilen = 16,
12707 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
12708 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
12709 .rlen = 16,
12710 }, {
12711 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12712 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12713 "\x10\x11\x12\x13\x14\x15\x16\x17"
12714 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12715 .klen = 32,
12716 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12717 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12718 .ilen = 16,
12719 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
12720 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
12721 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012722 }, { /* Generated with Crypto++ */
12723 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
12724 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
12725 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
12726 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
12727 .klen = 32,
12728 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
12729 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
12730 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
12731 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
12732 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
12733 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
12734 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
12735 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
12736 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
12737 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
12738 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
12739 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
12740 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
12741 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
12742 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
12743 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
12744 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
12745 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
12746 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
12747 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
12748 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
12749 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
12750 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
12751 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
12752 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
12753 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
12754 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
12755 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
12756 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
12757 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
12758 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
12759 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
12760 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
12761 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
12762 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
12763 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
12764 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
12765 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
12766 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
12767 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
12768 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
12769 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
12770 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
12771 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
12772 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
12773 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
12774 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
12775 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
12776 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
12777 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
12778 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
12779 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
12780 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
12781 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
12782 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
12783 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
12784 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
12785 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
12786 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
12787 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
12788 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
12789 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
12790 .ilen = 496,
12791 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
12792 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
12793 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
12794 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
12795 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
12796 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
12797 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
12798 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
12799 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
12800 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
12801 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
12802 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
12803 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
12804 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
12805 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
12806 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
12807 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
12808 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
12809 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
12810 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
12811 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
12812 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
12813 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
12814 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
12815 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
12816 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
12817 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
12818 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
12819 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
12820 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
12821 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
12822 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
12823 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
12824 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
12825 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
12826 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
12827 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
12828 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
12829 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
12830 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
12831 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
12832 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
12833 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
12834 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
12835 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
12836 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
12837 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
12838 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
12839 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
12840 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
12841 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
12842 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
12843 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
12844 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
12845 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
12846 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
12847 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
12848 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
12849 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
12850 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
12851 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
12852 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
12853 .rlen = 496,
12854 .also_non_np = 1,
12855 .np = 2,
12856 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012857 },
12858};
12859
12860static struct cipher_testvec aes_dec_tv_template[] = {
12861 { /* From FIPS-197 */
12862 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12863 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12864 .klen = 16,
12865 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
12866 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
12867 .ilen = 16,
12868 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
12869 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12870 .rlen = 16,
12871 }, {
12872 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12873 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12874 "\x10\x11\x12\x13\x14\x15\x16\x17",
12875 .klen = 24,
12876 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
12877 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
12878 .ilen = 16,
12879 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
12880 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12881 .rlen = 16,
12882 }, {
12883 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12884 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12885 "\x10\x11\x12\x13\x14\x15\x16\x17"
12886 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12887 .klen = 32,
12888 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
12889 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
12890 .ilen = 16,
12891 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
12892 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12893 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012894 }, { /* Generated with Crypto++ */
12895 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
12896 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
12897 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
12898 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
12899 .klen = 32,
12900 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
12901 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
12902 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
12903 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
12904 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
12905 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
12906 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
12907 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
12908 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
12909 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
12910 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
12911 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
12912 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
12913 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
12914 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
12915 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
12916 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
12917 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
12918 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
12919 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
12920 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
12921 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
12922 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
12923 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
12924 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
12925 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
12926 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
12927 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
12928 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
12929 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
12930 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
12931 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
12932 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
12933 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
12934 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
12935 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
12936 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
12937 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
12938 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
12939 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
12940 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
12941 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
12942 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
12943 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
12944 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
12945 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
12946 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
12947 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
12948 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
12949 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
12950 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
12951 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
12952 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
12953 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
12954 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
12955 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
12956 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
12957 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
12958 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
12959 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
12960 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
12961 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
12962 .ilen = 496,
12963 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
12964 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
12965 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
12966 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
12967 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
12968 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
12969 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
12970 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
12971 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
12972 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
12973 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
12974 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
12975 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
12976 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
12977 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
12978 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
12979 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
12980 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
12981 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
12982 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
12983 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
12984 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
12985 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
12986 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
12987 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
12988 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
12989 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
12990 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
12991 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
12992 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
12993 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
12994 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
12995 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
12996 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
12997 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
12998 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
12999 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13000 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13001 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13002 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13003 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13004 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13005 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13006 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13007 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13008 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13009 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13010 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13011 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13012 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13013 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13014 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13015 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13016 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13017 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13018 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13019 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13020 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13021 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13022 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13023 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13024 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13025 .rlen = 496,
13026 .also_non_np = 1,
13027 .np = 2,
13028 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013029 },
13030};
13031
13032static struct cipher_testvec aes_cbc_enc_tv_template[] = {
13033 { /* From RFC 3602 */
13034 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13035 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13036 .klen = 16,
13037 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13038 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13039 .input = "Single block msg",
13040 .ilen = 16,
13041 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13042 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
13043 .rlen = 16,
13044 }, {
13045 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13046 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13047 .klen = 16,
13048 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13049 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13050 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13051 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13052 "\x10\x11\x12\x13\x14\x15\x16\x17"
13053 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13054 .ilen = 32,
13055 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13056 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13057 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13058 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
13059 .rlen = 32,
13060 }, { /* From NIST SP800-38A */
13061 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13062 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13063 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13064 .klen = 24,
13065 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13066 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13067 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13068 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13069 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13070 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13071 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13072 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13073 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13074 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13075 .ilen = 64,
13076 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13077 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13078 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13079 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13080 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13081 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13082 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13083 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
13084 .rlen = 64,
13085 }, {
13086 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13087 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13088 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13089 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13090 .klen = 32,
13091 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13092 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13093 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13094 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13095 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13096 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13097 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13098 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13099 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13100 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13101 .ilen = 64,
13102 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13103 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13104 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13105 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13106 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13107 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13108 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13109 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
13110 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013111 }, { /* Generated with Crypto++ */
13112 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
13113 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
13114 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
13115 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
13116 .klen = 32,
13117 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
13118 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
13119 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13120 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13121 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
13122 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
13123 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
13124 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
13125 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
13126 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
13127 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
13128 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
13129 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
13130 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
13131 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
13132 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
13133 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
13134 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
13135 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
13136 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
13137 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
13138 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
13139 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
13140 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
13141 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
13142 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
13143 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
13144 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
13145 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
13146 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
13147 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
13148 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
13149 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
13150 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
13151 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
13152 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
13153 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
13154 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
13155 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13156 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13157 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13158 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13159 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13160 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13161 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13162 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13163 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13164 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13165 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13166 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13167 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13168 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13169 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13170 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13171 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13172 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13173 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13174 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13175 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13176 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13177 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13178 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13179 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13180 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13181 .ilen = 496,
13182 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
13183 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
13184 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
13185 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
13186 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
13187 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
13188 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
13189 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
13190 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
13191 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
13192 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
13193 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
13194 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
13195 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
13196 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
13197 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
13198 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
13199 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
13200 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
13201 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
13202 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
13203 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
13204 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
13205 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
13206 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
13207 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
13208 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
13209 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
13210 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
13211 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
13212 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
13213 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
13214 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
13215 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
13216 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
13217 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
13218 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
13219 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
13220 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
13221 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
13222 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
13223 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
13224 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
13225 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
13226 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
13227 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
13228 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
13229 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
13230 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
13231 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
13232 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
13233 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
13234 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
13235 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
13236 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
13237 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
13238 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
13239 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
13240 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
13241 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
13242 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
13243 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
13244 .rlen = 496,
13245 .also_non_np = 1,
13246 .np = 2,
13247 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013248 },
13249};
13250
13251static struct cipher_testvec aes_cbc_dec_tv_template[] = {
13252 { /* From RFC 3602 */
13253 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13254 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13255 .klen = 16,
13256 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13257 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13258 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13259 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
13260 .ilen = 16,
13261 .result = "Single block msg",
13262 .rlen = 16,
13263 }, {
13264 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13265 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13266 .klen = 16,
13267 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13268 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13269 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13270 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13271 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13272 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
13273 .ilen = 32,
13274 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13275 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13276 "\x10\x11\x12\x13\x14\x15\x16\x17"
13277 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13278 .rlen = 32,
13279 }, { /* From NIST SP800-38A */
13280 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13281 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13282 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13283 .klen = 24,
13284 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13285 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13286 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13287 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13288 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13289 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13290 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13291 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13292 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13293 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
13294 .ilen = 64,
13295 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13296 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13297 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13298 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13299 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13300 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13301 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13302 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13303 .rlen = 64,
13304 }, {
13305 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13306 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13307 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13308 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13309 .klen = 32,
13310 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13311 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13312 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13313 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13314 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13315 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13316 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13317 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13318 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13319 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
13320 .ilen = 64,
13321 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13322 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13323 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13324 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13325 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13326 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13327 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13328 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13329 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013330 }, { /* Generated with Crypto++ */
13331 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
13332 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
13333 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
13334 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
13335 .klen = 32,
13336 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
13337 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
13338 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
13339 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
13340 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
13341 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
13342 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
13343 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
13344 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
13345 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
13346 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
13347 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
13348 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
13349 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
13350 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
13351 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
13352 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
13353 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
13354 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
13355 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
13356 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
13357 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
13358 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
13359 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
13360 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
13361 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
13362 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
13363 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
13364 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
13365 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
13366 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
13367 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
13368 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
13369 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
13370 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
13371 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
13372 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
13373 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
13374 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
13375 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
13376 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
13377 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
13378 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
13379 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
13380 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
13381 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
13382 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
13383 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
13384 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
13385 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
13386 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
13387 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
13388 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
13389 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
13390 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
13391 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
13392 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
13393 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
13394 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
13395 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
13396 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
13397 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
13398 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
13399 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
13400 .ilen = 496,
13401 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13402 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13403 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
13404 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
13405 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
13406 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
13407 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
13408 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
13409 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
13410 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
13411 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
13412 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
13413 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
13414 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
13415 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
13416 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
13417 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
13418 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
13419 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
13420 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
13421 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
13422 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
13423 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
13424 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
13425 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
13426 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
13427 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
13428 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
13429 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
13430 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
13431 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
13432 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
13433 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
13434 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
13435 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
13436 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
13437 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13438 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13439 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13440 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13441 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13442 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13443 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13444 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13445 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13446 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13447 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13448 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13449 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13450 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13451 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13452 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13453 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13454 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13455 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13456 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13457 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13458 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13459 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13460 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13461 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13462 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13463 .rlen = 496,
13464 .also_non_np = 1,
13465 .np = 2,
13466 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013467 },
13468};
13469
Horia Geantae46e9a42012-07-03 19:16:54 +030013470static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
13471 { /* RFC 3602 Case 1 */
13472#ifdef __LITTLE_ENDIAN
13473 .key = "\x08\x00" /* rta length */
13474 "\x01\x00" /* rta type */
13475#else
13476 .key = "\x00\x08" /* rta length */
13477 "\x00\x01" /* rta type */
13478#endif
13479 "\x00\x00\x00\x10" /* enc key length */
13480 "\x00\x00\x00\x00\x00\x00\x00\x00"
13481 "\x00\x00\x00\x00\x00\x00\x00\x00"
13482 "\x00\x00\x00\x00"
13483 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13484 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13485 .klen = 8 + 20 + 16,
13486 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13487 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13488 .input = "Single block msg",
13489 .ilen = 16,
13490 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13491 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
13492 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
13493 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
13494 "\x03\x71\xa2\x06",
13495 .rlen = 16 + 20,
13496 }, { /* RFC 3602 Case 2 */
13497#ifdef __LITTLE_ENDIAN
13498 .key = "\x08\x00" /* rta length */
13499 "\x01\x00" /* rta type */
13500#else
13501 .key = "\x00\x08" /* rta length */
13502 "\x00\x01" /* rta type */
13503#endif
13504 "\x00\x00\x00\x10" /* enc key length */
13505 "\x20\x21\x22\x23\x24\x25\x26\x27"
13506 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13507 "\x30\x31\x32\x33"
13508 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13509 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13510 .klen = 8 + 20 + 16,
13511 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13512 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13513 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13514 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13515 "\x10\x11\x12\x13\x14\x15\x16\x17"
13516 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13517 .ilen = 32,
13518 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13519 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13520 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13521 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
13522 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
13523 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
13524 "\x65\x39\xf8\xde",
13525 .rlen = 32 + 20,
13526 }, { /* RFC 3602 Case 3 */
13527#ifdef __LITTLE_ENDIAN
13528 .key = "\x08\x00" /* rta length */
13529 "\x01\x00" /* rta type */
13530#else
13531 .key = "\x00\x08" /* rta length */
13532 "\x00\x01" /* rta type */
13533#endif
13534 "\x00\x00\x00\x10" /* enc key length */
13535 "\x11\x22\x33\x44\x55\x66\x77\x88"
13536 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13537 "\x22\x33\x44\x55"
13538 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
13539 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
13540 .klen = 8 + 20 + 16,
13541 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
13542 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
13543 .input = "This is a 48-byte message (exactly 3 AES blocks)",
13544 .ilen = 48,
13545 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
13546 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
13547 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
13548 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
13549 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
13550 "\x85\x79\x69\x5d\x83\xba\x26\x84"
13551 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
13552 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
13553 "\x8d\x62\xf2\x1e",
13554 .rlen = 48 + 20,
13555 }, { /* RFC 3602 Case 4 */
13556#ifdef __LITTLE_ENDIAN
13557 .key = "\x08\x00" /* rta length */
13558 "\x01\x00" /* rta type */
13559#else
13560 .key = "\x00\x08" /* rta length */
13561 "\x00\x01" /* rta type */
13562#endif
13563 "\x00\x00\x00\x10" /* enc key length */
13564 "\x11\x22\x33\x44\x55\x66\x77\x88"
13565 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13566 "\x22\x33\x44\x55"
13567 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
13568 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
13569 .klen = 8 + 20 + 16,
13570 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
13571 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
13572 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13573 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13574 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13575 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13576 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13577 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13578 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13579 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
13580 .ilen = 64,
13581 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
13582 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
13583 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
13584 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
13585 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
13586 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
13587 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
13588 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
13589 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
13590 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
13591 "\x1d\xbe\xc6\xe9",
13592 .rlen = 64 + 20,
13593 }, { /* RFC 3602 Case 5 */
13594#ifdef __LITTLE_ENDIAN
13595 .key = "\x08\x00" /* rta length */
13596 "\x01\x00" /* rta type */
13597#else
13598 .key = "\x00\x08" /* rta length */
13599 "\x00\x01" /* rta type */
13600#endif
13601 "\x00\x00\x00\x10" /* enc key length */
13602 "\x11\x22\x33\x44\x55\x66\x77\x88"
13603 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13604 "\x22\x33\x44\x55"
13605 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
13606 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
13607 .klen = 8 + 20 + 16,
13608 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
13609 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
13610 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
13611 .alen = 8,
13612 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
13613 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
13614 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13615 "\x10\x11\x12\x13\x14\x15\x16\x17"
13616 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13617 "\x20\x21\x22\x23\x24\x25\x26\x27"
13618 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13619 "\x30\x31\x32\x33\x34\x35\x36\x37"
13620 "\x01\x02\x03\x04\x05\x06\x07\x08"
13621 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
13622 .ilen = 80,
13623 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
13624 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
13625 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
13626 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
13627 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
13628 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
13629 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
13630 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
13631 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
13632 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
13633 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
13634 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
13635 "\x85\xe1\x59\xf7",
13636 .rlen = 80 + 20,
13637 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
13638#ifdef __LITTLE_ENDIAN
13639 .key = "\x08\x00" /* rta length */
13640 "\x01\x00" /* rta type */
13641#else
13642 .key = "\x00\x08" /* rta length */
13643 "\x00\x01" /* rta type */
13644#endif
13645 "\x00\x00\x00\x18" /* enc key length */
13646 "\x11\x22\x33\x44\x55\x66\x77\x88"
13647 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13648 "\x22\x33\x44\x55"
13649 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13650 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13651 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13652 .klen = 8 + 20 + 24,
13653 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13655 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13656 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13657 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13658 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13659 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13660 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13661 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13662 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13663 .ilen = 64,
13664 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13665 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13666 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13667 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13668 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13669 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13670 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13671 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
13672 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
13673 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
13674 "\x47\x4c\xfc\x36",
13675 .rlen = 64 + 20,
13676 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
13677#ifdef __LITTLE_ENDIAN
13678 .key = "\x08\x00" /* rta length */
13679 "\x01\x00" /* rta type */
13680#else
13681 .key = "\x00\x08" /* rta length */
13682 "\x00\x01" /* rta type */
13683#endif
13684 "\x00\x00\x00\x20" /* enc key length */
13685 "\x11\x22\x33\x44\x55\x66\x77\x88"
13686 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13687 "\x22\x33\x44\x55"
13688 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13689 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13690 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13691 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13692 .klen = 8 + 20 + 32,
13693 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13694 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13695 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13696 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13697 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13698 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13699 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13700 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13701 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13702 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13703 .ilen = 64,
13704 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13705 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13706 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13707 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13708 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13709 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13710 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13711 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
13712 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
13713 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
13714 "\x51\xee\xd6\x4e",
13715 .rlen = 64 + 20,
13716 },
13717};
13718
13719static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
13720 { /* RFC 3602 Case 1 */
13721#ifdef __LITTLE_ENDIAN
13722 .key = "\x08\x00" /* rta length */
13723 "\x01\x00" /* rta type */
13724#else
13725 .key = "\x00\x08" /* rta length */
13726 "\x00\x01" /* rta type */
13727#endif
13728 "\x00\x00\x00\x10" /* enc key length */
13729 "\x00\x00\x00\x00\x00\x00\x00\x00"
13730 "\x00\x00\x00\x00\x00\x00\x00\x00"
13731 "\x00\x00\x00\x00\x00\x00\x00\x00"
13732 "\x00\x00\x00\x00\x00\x00\x00\x00"
13733 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13734 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13735 .klen = 8 + 32 + 16,
13736 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13737 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13738 .input = "Single block msg",
13739 .ilen = 16,
13740 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13741 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
13742 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
13743 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
13744 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
13745 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
13746 .rlen = 16 + 32,
13747 }, { /* RFC 3602 Case 2 */
13748#ifdef __LITTLE_ENDIAN
13749 .key = "\x08\x00" /* rta length */
13750 "\x01\x00" /* rta type */
13751#else
13752 .key = "\x00\x08" /* rta length */
13753 "\x00\x01" /* rta type */
13754#endif
13755 "\x00\x00\x00\x10" /* enc key length */
13756 "\x20\x21\x22\x23\x24\x25\x26\x27"
13757 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13758 "\x30\x31\x32\x33\x34\x35\x36\x37"
13759 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13760 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13761 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13762 .klen = 8 + 32 + 16,
13763 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13764 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13765 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13766 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13767 "\x10\x11\x12\x13\x14\x15\x16\x17"
13768 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13769 .ilen = 32,
13770 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13771 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13772 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13773 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
13774 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
13775 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
13776 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
13777 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
13778 .rlen = 32 + 32,
13779 }, { /* RFC 3602 Case 3 */
13780#ifdef __LITTLE_ENDIAN
13781 .key = "\x08\x00" /* rta length */
13782 "\x01\x00" /* rta type */
13783#else
13784 .key = "\x00\x08" /* rta length */
13785 "\x00\x01" /* rta type */
13786#endif
13787 "\x00\x00\x00\x10" /* enc key length */
13788 "\x11\x22\x33\x44\x55\x66\x77\x88"
13789 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13790 "\x22\x33\x44\x55\x66\x77\x88\x99"
13791 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
13792 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
13793 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
13794 .klen = 8 + 32 + 16,
13795 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
13796 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
13797 .input = "This is a 48-byte message (exactly 3 AES blocks)",
13798 .ilen = 48,
13799 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
13800 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
13801 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
13802 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
13803 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
13804 "\x85\x79\x69\x5d\x83\xba\x26\x84"
13805 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
13806 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
13807 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
13808 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
13809 .rlen = 48 + 32,
13810 }, { /* RFC 3602 Case 4 */
13811#ifdef __LITTLE_ENDIAN
13812 .key = "\x08\x00" /* rta length */
13813 "\x01\x00" /* rta type */
13814#else
13815 .key = "\x00\x08" /* rta length */
13816 "\x00\x01" /* rta type */
13817#endif
13818 "\x00\x00\x00\x10" /* enc key length */
13819 "\x11\x22\x33\x44\x55\x66\x77\x88"
13820 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13821 "\x22\x33\x44\x55\x66\x77\x88\x99"
13822 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
13823 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
13824 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
13825 .klen = 8 + 32 + 16,
13826 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
13827 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
13828 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13829 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13830 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13831 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13832 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13833 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13834 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13835 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
13836 .ilen = 64,
13837 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
13838 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
13839 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
13840 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
13841 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
13842 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
13843 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
13844 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
13845 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
13846 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
13847 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
13848 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
13849 .rlen = 64 + 32,
13850 }, { /* RFC 3602 Case 5 */
13851#ifdef __LITTLE_ENDIAN
13852 .key = "\x08\x00" /* rta length */
13853 "\x01\x00" /* rta type */
13854#else
13855 .key = "\x00\x08" /* rta length */
13856 "\x00\x01" /* rta type */
13857#endif
13858 "\x00\x00\x00\x10" /* enc key length */
13859 "\x11\x22\x33\x44\x55\x66\x77\x88"
13860 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13861 "\x22\x33\x44\x55\x66\x77\x88\x99"
13862 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
13863 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
13864 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
13865 .klen = 8 + 32 + 16,
13866 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
13867 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
13868 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
13869 .alen = 8,
13870 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
13871 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
13872 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13873 "\x10\x11\x12\x13\x14\x15\x16\x17"
13874 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13875 "\x20\x21\x22\x23\x24\x25\x26\x27"
13876 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13877 "\x30\x31\x32\x33\x34\x35\x36\x37"
13878 "\x01\x02\x03\x04\x05\x06\x07\x08"
13879 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
13880 .ilen = 80,
13881 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
13882 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
13883 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
13884 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
13885 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
13886 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
13887 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
13888 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
13889 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
13890 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
13891 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
13892 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
13893 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
13894 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
13895 .rlen = 80 + 32,
13896 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
13897#ifdef __LITTLE_ENDIAN
13898 .key = "\x08\x00" /* rta length */
13899 "\x01\x00" /* rta type */
13900#else
13901 .key = "\x00\x08" /* rta length */
13902 "\x00\x01" /* rta type */
13903#endif
13904 "\x00\x00\x00\x18" /* enc key length */
13905 "\x11\x22\x33\x44\x55\x66\x77\x88"
13906 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13907 "\x22\x33\x44\x55\x66\x77\x88\x99"
13908 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
13909 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13910 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13911 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13912 .klen = 8 + 32 + 24,
13913 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13914 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13915 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13916 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13917 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13918 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13919 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13920 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13921 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13922 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13923 .ilen = 64,
13924 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13925 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13926 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13927 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13928 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13929 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13930 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13931 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
13932 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
13933 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
13934 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
13935 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
13936 .rlen = 64 + 32,
13937 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
13938#ifdef __LITTLE_ENDIAN
13939 .key = "\x08\x00" /* rta length */
13940 "\x01\x00" /* rta type */
13941#else
13942 .key = "\x00\x08" /* rta length */
13943 "\x00\x01" /* rta type */
13944#endif
13945 "\x00\x00\x00\x20" /* enc key length */
13946 "\x11\x22\x33\x44\x55\x66\x77\x88"
13947 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13948 "\x22\x33\x44\x55\x66\x77\x88\x99"
13949 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
13950 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13951 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13952 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13953 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13954 .klen = 8 + 32 + 32,
13955 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13956 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13957 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13958 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13959 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13960 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13961 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13962 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13963 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13964 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13965 .ilen = 64,
13966 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13967 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13968 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13969 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13970 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13971 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13972 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13973 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
13974 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
13975 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
13976 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
13977 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
13978 .rlen = 64 + 32,
13979 },
13980};
13981
13982static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
13983 { /* RFC 3602 Case 1 */
13984#ifdef __LITTLE_ENDIAN
13985 .key = "\x08\x00" /* rta length */
13986 "\x01\x00" /* rta type */
13987#else
13988 .key = "\x00\x08" /* rta length */
13989 "\x00\x01" /* rta type */
13990#endif
13991 "\x00\x00\x00\x10" /* enc key length */
13992 "\x00\x00\x00\x00\x00\x00\x00\x00"
13993 "\x00\x00\x00\x00\x00\x00\x00\x00"
13994 "\x00\x00\x00\x00\x00\x00\x00\x00"
13995 "\x00\x00\x00\x00\x00\x00\x00\x00"
13996 "\x00\x00\x00\x00\x00\x00\x00\x00"
13997 "\x00\x00\x00\x00\x00\x00\x00\x00"
13998 "\x00\x00\x00\x00\x00\x00\x00\x00"
13999 "\x00\x00\x00\x00\x00\x00\x00\x00"
14000 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14001 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14002 .klen = 8 + 64 + 16,
14003 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14004 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14005 .input = "Single block msg",
14006 .ilen = 16,
14007 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14008 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14009 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
14010 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
14011 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
14012 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
14013 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
14014 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
14015 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
14016 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
14017 .rlen = 16 + 64,
14018 }, { /* RFC 3602 Case 2 */
14019#ifdef __LITTLE_ENDIAN
14020 .key = "\x08\x00" /* rta length */
14021 "\x01\x00" /* rta type */
14022#else
14023 .key = "\x00\x08" /* rta length */
14024 "\x00\x01" /* rta type */
14025#endif
14026 "\x00\x00\x00\x10" /* enc key length */
14027 "\x20\x21\x22\x23\x24\x25\x26\x27"
14028 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14029 "\x30\x31\x32\x33\x34\x35\x36\x37"
14030 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14031 "\x40\x41\x42\x43\x44\x45\x46\x47"
14032 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14033 "\x50\x51\x52\x53\x54\x55\x56\x57"
14034 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14035 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14036 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14037 .klen = 8 + 64 + 16,
14038 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14039 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14040 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14041 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14042 "\x10\x11\x12\x13\x14\x15\x16\x17"
14043 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14044 .ilen = 32,
14045 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14046 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14047 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14048 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14049 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
14050 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
14051 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
14052 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
14053 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
14054 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
14055 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
14056 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
14057 .rlen = 32 + 64,
14058 }, { /* RFC 3602 Case 3 */
14059#ifdef __LITTLE_ENDIAN
14060 .key = "\x08\x00" /* rta length */
14061 "\x01\x00" /* rta type */
14062#else
14063 .key = "\x00\x08" /* rta length */
14064 "\x00\x01" /* rta type */
14065#endif
14066 "\x00\x00\x00\x10" /* enc key length */
14067 "\x11\x22\x33\x44\x55\x66\x77\x88"
14068 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14069 "\x22\x33\x44\x55\x66\x77\x88\x99"
14070 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14071 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14072 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14073 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14074 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14075 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14076 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14077 .klen = 8 + 64 + 16,
14078 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14079 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14080 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14081 .ilen = 48,
14082 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14083 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14084 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14085 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14086 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14087 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14088 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
14089 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
14090 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
14091 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
14092 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
14093 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
14094 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
14095 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
14096 .rlen = 48 + 64,
14097 }, { /* RFC 3602 Case 4 */
14098#ifdef __LITTLE_ENDIAN
14099 .key = "\x08\x00" /* rta length */
14100 "\x01\x00" /* rta type */
14101#else
14102 .key = "\x00\x08" /* rta length */
14103 "\x00\x01" /* rta type */
14104#endif
14105 "\x00\x00\x00\x10" /* enc key length */
14106 "\x11\x22\x33\x44\x55\x66\x77\x88"
14107 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14108 "\x22\x33\x44\x55\x66\x77\x88\x99"
14109 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14110 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14111 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14112 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14113 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14114 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14115 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14116 .klen = 8 + 64 + 16,
14117 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14118 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14119 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14120 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14121 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14122 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14123 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14124 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14125 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14126 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14127 .ilen = 64,
14128 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14129 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14130 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14131 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14132 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14133 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14134 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14135 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14136 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
14137 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
14138 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
14139 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
14140 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
14141 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
14142 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
14143 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
14144 .rlen = 64 + 64,
14145 }, { /* RFC 3602 Case 5 */
14146#ifdef __LITTLE_ENDIAN
14147 .key = "\x08\x00" /* rta length */
14148 "\x01\x00" /* rta type */
14149#else
14150 .key = "\x00\x08" /* rta length */
14151 "\x00\x01" /* rta type */
14152#endif
14153 "\x00\x00\x00\x10" /* enc key length */
14154 "\x11\x22\x33\x44\x55\x66\x77\x88"
14155 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14156 "\x22\x33\x44\x55\x66\x77\x88\x99"
14157 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14158 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14159 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14160 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14161 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14162 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14163 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14164 .klen = 8 + 64 + 16,
14165 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14166 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14167 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14168 .alen = 8,
14169 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14170 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14171 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14172 "\x10\x11\x12\x13\x14\x15\x16\x17"
14173 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14174 "\x20\x21\x22\x23\x24\x25\x26\x27"
14175 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14176 "\x30\x31\x32\x33\x34\x35\x36\x37"
14177 "\x01\x02\x03\x04\x05\x06\x07\x08"
14178 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14179 .ilen = 80,
14180 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14181 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14182 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14183 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14184 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14185 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
14186 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
14187 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
14188 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
14189 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
14190 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
14191 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
14192 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
14193 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
14194 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
14195 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
14196 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
14197 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
14198 .rlen = 80 + 64,
14199 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
14200#ifdef __LITTLE_ENDIAN
14201 .key = "\x08\x00" /* rta length */
14202 "\x01\x00" /* rta type */
14203#else
14204 .key = "\x00\x08" /* rta length */
14205 "\x00\x01" /* rta type */
14206#endif
14207 "\x00\x00\x00\x18" /* enc key length */
14208 "\x11\x22\x33\x44\x55\x66\x77\x88"
14209 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14210 "\x22\x33\x44\x55\x66\x77\x88\x99"
14211 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14212 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14213 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14214 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14215 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14216 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14217 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14218 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14219 .klen = 8 + 64 + 24,
14220 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14221 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14222 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14223 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14224 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14225 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14226 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14227 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14228 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14229 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14230 .ilen = 64,
14231 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14232 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14233 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14234 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14235 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14236 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14237 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14238 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
14239 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
14240 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
14241 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
14242 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
14243 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
14244 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
14245 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
14246 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
14247 .rlen = 64 + 64,
14248 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
14249#ifdef __LITTLE_ENDIAN
14250 .key = "\x08\x00" /* rta length */
14251 "\x01\x00" /* rta type */
14252#else
14253 .key = "\x00\x08" /* rta length */
14254 "\x00\x01" /* rta type */
14255#endif
14256 "\x00\x00\x00\x20" /* enc key length */
14257 "\x11\x22\x33\x44\x55\x66\x77\x88"
14258 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14259 "\x22\x33\x44\x55\x66\x77\x88\x99"
14260 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14261 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14262 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14263 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14264 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14265 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14266 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14267 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14268 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14269 .klen = 8 + 64 + 32,
14270 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14271 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14272 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14273 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14274 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14275 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14276 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14277 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14278 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14279 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14280 .ilen = 64,
14281 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14282 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14283 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14284 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14285 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14286 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14287 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14288 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
14289 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
14290 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
14291 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
14292 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
14293 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
14294 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
14295 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
14296 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
14297 .rlen = 64 + 64,
14298 },
14299};
14300
Herbert Xuda7f0332008-07-31 17:08:25 +080014301static struct cipher_testvec aes_lrw_enc_tv_template[] = {
14302 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
14303 { /* LRW-32-AES 1 */
14304 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
14305 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
14306 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
14307 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
14308 .klen = 32,
14309 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14310 "\x00\x00\x00\x00\x00\x00\x00\x01",
14311 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14312 "\x38\x39\x41\x42\x43\x44\x45\x46",
14313 .ilen = 16,
14314 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
14315 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
14316 .rlen = 16,
14317 }, { /* LRW-32-AES 2 */
14318 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
14319 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
14320 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
14321 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
14322 .klen = 32,
14323 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14324 "\x00\x00\x00\x00\x00\x00\x00\x02",
14325 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14326 "\x38\x39\x41\x42\x43\x44\x45\x46",
14327 .ilen = 16,
14328 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
14329 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
14330 .rlen = 16,
14331 }, { /* LRW-32-AES 3 */
14332 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
14333 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
14334 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
14335 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
14336 .klen = 32,
14337 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14338 "\x00\x00\x00\x02\x00\x00\x00\x00",
14339 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14340 "\x38\x39\x41\x42\x43\x44\x45\x46",
14341 .ilen = 16,
14342 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
14343 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
14344 .rlen = 16,
14345 }, { /* LRW-32-AES 4 */
14346 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
14347 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
14348 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
14349 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
14350 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
14351 .klen = 40,
14352 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14353 "\x00\x00\x00\x00\x00\x00\x00\x01",
14354 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14355 "\x38\x39\x41\x42\x43\x44\x45\x46",
14356 .ilen = 16,
14357 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
14358 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
14359 .rlen = 16,
14360 }, { /* LRW-32-AES 5 */
14361 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
14362 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
14363 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
14364 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
14365 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
14366 .klen = 40,
14367 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14368 "\x00\x00\x00\x02\x00\x00\x00\x00",
14369 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14370 "\x38\x39\x41\x42\x43\x44\x45\x46",
14371 .ilen = 16,
14372 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
14373 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
14374 .rlen = 16,
14375 }, { /* LRW-32-AES 6 */
14376 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14377 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14378 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14379 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14380 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14381 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14382 .klen = 48,
14383 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14384 "\x00\x00\x00\x00\x00\x00\x00\x01",
14385 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14386 "\x38\x39\x41\x42\x43\x44\x45\x46",
14387 .ilen = 16,
14388 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
14389 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
14390 .rlen = 16,
14391 }, { /* LRW-32-AES 7 */
14392 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
14393 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
14394 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
14395 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
14396 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
14397 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
14398 .klen = 48,
14399 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14400 "\x00\x00\x00\x02\x00\x00\x00\x00",
14401 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14402 "\x38\x39\x41\x42\x43\x44\x45\x46",
14403 .ilen = 16,
14404 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
14405 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
14406 .rlen = 16,
14407 }, {
14408/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
14409 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14410 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14411 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14412 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14413 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14414 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14415 .klen = 48,
14416 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14417 "\x00\x00\x00\x00\x00\x00\x00\x01",
14418 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
14419 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
14420 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
14421 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
14422 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
14423 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
14424 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
14425 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
14426 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
14427 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
14428 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
14429 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
14430 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
14431 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
14432 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
14433 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
14434 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
14435 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
14436 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
14437 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
14438 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
14439 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
14440 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
14441 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
14442 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
14443 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
14444 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
14445 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
14446 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
14447 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
14448 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
14449 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
14450 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
14451 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
14452 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
14453 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
14454 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
14455 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
14456 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
14457 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
14458 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
14459 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
14460 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
14461 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
14462 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
14463 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
14464 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
14465 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
14466 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
14467 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
14468 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
14469 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
14470 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
14471 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
14472 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
14473 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
14474 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
14475 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
14476 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
14477 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
14478 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
14479 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
14480 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
14481 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
14482 .ilen = 512,
14483 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
14484 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
14485 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
14486 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
14487 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
14488 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
14489 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
14490 "\xe8\x58\x46\x97\x39\x51\x07\xde"
14491 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
14492 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
14493 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
14494 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
14495 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
14496 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
14497 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
14498 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
14499 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
14500 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
14501 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
14502 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
14503 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
14504 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
14505 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
14506 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
14507 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
14508 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
14509 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
14510 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
14511 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
14512 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
14513 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
14514 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
14515 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
14516 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
14517 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
14518 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
14519 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
14520 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
14521 "\xb8\x79\x78\x97\x94\xff\x72\x13"
14522 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
14523 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
14524 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
14525 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
14526 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
14527 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
14528 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
14529 "\x1e\x86\x53\x11\x53\x94\x00\xee"
14530 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
14531 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
14532 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
14533 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
14534 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
14535 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
14536 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
14537 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
14538 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
14539 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
14540 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
14541 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
14542 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
14543 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
14544 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
14545 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
14546 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
14547 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014548 .also_non_np = 1,
14549 .np = 2,
14550 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014551 }
14552};
14553
14554static struct cipher_testvec aes_lrw_dec_tv_template[] = {
14555 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
14556 /* same as enc vectors with input and result reversed */
14557 { /* LRW-32-AES 1 */
14558 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
14559 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
14560 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
14561 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
14562 .klen = 32,
14563 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14564 "\x00\x00\x00\x00\x00\x00\x00\x01",
14565 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
14566 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
14567 .ilen = 16,
14568 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14569 "\x38\x39\x41\x42\x43\x44\x45\x46",
14570 .rlen = 16,
14571 }, { /* LRW-32-AES 2 */
14572 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
14573 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
14574 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
14575 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
14576 .klen = 32,
14577 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14578 "\x00\x00\x00\x00\x00\x00\x00\x02",
14579 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
14580 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
14581 .ilen = 16,
14582 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14583 "\x38\x39\x41\x42\x43\x44\x45\x46",
14584 .rlen = 16,
14585 }, { /* LRW-32-AES 3 */
14586 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
14587 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
14588 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
14589 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
14590 .klen = 32,
14591 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14592 "\x00\x00\x00\x02\x00\x00\x00\x00",
14593 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
14594 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
14595 .ilen = 16,
14596 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14597 "\x38\x39\x41\x42\x43\x44\x45\x46",
14598 .rlen = 16,
14599 }, { /* LRW-32-AES 4 */
14600 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
14601 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
14602 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
14603 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
14604 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
14605 .klen = 40,
14606 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14607 "\x00\x00\x00\x00\x00\x00\x00\x01",
14608 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
14609 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
14610 .ilen = 16,
14611 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14612 "\x38\x39\x41\x42\x43\x44\x45\x46",
14613 .rlen = 16,
14614 }, { /* LRW-32-AES 5 */
14615 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
14616 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
14617 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
14618 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
14619 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
14620 .klen = 40,
14621 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14622 "\x00\x00\x00\x02\x00\x00\x00\x00",
14623 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
14624 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
14625 .ilen = 16,
14626 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14627 "\x38\x39\x41\x42\x43\x44\x45\x46",
14628 .rlen = 16,
14629 }, { /* LRW-32-AES 6 */
14630 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14631 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14632 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14633 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14634 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14635 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14636 .klen = 48,
14637 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14638 "\x00\x00\x00\x00\x00\x00\x00\x01",
14639 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
14640 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
14641 .ilen = 16,
14642 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14643 "\x38\x39\x41\x42\x43\x44\x45\x46",
14644 .rlen = 16,
14645 }, { /* LRW-32-AES 7 */
14646 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
14647 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
14648 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
14649 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
14650 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
14651 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
14652 .klen = 48,
14653 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14654 "\x00\x00\x00\x02\x00\x00\x00\x00",
14655 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
14656 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
14657 .ilen = 16,
14658 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14659 "\x38\x39\x41\x42\x43\x44\x45\x46",
14660 .rlen = 16,
14661 }, {
14662/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
14663 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14664 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14665 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14666 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14667 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14668 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14669 .klen = 48,
14670 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14671 "\x00\x00\x00\x00\x00\x00\x00\x01",
14672 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
14673 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
14674 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
14675 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
14676 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
14677 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
14678 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
14679 "\xe8\x58\x46\x97\x39\x51\x07\xde"
14680 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
14681 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
14682 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
14683 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
14684 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
14685 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
14686 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
14687 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
14688 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
14689 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
14690 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
14691 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
14692 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
14693 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
14694 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
14695 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
14696 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
14697 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
14698 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
14699 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
14700 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
14701 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
14702 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
14703 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
14704 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
14705 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
14706 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
14707 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
14708 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
14709 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
14710 "\xb8\x79\x78\x97\x94\xff\x72\x13"
14711 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
14712 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
14713 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
14714 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
14715 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
14716 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
14717 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
14718 "\x1e\x86\x53\x11\x53\x94\x00\xee"
14719 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
14720 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
14721 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
14722 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
14723 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
14724 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
14725 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
14726 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
14727 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
14728 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
14729 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
14730 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
14731 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
14732 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
14733 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
14734 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
14735 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
14736 .ilen = 512,
14737 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
14738 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
14739 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
14740 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
14741 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
14742 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
14743 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
14744 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
14745 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
14746 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
14747 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
14748 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
14749 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
14750 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
14751 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
14752 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
14753 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
14754 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
14755 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
14756 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
14757 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
14758 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
14759 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
14760 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
14761 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
14762 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
14763 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
14764 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
14765 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
14766 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
14767 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
14768 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
14769 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
14770 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
14771 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
14772 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
14773 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
14774 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
14775 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
14776 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
14777 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
14778 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
14779 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
14780 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
14781 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
14782 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
14783 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
14784 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
14785 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
14786 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
14787 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
14788 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
14789 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
14790 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
14791 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
14792 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
14793 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
14794 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
14795 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
14796 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
14797 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
14798 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
14799 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
14800 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
14801 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014802 .also_non_np = 1,
14803 .np = 2,
14804 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014805 }
14806};
14807
14808static struct cipher_testvec aes_xts_enc_tv_template[] = {
14809 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
14810 { /* XTS-AES 1 */
14811 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
14812 "\x00\x00\x00\x00\x00\x00\x00\x00"
14813 "\x00\x00\x00\x00\x00\x00\x00\x00"
14814 "\x00\x00\x00\x00\x00\x00\x00\x00",
14815 .klen = 32,
14816 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14817 "\x00\x00\x00\x00\x00\x00\x00\x00",
14818 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
14819 "\x00\x00\x00\x00\x00\x00\x00\x00"
14820 "\x00\x00\x00\x00\x00\x00\x00\x00"
14821 "\x00\x00\x00\x00\x00\x00\x00\x00",
14822 .ilen = 32,
14823 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
14824 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
14825 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
14826 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
14827 .rlen = 32,
14828 }, { /* XTS-AES 2 */
14829 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
14830 "\x11\x11\x11\x11\x11\x11\x11\x11"
14831 "\x22\x22\x22\x22\x22\x22\x22\x22"
14832 "\x22\x22\x22\x22\x22\x22\x22\x22",
14833 .klen = 32,
14834 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
14835 "\x00\x00\x00\x00\x00\x00\x00\x00",
14836 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
14837 "\x44\x44\x44\x44\x44\x44\x44\x44"
14838 "\x44\x44\x44\x44\x44\x44\x44\x44"
14839 "\x44\x44\x44\x44\x44\x44\x44\x44",
14840 .ilen = 32,
14841 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
14842 "\x39\x33\x40\x38\xac\xef\x83\x8b"
14843 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
14844 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
14845 .rlen = 32,
14846 }, { /* XTS-AES 3 */
14847 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
14848 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
14849 "\x22\x22\x22\x22\x22\x22\x22\x22"
14850 "\x22\x22\x22\x22\x22\x22\x22\x22",
14851 .klen = 32,
14852 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
14853 "\x00\x00\x00\x00\x00\x00\x00\x00",
14854 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
14855 "\x44\x44\x44\x44\x44\x44\x44\x44"
14856 "\x44\x44\x44\x44\x44\x44\x44\x44"
14857 "\x44\x44\x44\x44\x44\x44\x44\x44",
14858 .ilen = 32,
14859 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
14860 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
14861 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
14862 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
14863 .rlen = 32,
14864 }, { /* XTS-AES 4 */
14865 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
14866 "\x23\x53\x60\x28\x74\x71\x35\x26"
14867 "\x31\x41\x59\x26\x53\x58\x97\x93"
14868 "\x23\x84\x62\x64\x33\x83\x27\x95",
14869 .klen = 32,
14870 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14871 "\x00\x00\x00\x00\x00\x00\x00\x00",
14872 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14873 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14874 "\x10\x11\x12\x13\x14\x15\x16\x17"
14875 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14876 "\x20\x21\x22\x23\x24\x25\x26\x27"
14877 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14878 "\x30\x31\x32\x33\x34\x35\x36\x37"
14879 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14880 "\x40\x41\x42\x43\x44\x45\x46\x47"
14881 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14882 "\x50\x51\x52\x53\x54\x55\x56\x57"
14883 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14884 "\x60\x61\x62\x63\x64\x65\x66\x67"
14885 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14886 "\x70\x71\x72\x73\x74\x75\x76\x77"
14887 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14888 "\x80\x81\x82\x83\x84\x85\x86\x87"
14889 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14890 "\x90\x91\x92\x93\x94\x95\x96\x97"
14891 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14892 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14893 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14894 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14895 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14896 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14897 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14898 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14899 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14900 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14901 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14902 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14903 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14904 "\x00\x01\x02\x03\x04\x05\x06\x07"
14905 "\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\x21\x22\x23\x24\x25\x26\x27"
14909 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14910 "\x30\x31\x32\x33\x34\x35\x36\x37"
14911 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14912 "\x40\x41\x42\x43\x44\x45\x46\x47"
14913 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14914 "\x50\x51\x52\x53\x54\x55\x56\x57"
14915 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14916 "\x60\x61\x62\x63\x64\x65\x66\x67"
14917 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14918 "\x70\x71\x72\x73\x74\x75\x76\x77"
14919 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14920 "\x80\x81\x82\x83\x84\x85\x86\x87"
14921 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14922 "\x90\x91\x92\x93\x94\x95\x96\x97"
14923 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14924 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14925 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14926 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14927 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14928 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14929 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14930 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14931 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14932 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14933 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14934 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14935 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14936 .ilen = 512,
14937 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
14938 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
14939 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
14940 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
14941 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
14942 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
14943 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
14944 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
14945 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
14946 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
14947 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
14948 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
14949 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
14950 "\x22\x97\x61\x46\xae\x20\xce\x84"
14951 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
14952 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
14953 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
14954 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
14955 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
14956 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
14957 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
14958 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
14959 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
14960 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
14961 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
14962 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
14963 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
14964 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
14965 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
14966 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
14967 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
14968 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
14969 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
14970 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
14971 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
14972 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
14973 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
14974 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
14975 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
14976 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
14977 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
14978 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
14979 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
14980 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
14981 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
14982 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
14983 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
14984 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
14985 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
14986 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
14987 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
14988 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
14989 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
14990 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
14991 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
14992 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
14993 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
14994 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
14995 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
14996 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
14997 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
14998 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
14999 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
15000 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
15001 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015002 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
15003 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15004 "\x23\x53\x60\x28\x74\x71\x35\x26"
15005 "\x62\x49\x77\x57\x24\x70\x93\x69"
15006 "\x99\x59\x57\x49\x66\x96\x76\x27"
15007 "\x31\x41\x59\x26\x53\x58\x97\x93"
15008 "\x23\x84\x62\x64\x33\x83\x27\x95"
15009 "\x02\x88\x41\x97\x16\x93\x99\x37"
15010 "\x51\x05\x82\x09\x74\x94\x45\x92",
15011 .klen = 64,
15012 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
15013 "\x00\x00\x00\x00\x00\x00\x00\x00",
15014 "\x00\x00\x00\x00\x00\x00\x00\x00",
15015 "\x00\x00\x00\x00\x00\x00\x00\x00",
15016 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15017 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15018 "\x10\x11\x12\x13\x14\x15\x16\x17"
15019 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15020 "\x20\x21\x22\x23\x24\x25\x26\x27"
15021 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15022 "\x30\x31\x32\x33\x34\x35\x36\x37"
15023 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15024 "\x40\x41\x42\x43\x44\x45\x46\x47"
15025 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15026 "\x50\x51\x52\x53\x54\x55\x56\x57"
15027 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15028 "\x60\x61\x62\x63\x64\x65\x66\x67"
15029 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15030 "\x70\x71\x72\x73\x74\x75\x76\x77"
15031 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15032 "\x80\x81\x82\x83\x84\x85\x86\x87"
15033 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15034 "\x90\x91\x92\x93\x94\x95\x96\x97"
15035 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15036 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15037 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15038 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15039 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15040 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15041 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15042 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15043 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15044 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15045 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15046 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15047 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15048 "\x00\x01\x02\x03\x04\x05\x06\x07"
15049 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15050 "\x10\x11\x12\x13\x14\x15\x16\x17"
15051 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15052 "\x20\x21\x22\x23\x24\x25\x26\x27"
15053 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15054 "\x30\x31\x32\x33\x34\x35\x36\x37"
15055 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15056 "\x40\x41\x42\x43\x44\x45\x46\x47"
15057 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15058 "\x50\x51\x52\x53\x54\x55\x56\x57"
15059 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15060 "\x60\x61\x62\x63\x64\x65\x66\x67"
15061 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15062 "\x70\x71\x72\x73\x74\x75\x76\x77"
15063 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15064 "\x80\x81\x82\x83\x84\x85\x86\x87"
15065 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15066 "\x90\x91\x92\x93\x94\x95\x96\x97"
15067 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15068 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15069 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15070 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15071 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15072 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15073 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15074 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15075 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15076 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15077 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15078 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15079 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15080 .ilen = 512,
15081 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
15082 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
15083 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
15084 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
15085 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
15086 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
15087 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
15088 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
15089 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
15090 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
15091 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
15092 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
15093 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
15094 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
15095 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
15096 "\x00\x02\x08\x87\x89\x14\x29\xca"
15097 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
15098 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
15099 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
15100 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
15101 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
15102 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
15103 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
15104 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
15105 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
15106 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
15107 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
15108 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
15109 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
15110 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
15111 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
15112 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
15113 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
15114 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
15115 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
15116 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
15117 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
15118 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
15119 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
15120 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
15121 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
15122 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
15123 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
15124 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
15125 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
15126 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
15127 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
15128 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
15129 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
15130 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
15131 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
15132 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
15133 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
15134 "\x94\x30\x54\xff\x84\x01\x14\x93"
15135 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
15136 "\x53\x76\x44\x1a\x77\xed\x43\x85"
15137 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
15138 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
15139 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
15140 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
15141 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
15142 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
15143 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
15144 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
15145 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015146 .also_non_np = 1,
15147 .np = 2,
15148 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015149 }
15150};
15151
15152static struct cipher_testvec aes_xts_dec_tv_template[] = {
15153 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
15154 { /* XTS-AES 1 */
15155 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
15156 "\x00\x00\x00\x00\x00\x00\x00\x00"
15157 "\x00\x00\x00\x00\x00\x00\x00\x00"
15158 "\x00\x00\x00\x00\x00\x00\x00\x00",
15159 .klen = 32,
15160 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15161 "\x00\x00\x00\x00\x00\x00\x00\x00",
15162 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
15163 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
15164 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
15165 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
15166 .ilen = 32,
15167 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15168 "\x00\x00\x00\x00\x00\x00\x00\x00"
15169 "\x00\x00\x00\x00\x00\x00\x00\x00"
15170 "\x00\x00\x00\x00\x00\x00\x00\x00",
15171 .rlen = 32,
15172 }, { /* XTS-AES 2 */
15173 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
15174 "\x11\x11\x11\x11\x11\x11\x11\x11"
15175 "\x22\x22\x22\x22\x22\x22\x22\x22"
15176 "\x22\x22\x22\x22\x22\x22\x22\x22",
15177 .klen = 32,
15178 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15179 "\x00\x00\x00\x00\x00\x00\x00\x00",
15180 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
15181 "\x39\x33\x40\x38\xac\xef\x83\x8b"
15182 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
15183 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
15184 .ilen = 32,
15185 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
15186 "\x44\x44\x44\x44\x44\x44\x44\x44"
15187 "\x44\x44\x44\x44\x44\x44\x44\x44"
15188 "\x44\x44\x44\x44\x44\x44\x44\x44",
15189 .rlen = 32,
15190 }, { /* XTS-AES 3 */
15191 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
15192 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
15193 "\x22\x22\x22\x22\x22\x22\x22\x22"
15194 "\x22\x22\x22\x22\x22\x22\x22\x22",
15195 .klen = 32,
15196 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15197 "\x00\x00\x00\x00\x00\x00\x00\x00",
15198 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
15199 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
15200 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
15201 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
15202 .ilen = 32,
15203 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
15204 "\x44\x44\x44\x44\x44\x44\x44\x44"
15205 "\x44\x44\x44\x44\x44\x44\x44\x44"
15206 "\x44\x44\x44\x44\x44\x44\x44\x44",
15207 .rlen = 32,
15208 }, { /* XTS-AES 4 */
15209 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15210 "\x23\x53\x60\x28\x74\x71\x35\x26"
15211 "\x31\x41\x59\x26\x53\x58\x97\x93"
15212 "\x23\x84\x62\x64\x33\x83\x27\x95",
15213 .klen = 32,
15214 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15215 "\x00\x00\x00\x00\x00\x00\x00\x00",
15216 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
15217 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
15218 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
15219 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
15220 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
15221 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
15222 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
15223 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
15224 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
15225 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
15226 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
15227 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
15228 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
15229 "\x22\x97\x61\x46\xae\x20\xce\x84"
15230 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
15231 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
15232 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
15233 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
15234 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
15235 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
15236 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
15237 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
15238 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
15239 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
15240 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
15241 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
15242 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
15243 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
15244 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
15245 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
15246 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
15247 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
15248 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
15249 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
15250 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
15251 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
15252 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
15253 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
15254 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
15255 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
15256 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
15257 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
15258 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
15259 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
15260 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
15261 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
15262 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
15263 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
15264 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
15265 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
15266 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
15267 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
15268 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
15269 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
15270 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
15271 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
15272 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
15273 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
15274 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
15275 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
15276 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
15277 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
15278 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
15279 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
15280 .ilen = 512,
15281 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15282 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15283 "\x10\x11\x12\x13\x14\x15\x16\x17"
15284 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15285 "\x20\x21\x22\x23\x24\x25\x26\x27"
15286 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15287 "\x30\x31\x32\x33\x34\x35\x36\x37"
15288 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15289 "\x40\x41\x42\x43\x44\x45\x46\x47"
15290 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15291 "\x50\x51\x52\x53\x54\x55\x56\x57"
15292 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15293 "\x60\x61\x62\x63\x64\x65\x66\x67"
15294 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15295 "\x70\x71\x72\x73\x74\x75\x76\x77"
15296 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15297 "\x80\x81\x82\x83\x84\x85\x86\x87"
15298 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15299 "\x90\x91\x92\x93\x94\x95\x96\x97"
15300 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15301 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15302 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15303 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15304 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15305 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15306 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15307 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15308 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15309 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15310 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15311 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15312 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15313 "\x00\x01\x02\x03\x04\x05\x06\x07"
15314 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15315 "\x10\x11\x12\x13\x14\x15\x16\x17"
15316 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15317 "\x20\x21\x22\x23\x24\x25\x26\x27"
15318 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15319 "\x30\x31\x32\x33\x34\x35\x36\x37"
15320 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15321 "\x40\x41\x42\x43\x44\x45\x46\x47"
15322 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15323 "\x50\x51\x52\x53\x54\x55\x56\x57"
15324 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15325 "\x60\x61\x62\x63\x64\x65\x66\x67"
15326 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15327 "\x70\x71\x72\x73\x74\x75\x76\x77"
15328 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15329 "\x80\x81\x82\x83\x84\x85\x86\x87"
15330 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15331 "\x90\x91\x92\x93\x94\x95\x96\x97"
15332 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15333 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15334 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15335 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15336 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15337 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15338 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15339 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15340 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15341 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15342 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15343 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15344 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15345 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015346 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
15347 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15348 "\x23\x53\x60\x28\x74\x71\x35\x26"
15349 "\x62\x49\x77\x57\x24\x70\x93\x69"
15350 "\x99\x59\x57\x49\x66\x96\x76\x27"
15351 "\x31\x41\x59\x26\x53\x58\x97\x93"
15352 "\x23\x84\x62\x64\x33\x83\x27\x95"
15353 "\x02\x88\x41\x97\x16\x93\x99\x37"
15354 "\x51\x05\x82\x09\x74\x94\x45\x92",
15355 .klen = 64,
15356 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
15357 "\x00\x00\x00\x00\x00\x00\x00\x00",
15358 "\x00\x00\x00\x00\x00\x00\x00\x00",
15359 "\x00\x00\x00\x00\x00\x00\x00\x00",
15360 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
15361 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
15362 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
15363 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
15364 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
15365 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
15366 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
15367 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
15368 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
15369 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
15370 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
15371 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
15372 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
15373 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
15374 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
15375 "\x00\x02\x08\x87\x89\x14\x29\xca"
15376 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
15377 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
15378 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
15379 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
15380 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
15381 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
15382 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
15383 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
15384 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
15385 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
15386 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
15387 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
15388 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
15389 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
15390 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
15391 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
15392 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
15393 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
15394 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
15395 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
15396 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
15397 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
15398 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
15399 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
15400 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
15401 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
15402 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
15403 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
15404 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
15405 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
15406 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
15407 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
15408 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
15409 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
15410 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
15411 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
15412 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
15413 "\x94\x30\x54\xff\x84\x01\x14\x93"
15414 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
15415 "\x53\x76\x44\x1a\x77\xed\x43\x85"
15416 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
15417 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
15418 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
15419 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
15420 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
15421 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
15422 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
15423 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
15424 .ilen = 512,
15425 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15426 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15427 "\x10\x11\x12\x13\x14\x15\x16\x17"
15428 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15429 "\x20\x21\x22\x23\x24\x25\x26\x27"
15430 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15431 "\x30\x31\x32\x33\x34\x35\x36\x37"
15432 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15433 "\x40\x41\x42\x43\x44\x45\x46\x47"
15434 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15435 "\x50\x51\x52\x53\x54\x55\x56\x57"
15436 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15437 "\x60\x61\x62\x63\x64\x65\x66\x67"
15438 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15439 "\x70\x71\x72\x73\x74\x75\x76\x77"
15440 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15441 "\x80\x81\x82\x83\x84\x85\x86\x87"
15442 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15443 "\x90\x91\x92\x93\x94\x95\x96\x97"
15444 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15445 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15446 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15447 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15448 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15449 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15450 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15451 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15452 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15453 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15454 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15455 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15456 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15457 "\x00\x01\x02\x03\x04\x05\x06\x07"
15458 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15459 "\x10\x11\x12\x13\x14\x15\x16\x17"
15460 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15461 "\x20\x21\x22\x23\x24\x25\x26\x27"
15462 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15463 "\x30\x31\x32\x33\x34\x35\x36\x37"
15464 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15465 "\x40\x41\x42\x43\x44\x45\x46\x47"
15466 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15467 "\x50\x51\x52\x53\x54\x55\x56\x57"
15468 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15469 "\x60\x61\x62\x63\x64\x65\x66\x67"
15470 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15471 "\x70\x71\x72\x73\x74\x75\x76\x77"
15472 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15473 "\x80\x81\x82\x83\x84\x85\x86\x87"
15474 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15475 "\x90\x91\x92\x93\x94\x95\x96\x97"
15476 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15477 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15478 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15479 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15480 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15481 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15482 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15483 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15484 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15485 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15486 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15487 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15488 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15489 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015490 .also_non_np = 1,
15491 .np = 2,
15492 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015493 }
15494};
15495
15496
15497static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080015498 { /* From NIST Special Publication 800-38A, Appendix F.5 */
15499 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
15500 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
15501 .klen = 16,
15502 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15503 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15504 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15505 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15506 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15507 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15508 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15509 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15510 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15511 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15512 .ilen = 64,
15513 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
15514 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
15515 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
15516 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
15517 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
15518 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
15519 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
15520 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
15521 .rlen = 64,
15522 }, {
15523 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15524 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15525 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15526 .klen = 24,
15527 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15528 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15529 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15530 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15531 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15532 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15533 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15534 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15535 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15536 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15537 .ilen = 64,
15538 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
15539 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
15540 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
15541 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
15542 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
15543 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
15544 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
15545 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
15546 .rlen = 64,
15547 }, {
15548 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15549 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15550 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15551 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15552 .klen = 32,
15553 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15554 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15555 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15556 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15557 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15558 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15559 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15560 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15561 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15562 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15563 .ilen = 64,
15564 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
15565 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
15566 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
15567 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
15568 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
15569 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
15570 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
15571 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
15572 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030015573 }, { /* Generated with Crypto++ */
15574 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15575 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15576 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15577 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15578 .klen = 32,
15579 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
15580 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
15581 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15582 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15583 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15584 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15585 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15586 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15587 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15588 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15589 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15590 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15591 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15592 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15593 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15594 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15595 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15596 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15597 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15598 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15599 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15600 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15601 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15602 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15603 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15604 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15605 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15606 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15607 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15608 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15609 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15610 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15611 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15612 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15613 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15614 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15615 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15616 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15617 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15618 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15619 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15620 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15621 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15622 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15623 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15624 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15625 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15626 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15627 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15628 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15629 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15630 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15631 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15632 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15633 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15634 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15635 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15636 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15637 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15638 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15639 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15640 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15641 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15642 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
15643 .ilen = 496,
15644 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
15645 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
15646 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
15647 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
15648 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
15649 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
15650 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
15651 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
15652 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
15653 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
15654 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
15655 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
15656 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
15657 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
15658 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
15659 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
15660 "\x34\x4B\x31\x69\x84\x66\x96\x44"
15661 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
15662 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
15663 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
15664 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
15665 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
15666 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
15667 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
15668 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
15669 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
15670 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
15671 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
15672 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
15673 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
15674 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
15675 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
15676 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
15677 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
15678 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
15679 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
15680 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
15681 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
15682 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
15683 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
15684 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
15685 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
15686 "\x85\x99\x22\xE8\x91\x38\x70\x83"
15687 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
15688 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
15689 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
15690 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
15691 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
15692 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
15693 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
15694 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
15695 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
15696 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
15697 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
15698 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
15699 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
15700 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
15701 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
15702 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
15703 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
15704 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
15705 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
15706 .rlen = 496,
15707 .also_non_np = 1,
15708 .np = 2,
15709 .tap = { 496 - 16, 16 },
15710 }, { /* Generated with Crypto++ */
15711 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15712 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15713 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15714 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15715 .klen = 32,
15716 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
15717 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
15718 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15719 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15720 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15721 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15722 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15723 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15724 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15725 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15726 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15727 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15728 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15729 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15730 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15731 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15732 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15733 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15734 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15735 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15736 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15737 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15738 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15739 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15740 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15741 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15742 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15743 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15744 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15745 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15746 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15747 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15748 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15749 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15750 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15751 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15752 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15753 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15754 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15755 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15756 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15757 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15758 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15759 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15760 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15761 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15762 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15763 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15764 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15765 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15766 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15767 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15768 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15769 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15770 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15771 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15772 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15773 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15774 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15775 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15776 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15777 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15778 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15779 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
15780 "\x7B\xE4\x4D",
15781 .ilen = 499,
15782 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
15783 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
15784 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
15785 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
15786 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
15787 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
15788 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
15789 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
15790 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
15791 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
15792 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
15793 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
15794 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
15795 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
15796 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
15797 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
15798 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
15799 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
15800 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
15801 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
15802 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
15803 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
15804 "\x45\x18\x18\x74\x19\xAD\x71\x01"
15805 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
15806 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
15807 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
15808 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
15809 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
15810 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
15811 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
15812 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
15813 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
15814 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
15815 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
15816 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
15817 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
15818 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
15819 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
15820 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
15821 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
15822 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
15823 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
15824 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
15825 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
15826 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
15827 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
15828 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
15829 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
15830 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
15831 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
15832 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
15833 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
15834 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
15835 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
15836 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
15837 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
15838 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
15839 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
15840 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
15841 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
15842 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
15843 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
15844 "\xFB\xF2\x3F",
15845 .rlen = 499,
15846 .also_non_np = 1,
15847 .np = 2,
15848 .tap = { 499 - 16, 16 },
15849 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080015850};
15851
15852static struct cipher_testvec aes_ctr_dec_tv_template[] = {
15853 { /* From NIST Special Publication 800-38A, Appendix F.5 */
15854 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
15855 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
15856 .klen = 16,
15857 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15858 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15859 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
15860 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
15861 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
15862 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
15863 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
15864 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
15865 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
15866 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
15867 .ilen = 64,
15868 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15869 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15870 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15871 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15872 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15873 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15874 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15875 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15876 .rlen = 64,
15877 }, {
15878 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15879 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15880 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15881 .klen = 24,
15882 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15883 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15884 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
15885 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
15886 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
15887 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
15888 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
15889 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
15890 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
15891 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
15892 .ilen = 64,
15893 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15894 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15895 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15896 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15897 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15898 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15899 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15900 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15901 .rlen = 64,
15902 }, {
15903 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15904 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15905 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15906 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15907 .klen = 32,
15908 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15909 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15910 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
15911 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
15912 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
15913 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
15914 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
15915 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
15916 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
15917 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
15918 .ilen = 64,
15919 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15920 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15921 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15922 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15923 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15924 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15925 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15926 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15927 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030015928 }, { /* Generated with Crypto++ */
15929 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15930 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15931 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15932 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15933 .klen = 32,
15934 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
15935 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
15936 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
15937 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
15938 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
15939 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
15940 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
15941 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
15942 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
15943 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
15944 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
15945 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
15946 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
15947 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
15948 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
15949 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
15950 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
15951 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
15952 "\x34\x4B\x31\x69\x84\x66\x96\x44"
15953 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
15954 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
15955 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
15956 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
15957 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
15958 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
15959 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
15960 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
15961 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
15962 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
15963 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
15964 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
15965 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
15966 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
15967 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
15968 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
15969 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
15970 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
15971 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
15972 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
15973 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
15974 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
15975 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
15976 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
15977 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
15978 "\x85\x99\x22\xE8\x91\x38\x70\x83"
15979 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
15980 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
15981 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
15982 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
15983 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
15984 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
15985 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
15986 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
15987 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
15988 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
15989 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
15990 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
15991 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
15992 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
15993 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
15994 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
15995 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
15996 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
15997 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
15998 .ilen = 496,
15999 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
16000 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
16001 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
16002 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
16003 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
16004 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
16005 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
16006 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
16007 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
16008 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
16009 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
16010 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
16011 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
16012 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
16013 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
16014 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
16015 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
16016 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
16017 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
16018 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
16019 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
16020 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
16021 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
16022 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
16023 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
16024 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
16025 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
16026 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
16027 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
16028 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
16029 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
16030 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
16031 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
16032 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
16033 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
16034 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
16035 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
16036 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
16037 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
16038 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
16039 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
16040 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
16041 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
16042 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
16043 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
16044 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
16045 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
16046 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
16047 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
16048 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
16049 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
16050 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
16051 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
16052 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
16053 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
16054 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
16055 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
16056 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
16057 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
16058 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
16059 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
16060 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
16061 .rlen = 496,
16062 .also_non_np = 1,
16063 .np = 2,
16064 .tap = { 496 - 16, 16 },
16065 }, { /* Generated with Crypto++ */
16066 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
16067 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
16068 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
16069 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
16070 .klen = 32,
16071 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
16072 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
16073 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
16074 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
16075 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
16076 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
16077 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
16078 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
16079 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
16080 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
16081 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
16082 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
16083 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
16084 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
16085 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
16086 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
16087 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
16088 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
16089 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
16090 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
16091 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
16092 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
16093 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
16094 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
16095 "\x45\x18\x18\x74\x19\xAD\x71\x01"
16096 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
16097 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
16098 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
16099 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
16100 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
16101 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
16102 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
16103 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
16104 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
16105 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
16106 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
16107 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
16108 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
16109 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
16110 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
16111 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
16112 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
16113 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
16114 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
16115 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
16116 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
16117 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
16118 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
16119 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
16120 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
16121 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
16122 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
16123 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
16124 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
16125 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
16126 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
16127 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
16128 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
16129 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
16130 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
16131 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
16132 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
16133 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
16134 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
16135 "\xFB\xF2\x3F",
16136 .ilen = 499,
16137 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
16138 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
16139 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
16140 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
16141 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
16142 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
16143 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
16144 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
16145 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
16146 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
16147 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
16148 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
16149 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
16150 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
16151 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
16152 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
16153 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
16154 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
16155 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
16156 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
16157 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
16158 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
16159 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
16160 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
16161 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
16162 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
16163 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
16164 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
16165 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
16166 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
16167 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
16168 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
16169 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
16170 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
16171 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
16172 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
16173 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
16174 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
16175 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
16176 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
16177 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
16178 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
16179 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
16180 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
16181 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
16182 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
16183 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
16184 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
16185 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
16186 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
16187 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
16188 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
16189 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
16190 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
16191 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
16192 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
16193 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
16194 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
16195 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
16196 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
16197 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
16198 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
16199 "\x7B\xE4\x4D",
16200 .rlen = 499,
16201 .also_non_np = 1,
16202 .np = 2,
16203 .tap = { 499 - 16, 16 },
16204 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080016205};
16206
16207static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080016208 { /* From RFC 3686 */
16209 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
16210 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
16211 "\x00\x00\x00\x30",
16212 .klen = 20,
16213 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16214 .input = "Single block msg",
16215 .ilen = 16,
16216 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
16217 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
16218 .rlen = 16,
16219 }, {
16220 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
16221 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
16222 "\x00\x6c\xb6\xdb",
16223 .klen = 20,
16224 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
16225 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16226 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16227 "\x10\x11\x12\x13\x14\x15\x16\x17"
16228 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16229 .ilen = 32,
16230 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
16231 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
16232 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
16233 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
16234 .rlen = 32,
16235 }, {
16236 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
16237 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
16238 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
16239 "\x00\x00\x00\x48",
16240 .klen = 28,
16241 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
16242 .input = "Single block msg",
16243 .ilen = 16,
16244 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
16245 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
16246 .rlen = 16,
16247 }, {
16248 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
16249 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
16250 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
16251 "\x00\x96\xb0\x3b",
16252 .klen = 28,
16253 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
16254 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16255 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16256 "\x10\x11\x12\x13\x14\x15\x16\x17"
16257 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16258 .ilen = 32,
16259 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
16260 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
16261 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
16262 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
16263 .rlen = 32,
16264 }, {
16265 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
16266 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
16267 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
16268 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
16269 "\x00\x00\x00\x60",
16270 .klen = 36,
16271 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
16272 .input = "Single block msg",
16273 .ilen = 16,
16274 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
16275 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
16276 .rlen = 16,
16277 }, {
16278 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
16279 "\x07\x96\x36\x58\x79\xef\xf8\x86"
16280 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
16281 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
16282 "\x00\xfa\xac\x24",
16283 .klen = 36,
16284 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
16285 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16286 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16287 "\x10\x11\x12\x13\x14\x15\x16\x17"
16288 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16289 .ilen = 32,
16290 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
16291 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
16292 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
16293 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
16294 .rlen = 32,
16295 }, {
16296 // generated using Crypto++
16297 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
16298 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16299 "\x10\x11\x12\x13\x14\x15\x16\x17"
16300 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16301 "\x00\x00\x00\x00",
16302 .klen = 32 + 4,
16303 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16304 .input =
16305 "\x00\x01\x02\x03\x04\x05\x06\x07"
16306 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16307 "\x10\x11\x12\x13\x14\x15\x16\x17"
16308 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16309 "\x20\x21\x22\x23\x24\x25\x26\x27"
16310 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16311 "\x30\x31\x32\x33\x34\x35\x36\x37"
16312 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16313 "\x40\x41\x42\x43\x44\x45\x46\x47"
16314 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16315 "\x50\x51\x52\x53\x54\x55\x56\x57"
16316 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16317 "\x60\x61\x62\x63\x64\x65\x66\x67"
16318 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16319 "\x70\x71\x72\x73\x74\x75\x76\x77"
16320 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16321 "\x80\x81\x82\x83\x84\x85\x86\x87"
16322 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16323 "\x90\x91\x92\x93\x94\x95\x96\x97"
16324 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16325 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16326 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16327 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16328 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16329 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16330 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16331 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16332 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16333 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16334 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16335 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16336 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16337 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
16338 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
16339 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
16340 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
16341 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
16342 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
16343 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
16344 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
16345 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
16346 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
16347 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
16348 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
16349 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
16350 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
16351 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
16352 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
16353 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
16354 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
16355 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
16356 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
16357 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
16358 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
16359 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
16360 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
16361 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
16362 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
16363 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
16364 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
16365 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
16366 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
16367 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
16368 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
16369 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
16370 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
16371 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
16372 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
16373 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
16374 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
16375 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
16376 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
16377 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
16378 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
16379 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
16380 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
16381 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
16382 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
16383 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
16384 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
16385 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
16386 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
16387 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
16388 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
16389 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
16390 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
16391 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
16392 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
16393 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
16394 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
16395 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
16396 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
16397 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
16398 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
16399 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
16400 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
16401 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
16402 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
16403 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
16404 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
16405 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
16406 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
16407 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
16408 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
16409 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
16410 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
16411 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
16412 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
16413 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
16414 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
16415 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
16416 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
16417 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
16418 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
16419 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
16420 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
16421 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
16422 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
16423 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
16424 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
16425 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
16426 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
16427 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
16428 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
16429 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
16430 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
16431 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
16432 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
16433 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
16434 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
16435 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
16436 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
16437 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
16438 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
16439 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
16440 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
16441 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
16442 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
16443 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
16444 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
16445 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
16446 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
16447 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
16448 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
16449 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
16450 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
16451 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
16452 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
16453 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
16454 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
16455 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
16456 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
16457 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
16458 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
16459 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
16460 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
16461 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
16462 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
16463 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
16464 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
16465 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
16466 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
16467 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
16468 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
16469 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
16470 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
16471 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
16472 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
16473 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
16474 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
16475 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
16476 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
16477 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
16478 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
16479 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
16480 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
16481 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
16482 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
16483 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
16484 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
16485 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
16486 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
16487 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
16488 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
16489 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
16490 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
16491 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
16492 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
16493 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
16494 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
16495 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
16496 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
16497 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
16498 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
16499 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
16500 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
16501 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
16502 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
16503 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
16504 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
16505 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
16506 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
16507 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
16508 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
16509 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
16510 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
16511 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
16512 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
16513 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
16514 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
16515 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
16516 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
16517 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
16518 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
16519 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
16520 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
16521 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
16522 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
16523 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
16524 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
16525 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
16526 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
16527 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
16528 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
16529 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
16530 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
16531 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
16532 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
16533 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
16534 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
16535 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
16536 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
16537 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
16538 "\x38\x47\x56\x65\x74\x83\x92\xa1"
16539 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
16540 "\x28\x37\x46\x55\x64\x73\x82\x91"
16541 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
16542 "\x18\x27\x36\x45\x54\x63\x72\x81"
16543 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
16544 "\x08\x17\x26\x35\x44\x53\x62\x71"
16545 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
16546 "\xf8\x07\x16\x25\x34\x43\x52\x61"
16547 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
16548 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
16549 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
16550 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
16551 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
16552 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
16553 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
16554 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
16555 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
16556 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
16557 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
16558 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
16559 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
16560 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
16561 "\x00\x11\x22\x33\x44\x55\x66\x77"
16562 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
16563 "\x10\x21\x32\x43\x54\x65\x76\x87"
16564 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
16565 "\x20\x31\x42\x53\x64\x75\x86\x97"
16566 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
16567 "\x30\x41\x52\x63\x74\x85\x96\xa7"
16568 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
16569 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
16570 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
16571 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
16572 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
16573 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
16574 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
16575 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
16576 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
16577 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
16578 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
16579 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
16580 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
16581 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
16582 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
16583 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
16584 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
16585 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
16586 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
16587 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
16588 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
16589 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
16590 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
16591 "\xf0\x01\x12\x23\x34\x45\x56\x67"
16592 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
16593 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
16594 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
16595 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
16596 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
16597 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
16598 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
16599 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
16600 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
16601 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
16602 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
16603 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
16604 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
16605 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
16606 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
16607 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
16608 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
16609 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
16610 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
16611 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
16612 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
16613 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
16614 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
16615 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
16616 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
16617 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
16618 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
16619 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
16620 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
16621 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
16622 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
16623 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
16624 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
16625 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
16626 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
16627 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
16628 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
16629 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
16630 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
16631 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
16632 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
16633 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
16634 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
16635 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
16636 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
16637 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
16638 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
16639 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
16640 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
16641 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
16642 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
16643 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
16644 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
16645 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
16646 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
16647 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
16648 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
16649 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
16650 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
16651 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
16652 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
16653 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
16654 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
16655 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
16656 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
16657 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
16658 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
16659 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
16660 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
16661 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
16662 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
16663 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
16664 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
16665 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
16666 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
16667 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
16668 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
16669 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
16670 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
16671 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
16672 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
16673 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
16674 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
16675 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
16676 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
16677 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
16678 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
16679 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
16680 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
16681 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
16682 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
16683 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
16684 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
16685 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
16686 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
16687 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
16688 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
16689 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
16690 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
16691 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
16692 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
16693 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
16694 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
16695 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
16696 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
16697 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
16698 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
16699 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
16700 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
16701 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
16702 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
16703 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
16704 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
16705 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
16706 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
16707 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
16708 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
16709 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
16710 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
16711 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
16712 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
16713 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
16714 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
16715 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
16716 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
16717 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
16718 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
16719 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
16720 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
16721 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
16722 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
16723 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
16724 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
16725 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
16726 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
16727 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
16728 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
16729 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
16730 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
16731 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
16732 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
16733 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
16734 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
16735 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
16736 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
16737 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
16738 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
16739 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
16740 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
16741 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
16742 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
16743 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
16744 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
16745 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
16746 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
16747 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
16748 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
16749 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
16750 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
16751 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
16752 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
16753 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
16754 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
16755 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
16756 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
16757 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
16758 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
16759 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
16760 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
16761 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
16762 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
16763 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
16764 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
16765 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
16766 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
16767 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
16768 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
16769 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
16770 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
16771 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
16772 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
16773 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
16774 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
16775 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
16776 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
16777 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
16778 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
16779 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
16780 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
16781 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
16782 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
16783 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
16784 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
16785 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
16786 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
16787 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
16788 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
16789 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
16790 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
16791 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
16792 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
16793 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
16794 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
16795 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
16796 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
16797 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
16798 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
16799 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
16800 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
16801 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
16802 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
16803 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
16804 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
16805 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
16806 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
16807 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
16808 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
16809 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
16810 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
16811 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
16812 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
16813 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
16814 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
16815 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
16816 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
16817 "\x00\x21\x42\x63",
16818 .ilen = 4100,
16819 .result =
16820 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
16821 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
16822 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
16823 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
16824 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
16825 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
16826 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
16827 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
16828 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
16829 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
16830 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
16831 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
16832 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
16833 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
16834 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
16835 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
16836 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
16837 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
16838 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
16839 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
16840 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
16841 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
16842 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
16843 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
16844 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
16845 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
16846 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
16847 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
16848 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
16849 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
16850 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
16851 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
16852 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
16853 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
16854 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
16855 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
16856 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
16857 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
16858 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
16859 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
16860 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
16861 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
16862 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
16863 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
16864 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
16865 "\x04\x02\xef\xd3\x44\xde\x76\x31"
16866 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
16867 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
16868 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
16869 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
16870 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
16871 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
16872 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
16873 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
16874 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
16875 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
16876 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
16877 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
16878 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
16879 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
16880 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
16881 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
16882 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
16883 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
16884 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
16885 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
16886 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
16887 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
16888 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
16889 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
16890 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
16891 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
16892 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
16893 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
16894 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
16895 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
16896 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
16897 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
16898 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
16899 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
16900 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
16901 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
16902 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
16903 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
16904 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
16905 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
16906 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
16907 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
16908 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
16909 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
16910 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
16911 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
16912 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
16913 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
16914 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
16915 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
16916 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
16917 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
16918 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
16919 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
16920 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
16921 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
16922 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
16923 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
16924 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
16925 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
16926 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
16927 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
16928 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
16929 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
16930 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
16931 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
16932 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
16933 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
16934 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
16935 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
16936 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
16937 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
16938 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
16939 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
16940 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
16941 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
16942 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
16943 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
16944 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
16945 "\x26\x39\x83\x94\xef\x27\xd8\x53"
16946 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
16947 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
16948 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
16949 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
16950 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
16951 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
16952 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
16953 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
16954 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
16955 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
16956 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
16957 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
16958 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
16959 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
16960 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
16961 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
16962 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
16963 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
16964 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
16965 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
16966 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
16967 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
16968 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
16969 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
16970 "\x35\x12\xe3\x36\x28\x27\x36\x58"
16971 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
16972 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
16973 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
16974 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
16975 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
16976 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
16977 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
16978 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
16979 "\x89\xf3\x78\x35\x44\x62\x78\x72"
16980 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
16981 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
16982 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
16983 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
16984 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
16985 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
16986 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
16987 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
16988 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
16989 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
16990 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
16991 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
16992 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
16993 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
16994 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
16995 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
16996 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
16997 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
16998 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
16999 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
17000 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
17001 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
17002 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
17003 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
17004 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
17005 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
17006 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
17007 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
17008 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
17009 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
17010 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
17011 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
17012 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
17013 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
17014 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
17015 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
17016 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
17017 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
17018 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
17019 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
17020 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
17021 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
17022 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
17023 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
17024 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
17025 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
17026 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
17027 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
17028 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
17029 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
17030 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
17031 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
17032 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
17033 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
17034 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
17035 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
17036 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
17037 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
17038 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
17039 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
17040 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
17041 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
17042 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
17043 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
17044 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
17045 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
17046 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
17047 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
17048 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
17049 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
17050 "\x29\x90\x46\x30\x92\x69\x7d\x13"
17051 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
17052 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
17053 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
17054 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
17055 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
17056 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
17057 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
17058 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
17059 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
17060 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
17061 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
17062 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
17063 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
17064 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
17065 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
17066 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
17067 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
17068 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
17069 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
17070 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
17071 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
17072 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
17073 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
17074 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
17075 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
17076 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
17077 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
17078 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
17079 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
17080 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
17081 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
17082 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
17083 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
17084 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
17085 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
17086 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
17087 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
17088 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
17089 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
17090 "\x73\x02\x3b\x78\x21\x72\x43\x00"
17091 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
17092 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
17093 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
17094 "\x11\x94\x13\x69\x51\x09\x28\xde"
17095 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
17096 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
17097 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
17098 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
17099 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
17100 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
17101 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
17102 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
17103 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
17104 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
17105 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
17106 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
17107 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
17108 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
17109 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
17110 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
17111 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
17112 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
17113 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
17114 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
17115 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
17116 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
17117 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
17118 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
17119 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
17120 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
17121 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
17122 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
17123 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
17124 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
17125 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
17126 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
17127 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
17128 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
17129 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
17130 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
17131 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
17132 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
17133 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
17134 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
17135 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
17136 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
17137 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
17138 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
17139 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
17140 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
17141 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
17142 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
17143 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
17144 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
17145 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
17146 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
17147 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
17148 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
17149 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
17150 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
17151 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
17152 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
17153 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
17154 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
17155 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
17156 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
17157 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
17158 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
17159 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
17160 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
17161 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
17162 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
17163 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
17164 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
17165 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
17166 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
17167 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
17168 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
17169 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
17170 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
17171 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
17172 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
17173 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
17174 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
17175 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
17176 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
17177 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
17178 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
17179 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
17180 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
17181 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
17182 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
17183 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
17184 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
17185 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
17186 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
17187 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
17188 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
17189 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
17190 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
17191 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
17192 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
17193 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
17194 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
17195 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
17196 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
17197 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
17198 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
17199 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
17200 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
17201 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
17202 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
17203 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
17204 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
17205 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
17206 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
17207 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
17208 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
17209 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
17210 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
17211 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
17212 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
17213 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
17214 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
17215 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
17216 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
17217 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
17218 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
17219 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
17220 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
17221 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
17222 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
17223 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
17224 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
17225 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
17226 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
17227 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
17228 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
17229 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
17230 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
17231 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
17232 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
17233 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
17234 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
17235 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
17236 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
17237 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
17238 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
17239 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
17240 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
17241 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
17242 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
17243 "\xae\xed\x39\x88\x42\x11\x3c\xed"
17244 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
17245 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
17246 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
17247 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
17248 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
17249 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
17250 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
17251 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
17252 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
17253 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
17254 "\x34\x17\xde\xba\x47\xf1\x06\x18"
17255 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
17256 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
17257 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
17258 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
17259 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
17260 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
17261 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
17262 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
17263 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
17264 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
17265 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
17266 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
17267 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
17268 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
17269 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
17270 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
17271 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
17272 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
17273 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
17274 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
17275 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
17276 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
17277 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
17278 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
17279 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
17280 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
17281 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
17282 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
17283 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
17284 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
17285 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
17286 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
17287 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
17288 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
17289 "\x74\x56\x58\x40\x02\x37\x52\x2c"
17290 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
17291 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
17292 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
17293 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
17294 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
17295 "\xed\x38\x80\x36\x72\x43\x27\x49"
17296 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
17297 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
17298 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
17299 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
17300 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
17301 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
17302 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
17303 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
17304 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
17305 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
17306 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
17307 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
17308 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
17309 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
17310 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
17311 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
17312 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
17313 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
17314 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
17315 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
17316 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
17317 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
17318 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
17319 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
17320 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
17321 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
17322 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
17323 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
17324 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
17325 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
17326 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
17327 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
17328 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
17329 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
17330 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
17331 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
17332 "\x21\xed\xda\x86",
17333 .rlen = 4100,
17334 .np = 2,
17335 .tap = { 4064, 36 },
17336 },
17337};
17338
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017339static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080017340 { /* From RFC 3686 */
17341 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
17342 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
17343 "\x00\x00\x00\x30",
17344 .klen = 20,
17345 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17346 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
17347 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
17348 .ilen = 16,
17349 .result = "Single block msg",
17350 .rlen = 16,
17351 }, {
17352 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
17353 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
17354 "\x00\x6c\xb6\xdb",
17355 .klen = 20,
17356 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
17357 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
17358 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
17359 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
17360 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
17361 .ilen = 32,
17362 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17363 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17364 "\x10\x11\x12\x13\x14\x15\x16\x17"
17365 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17366 .rlen = 32,
17367 }, {
17368 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
17369 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
17370 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
17371 "\x00\x00\x00\x48",
17372 .klen = 28,
17373 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
17374 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
17375 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
17376 .ilen = 16,
17377 .result = "Single block msg",
17378 .rlen = 16,
17379 }, {
17380 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
17381 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
17382 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
17383 "\x00\x96\xb0\x3b",
17384 .klen = 28,
17385 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
17386 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
17387 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
17388 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
17389 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
17390 .ilen = 32,
17391 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17393 "\x10\x11\x12\x13\x14\x15\x16\x17"
17394 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17395 .rlen = 32,
17396 }, {
17397 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
17398 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
17399 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
17400 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
17401 "\x00\x00\x00\x60",
17402 .klen = 36,
17403 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
17404 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
17405 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
17406 .ilen = 16,
17407 .result = "Single block msg",
17408 .rlen = 16,
17409 }, {
17410 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
17411 "\x07\x96\x36\x58\x79\xef\xf8\x86"
17412 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
17413 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
17414 "\x00\xfa\xac\x24",
17415 .klen = 36,
17416 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
17417 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
17418 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
17419 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
17420 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
17421 .ilen = 32,
17422 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17423 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17424 "\x10\x11\x12\x13\x14\x15\x16\x17"
17425 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17426 .rlen = 32,
17427 },
17428};
17429
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100017430static struct cipher_testvec aes_ofb_enc_tv_template[] = {
17431 /* From NIST Special Publication 800-38A, Appendix F.5 */
17432 {
17433 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17434 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17435 .klen = 16,
17436 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
17437 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17438 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17439 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17440 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17441 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17442 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17443 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17444 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17445 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17446 .ilen = 64,
17447 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
17448 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
17449 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
17450 "\x3c\x52\xda\xc5\x4e\xd8\x25"
17451 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
17452 "\x44\xf7\xa8\x22\x60\xed\xcc"
17453 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
17454 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
17455 .rlen = 64,
17456 }
17457};
17458
17459static struct cipher_testvec aes_ofb_dec_tv_template[] = {
17460 /* From NIST Special Publication 800-38A, Appendix F.5 */
17461 {
17462 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17463 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17464 .klen = 16,
17465 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
17466 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17467 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
17468 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
17469 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
17470 "\x3c\x52\xda\xc5\x4e\xd8\x25"
17471 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
17472 "\x44\xf7\xa8\x22\x60\xed\xcc"
17473 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
17474 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
17475 .ilen = 64,
17476 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17477 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17478 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17479 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17480 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17481 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17482 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17483 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17484 .rlen = 64,
17485 }
17486};
17487
Herbert Xuda7f0332008-07-31 17:08:25 +080017488static struct aead_testvec aes_gcm_enc_tv_template[] = {
17489 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
17490 .key = zeroed_string,
17491 .klen = 16,
17492 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
17493 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
17494 .rlen = 16,
17495 }, {
17496 .key = zeroed_string,
17497 .klen = 16,
17498 .input = zeroed_string,
17499 .ilen = 16,
17500 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
17501 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
17502 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
17503 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
17504 .rlen = 32,
17505 }, {
17506 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17507 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17508 .klen = 16,
17509 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17510 "\xde\xca\xf8\x88",
17511 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17512 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17513 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17514 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17515 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17516 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17517 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17518 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17519 .ilen = 64,
17520 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17521 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17522 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17523 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17524 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17525 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17526 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17527 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
17528 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
17529 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
17530 .rlen = 80,
17531 }, {
17532 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17533 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17534 .klen = 16,
17535 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17536 "\xde\xca\xf8\x88",
17537 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17538 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17539 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17540 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17541 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17542 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17543 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17544 "\xba\x63\x7b\x39",
17545 .ilen = 60,
17546 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17547 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17548 "\xab\xad\xda\xd2",
17549 .alen = 20,
17550 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17551 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17552 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17553 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17554 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17555 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17556 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17557 "\x3d\x58\xe0\x91"
17558 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
17559 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
17560 .rlen = 76,
17561 }, {
17562 .key = zeroed_string,
17563 .klen = 24,
17564 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
17565 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
17566 .rlen = 16,
17567 }, {
17568 .key = zeroed_string,
17569 .klen = 24,
17570 .input = zeroed_string,
17571 .ilen = 16,
17572 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
17573 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
17574 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
17575 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
17576 .rlen = 32,
17577 }, {
17578 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17579 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17580 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17581 .klen = 24,
17582 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17583 "\xde\xca\xf8\x88",
17584 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17585 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17586 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17587 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17588 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17589 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17590 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17591 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17592 .ilen = 64,
17593 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17594 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17595 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17596 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17597 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17598 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17599 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17600 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
17601 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
17602 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
17603 .rlen = 80,
17604 }, {
17605 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17606 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17607 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17608 .klen = 24,
17609 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17610 "\xde\xca\xf8\x88",
17611 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17612 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17613 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17614 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17615 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17616 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17617 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17618 "\xba\x63\x7b\x39",
17619 .ilen = 60,
17620 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17621 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17622 "\xab\xad\xda\xd2",
17623 .alen = 20,
17624 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17625 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17626 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17627 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17628 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17629 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17630 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17631 "\xcc\xda\x27\x10"
17632 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
17633 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
17634 .rlen = 76,
17635 .np = 2,
17636 .tap = { 32, 28 },
17637 .anp = 2,
17638 .atap = { 8, 12 }
17639 }, {
17640 .key = zeroed_string,
17641 .klen = 32,
17642 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
17643 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
17644 .rlen = 16,
17645 }
17646};
17647
17648static struct aead_testvec aes_gcm_dec_tv_template[] = {
17649 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
17650 .key = zeroed_string,
17651 .klen = 32,
17652 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
17653 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
17654 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
17655 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
17656 .ilen = 32,
17657 .result = zeroed_string,
17658 .rlen = 16,
17659 }, {
17660 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17661 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17662 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17663 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17664 .klen = 32,
17665 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17666 "\xde\xca\xf8\x88",
17667 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
17668 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
17669 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
17670 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
17671 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
17672 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
17673 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
17674 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
17675 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
17676 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
17677 .ilen = 80,
17678 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17679 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17680 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17681 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17682 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17683 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17684 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17685 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17686 .rlen = 64,
17687 }, {
17688 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17689 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17690 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17691 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17692 .klen = 32,
17693 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17694 "\xde\xca\xf8\x88",
17695 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
17696 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
17697 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
17698 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
17699 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
17700 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
17701 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
17702 "\xbc\xc9\xf6\x62"
17703 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
17704 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
17705 .ilen = 76,
17706 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17707 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17708 "\xab\xad\xda\xd2",
17709 .alen = 20,
17710 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17711 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17712 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17713 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17714 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17715 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17716 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17717 "\xba\x63\x7b\x39",
17718 .rlen = 60,
17719 .np = 2,
17720 .tap = { 48, 28 },
17721 .anp = 3,
17722 .atap = { 8, 8, 4 }
17723 }, {
17724 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17725 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17726 .klen = 16,
17727 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17728 "\xde\xca\xf8\x88",
17729 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17730 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17731 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17732 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17733 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17734 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17735 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17736 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
17737 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
17738 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
17739 .ilen = 80,
17740 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17741 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17742 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17743 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17744 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17745 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17746 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17747 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17748 .rlen = 64,
17749 }, {
17750 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17751 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17752 .klen = 16,
17753 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17754 "\xde\xca\xf8\x88",
17755 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17756 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17757 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17758 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17759 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17760 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17761 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17762 "\x3d\x58\xe0\x91"
17763 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
17764 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
17765 .ilen = 76,
17766 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17767 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17768 "\xab\xad\xda\xd2",
17769 .alen = 20,
17770 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17771 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17772 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17773 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17774 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17775 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17776 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17777 "\xba\x63\x7b\x39",
17778 .rlen = 60,
17779 }, {
17780 .key = zeroed_string,
17781 .klen = 24,
17782 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
17783 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
17784 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
17785 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
17786 .ilen = 32,
17787 .result = zeroed_string,
17788 .rlen = 16,
17789 }, {
17790 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17791 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17792 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17793 .klen = 24,
17794 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17795 "\xde\xca\xf8\x88",
17796 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17797 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17798 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17799 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17800 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17801 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17802 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17803 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
17804 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
17805 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
17806 .ilen = 80,
17807 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17808 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17809 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17810 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17811 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17812 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17813 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17814 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17815 .rlen = 64,
17816 }, {
17817 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17818 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17819 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17820 .klen = 24,
17821 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17822 "\xde\xca\xf8\x88",
17823 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17824 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17825 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17826 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17827 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17828 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17829 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17830 "\xcc\xda\x27\x10"
17831 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
17832 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
17833 .ilen = 76,
17834 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17835 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17836 "\xab\xad\xda\xd2",
17837 .alen = 20,
17838 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17839 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17840 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17841 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17842 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17843 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17844 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17845 "\xba\x63\x7b\x39",
17846 .rlen = 60,
17847 }
17848};
17849
Adrian Hoban69435b92010-11-04 15:02:04 -040017850static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
17851 { /* Generated using Crypto++ */
17852 .key = zeroed_string,
17853 .klen = 20,
17854 .iv = zeroed_string,
17855 .input = zeroed_string,
17856 .ilen = 16,
17857 .assoc = zeroed_string,
17858 .alen = 8,
17859 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
17860 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
17861 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
17862 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
17863 .rlen = 32,
17864 },{
17865 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17866 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17867 "\x00\x00\x00\x00",
17868 .klen = 20,
17869 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
17870 "\x00\x00\x00\x00",
17871 .input = zeroed_string,
17872 .ilen = 16,
17873 .assoc = zeroed_string,
17874 .alen = 8,
17875 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
17876 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
17877 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
17878 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
17879 .rlen = 32,
17880
17881 }, {
17882 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17883 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17884 "\x00\x00\x00\x00",
17885 .klen = 20,
17886 .iv = zeroed_string,
17887 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
17888 "\x01\x01\x01\x01\x01\x01\x01\x01",
17889 .ilen = 16,
17890 .assoc = zeroed_string,
17891 .alen = 8,
17892 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
17893 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
17894 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
17895 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
17896 .rlen = 32,
17897 }, {
17898 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17899 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17900 "\x00\x00\x00\x00",
17901 .klen = 20,
17902 .iv = zeroed_string,
17903 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
17904 "\x01\x01\x01\x01\x01\x01\x01\x01",
17905 .ilen = 16,
17906 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
17907 .alen = 8,
17908 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
17909 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
17910 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
17911 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
17912 .rlen = 32,
17913 }, {
17914 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17915 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17916 "\x00\x00\x00\x00",
17917 .klen = 20,
17918 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
17919 "\x00\x00\x00\x00",
17920 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
17921 "\x01\x01\x01\x01\x01\x01\x01\x01",
17922 .ilen = 16,
17923 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
17924 .alen = 8,
17925 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
17926 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
17927 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
17928 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
17929 .rlen = 32,
17930 }, {
17931 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17932 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17933 "\x00\x00\x00\x00",
17934 .klen = 20,
17935 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
17936 "\x00\x00\x00\x00",
17937 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
17938 "\x01\x01\x01\x01\x01\x01\x01\x01"
17939 "\x01\x01\x01\x01\x01\x01\x01\x01"
17940 "\x01\x01\x01\x01\x01\x01\x01\x01"
17941 "\x01\x01\x01\x01\x01\x01\x01\x01"
17942 "\x01\x01\x01\x01\x01\x01\x01\x01"
17943 "\x01\x01\x01\x01\x01\x01\x01\x01"
17944 "\x01\x01\x01\x01\x01\x01\x01\x01",
17945 .ilen = 64,
17946 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
17947 .alen = 8,
17948 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
17949 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
17950 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
17951 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
17952 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
17953 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
17954 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
17955 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
17956 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
17957 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
17958 .rlen = 80,
17959 }, {
17960 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
17961 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17962 "\x00\x00\x00\x00",
17963 .klen = 20,
17964 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
17965 "\x00\x00\x00\x00",
17966 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
17967 "\xff\xff\xff\xff\xff\xff\xff\xff"
17968 "\xff\xff\xff\xff\xff\xff\xff\xff"
17969 "\xff\xff\xff\xff\xff\xff\xff\xff"
17970 "\xff\xff\xff\xff\xff\xff\xff\xff"
17971 "\xff\xff\xff\xff\xff\xff\xff\xff"
17972 "\xff\xff\xff\xff\xff\xff\xff\xff"
17973 "\xff\xff\xff\xff\xff\xff\xff\xff"
17974 "\xff\xff\xff\xff\xff\xff\xff\xff"
17975 "\xff\xff\xff\xff\xff\xff\xff\xff"
17976 "\xff\xff\xff\xff\xff\xff\xff\xff"
17977 "\xff\xff\xff\xff\xff\xff\xff\xff"
17978 "\xff\xff\xff\xff\xff\xff\xff\xff"
17979 "\xff\xff\xff\xff\xff\xff\xff\xff"
17980 "\xff\xff\xff\xff\xff\xff\xff\xff"
17981 "\xff\xff\xff\xff\xff\xff\xff\xff"
17982 "\xff\xff\xff\xff\xff\xff\xff\xff"
17983 "\xff\xff\xff\xff\xff\xff\xff\xff"
17984 "\xff\xff\xff\xff\xff\xff\xff\xff"
17985 "\xff\xff\xff\xff\xff\xff\xff\xff"
17986 "\xff\xff\xff\xff\xff\xff\xff\xff"
17987 "\xff\xff\xff\xff\xff\xff\xff\xff"
17988 "\xff\xff\xff\xff\xff\xff\xff\xff"
17989 "\xff\xff\xff\xff\xff\xff\xff\xff",
17990 .ilen = 192,
17991 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
17992 "\xaa\xaa\xaa\xaa",
17993 .alen = 12,
17994 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
17995 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
17996 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
17997 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
17998 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
17999 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
18000 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
18001 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
18002 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
18003 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
18004 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
18005 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
18006 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
18007 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
18008 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
18009 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
18010 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
18011 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
18012 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
18013 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
18014 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
18015 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
18016 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
18017 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
18018 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
18019 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
18020 .rlen = 208,
18021 }
18022};
18023
18024static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
18025 { /* Generated using Crypto++ */
18026 .key = zeroed_string,
18027 .klen = 20,
18028 .iv = zeroed_string,
18029 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
18030 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
18031 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
18032 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
18033 .ilen = 32,
18034 .assoc = zeroed_string,
18035 .alen = 8,
18036 .result = zeroed_string,
18037 .rlen = 16,
18038
18039 },{
18040 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18041 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18042 "\x00\x00\x00\x00",
18043 .klen = 20,
18044 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18045 "\x00\x00\x00\x00",
18046 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
18047 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
18048 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
18049 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
18050 .ilen = 32,
18051 .assoc = zeroed_string,
18052 .alen = 8,
18053 .result = zeroed_string,
18054 .rlen = 16,
18055 }, {
18056 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18057 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18058 "\x00\x00\x00\x00",
18059 .klen = 20,
18060 .iv = zeroed_string,
18061 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18062 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18063 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
18064 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
18065 .ilen = 32,
18066 .assoc = zeroed_string,
18067 .alen = 8,
18068 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18069 "\x01\x01\x01\x01\x01\x01\x01\x01",
18070 .rlen = 16,
18071 }, {
18072 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18073 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18074 "\x00\x00\x00\x00",
18075 .klen = 20,
18076 .iv = zeroed_string,
18077 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18078 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18079 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
18080 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
18081 .ilen = 32,
18082 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18083 .alen = 8,
18084 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18085 "\x01\x01\x01\x01\x01\x01\x01\x01",
18086 .rlen = 16,
18087
18088 }, {
18089 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18090 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18091 "\x00\x00\x00\x00",
18092 .klen = 20,
18093 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18094 "\x00\x00\x00\x00",
18095 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18096 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18097 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
18098 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
18099 .ilen = 32,
18100 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18101 .alen = 8,
18102 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18103 "\x01\x01\x01\x01\x01\x01\x01\x01",
18104 .rlen = 16,
18105 }, {
18106 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18107 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18108 "\x00\x00\x00\x00",
18109 .klen = 20,
18110 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18111 "\x00\x00\x00\x00",
18112 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18113 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18114 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
18115 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
18116 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
18117 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
18118 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
18119 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
18120 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
18121 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
18122 .ilen = 80,
18123 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18124 .alen = 8,
18125 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18126 "\x01\x01\x01\x01\x01\x01\x01\x01"
18127 "\x01\x01\x01\x01\x01\x01\x01\x01"
18128 "\x01\x01\x01\x01\x01\x01\x01\x01"
18129 "\x01\x01\x01\x01\x01\x01\x01\x01"
18130 "\x01\x01\x01\x01\x01\x01\x01\x01"
18131 "\x01\x01\x01\x01\x01\x01\x01\x01"
18132 "\x01\x01\x01\x01\x01\x01\x01\x01",
18133 .rlen = 64,
18134 }, {
18135 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18136 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18137 "\x00\x00\x00\x00",
18138 .klen = 20,
18139 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
18140 "\x00\x00\x00\x00",
18141 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
18142 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
18143 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
18144 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
18145 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
18146 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
18147 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
18148 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
18149 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
18150 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
18151 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
18152 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
18153 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
18154 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
18155 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
18156 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
18157 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
18158 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
18159 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
18160 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
18161 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
18162 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
18163 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
18164 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
18165 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
18166 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
18167 .ilen = 208,
18168 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
18169 "\xaa\xaa\xaa\xaa",
18170 .alen = 12,
18171 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
18172 "\xff\xff\xff\xff\xff\xff\xff\xff"
18173 "\xff\xff\xff\xff\xff\xff\xff\xff"
18174 "\xff\xff\xff\xff\xff\xff\xff\xff"
18175 "\xff\xff\xff\xff\xff\xff\xff\xff"
18176 "\xff\xff\xff\xff\xff\xff\xff\xff"
18177 "\xff\xff\xff\xff\xff\xff\xff\xff"
18178 "\xff\xff\xff\xff\xff\xff\xff\xff"
18179 "\xff\xff\xff\xff\xff\xff\xff\xff"
18180 "\xff\xff\xff\xff\xff\xff\xff\xff"
18181 "\xff\xff\xff\xff\xff\xff\xff\xff"
18182 "\xff\xff\xff\xff\xff\xff\xff\xff"
18183 "\xff\xff\xff\xff\xff\xff\xff\xff"
18184 "\xff\xff\xff\xff\xff\xff\xff\xff"
18185 "\xff\xff\xff\xff\xff\xff\xff\xff"
18186 "\xff\xff\xff\xff\xff\xff\xff\xff"
18187 "\xff\xff\xff\xff\xff\xff\xff\xff"
18188 "\xff\xff\xff\xff\xff\xff\xff\xff"
18189 "\xff\xff\xff\xff\xff\xff\xff\xff"
18190 "\xff\xff\xff\xff\xff\xff\xff\xff"
18191 "\xff\xff\xff\xff\xff\xff\xff\xff"
18192 "\xff\xff\xff\xff\xff\xff\xff\xff"
18193 "\xff\xff\xff\xff\xff\xff\xff\xff"
18194 "\xff\xff\xff\xff\xff\xff\xff\xff",
18195 .rlen = 192,
18196
18197 }
18198};
18199
Herbert Xuda7f0332008-07-31 17:08:25 +080018200static struct aead_testvec aes_ccm_enc_tv_template[] = {
18201 { /* From RFC 3610 */
18202 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18203 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18204 .klen = 16,
18205 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
18206 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18207 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18208 .alen = 8,
18209 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18210 "\x10\x11\x12\x13\x14\x15\x16\x17"
18211 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
18212 .ilen = 23,
18213 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
18214 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
18215 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
18216 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
18217 .rlen = 31,
18218 }, {
18219 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18220 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18221 .klen = 16,
18222 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
18223 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18224 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18225 "\x08\x09\x0a\x0b",
18226 .alen = 12,
18227 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18228 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18229 "\x1c\x1d\x1e\x1f",
18230 .ilen = 20,
18231 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
18232 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
18233 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
18234 "\x7d\x9c\x2d\x93",
18235 .rlen = 28,
18236 }, {
18237 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18238 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18239 .klen = 16,
18240 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
18241 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18242 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18243 .alen = 8,
18244 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18245 "\x10\x11\x12\x13\x14\x15\x16\x17"
18246 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18247 "\x20",
18248 .ilen = 25,
18249 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
18250 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
18251 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
18252 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
18253 "\x7e\x5f\x4e",
18254 .rlen = 35,
18255 }, {
18256 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18257 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18258 .klen = 16,
18259 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
18260 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18261 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18262 "\x08\x09\x0a\x0b",
18263 .alen = 12,
18264 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18265 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18266 "\x1c\x1d\x1e",
18267 .ilen = 19,
18268 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
18269 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
18270 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
18271 "\x4d\x99\x99\x88\xdd",
18272 .rlen = 29,
18273 }, {
18274 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18275 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18276 .klen = 16,
18277 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
18278 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18279 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
18280 .alen = 8,
18281 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
18282 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
18283 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
18284 .ilen = 24,
18285 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
18286 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
18287 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
18288 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
18289 .rlen = 32,
18290 }, {
18291 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18292 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18293 .klen = 16,
18294 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
18295 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18296 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
18297 "\x20\xea\x60\xc0",
18298 .alen = 12,
18299 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
18300 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
18301 "\x3a\x80\x3b\xa8\x7f",
18302 .ilen = 21,
18303 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
18304 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
18305 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
18306 "\x5a\xe0\x70\x45\x51",
18307 .rlen = 29,
18308 }, {
18309 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18310 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18311 .klen = 16,
18312 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
18313 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18314 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
18315 .alen = 8,
18316 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
18317 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
18318 "\x98\x09\xd6\x7d\xbe\xdd\x18",
18319 .ilen = 23,
18320 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
18321 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
18322 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
18323 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
18324 "\xba",
18325 .rlen = 33,
18326 },
18327};
18328
18329static struct aead_testvec aes_ccm_dec_tv_template[] = {
18330 { /* From RFC 3610 */
18331 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18332 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18333 .klen = 16,
18334 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
18335 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18336 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18337 .alen = 8,
18338 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
18339 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
18340 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
18341 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
18342 .ilen = 31,
18343 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18344 "\x10\x11\x12\x13\x14\x15\x16\x17"
18345 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
18346 .rlen = 23,
18347 }, {
18348 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18349 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18350 .klen = 16,
18351 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
18352 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18353 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18354 "\x08\x09\x0a\x0b",
18355 .alen = 12,
18356 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
18357 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
18358 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
18359 "\x7d\x9c\x2d\x93",
18360 .ilen = 28,
18361 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18362 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18363 "\x1c\x1d\x1e\x1f",
18364 .rlen = 20,
18365 }, {
18366 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18367 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18368 .klen = 16,
18369 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
18370 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18371 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18372 .alen = 8,
18373 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
18374 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
18375 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
18376 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
18377 "\x7e\x5f\x4e",
18378 .ilen = 35,
18379 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18380 "\x10\x11\x12\x13\x14\x15\x16\x17"
18381 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18382 "\x20",
18383 .rlen = 25,
18384 }, {
18385 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18386 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18387 .klen = 16,
18388 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
18389 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18390 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18391 "\x08\x09\x0a\x0b",
18392 .alen = 12,
18393 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
18394 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
18395 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
18396 "\x4d\x99\x99\x88\xdd",
18397 .ilen = 29,
18398 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18399 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18400 "\x1c\x1d\x1e",
18401 .rlen = 19,
18402 }, {
18403 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18404 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18405 .klen = 16,
18406 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
18407 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18408 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
18409 .alen = 8,
18410 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
18411 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
18412 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
18413 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
18414 .ilen = 32,
18415 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
18416 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
18417 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
18418 .rlen = 24,
18419 }, {
18420 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18421 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18422 .klen = 16,
18423 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
18424 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18425 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
18426 "\x20\xea\x60\xc0",
18427 .alen = 12,
18428 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
18429 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
18430 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
18431 "\x5a\xe0\x70\x45\x51",
18432 .ilen = 29,
18433 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
18434 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
18435 "\x3a\x80\x3b\xa8\x7f",
18436 .rlen = 21,
18437 }, {
18438 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18439 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18440 .klen = 16,
18441 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
18442 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18443 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
18444 .alen = 8,
18445 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
18446 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
18447 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
18448 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
18449 "\xba",
18450 .ilen = 33,
18451 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
18452 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
18453 "\x98\x09\xd6\x7d\xbe\xdd\x18",
18454 .rlen = 23,
18455 },
18456};
18457
Jarod Wilson5d667322009-05-04 19:23:40 +080018458/*
18459 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
18460 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
18461 * Special Publication 800-38C's test vectors also use nonce lengths our
18462 * implementation doesn't support. The following are taken from fips cavs
18463 * fax files on hand at Red Hat.
18464 *
18465 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
18466 * part of the nonce which combine w/the iv, but need to be input this way.
18467 */
18468static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
18469 {
18470 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
18471 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
18472 "\x96\xac\x59",
18473 .klen = 19,
18474 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
18475 .alen = 0,
18476 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
18477 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
18478 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
18479 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
18480 .ilen = 32,
18481 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
18482 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
18483 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
18484 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
18485 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
18486 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
18487 .rlen = 48,
18488 }, {
18489 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
18490 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
18491 "\x4f\xa3\x19",
18492 .klen = 19,
18493 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
18494 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
18495 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
18496 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
18497 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
18498 .alen = 32,
18499 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
18500 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
18501 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
18502 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
18503 .ilen = 32,
18504 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
18505 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
18506 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
18507 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
18508 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
18509 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
18510 .rlen = 48,
18511 }, {
18512 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
18513 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
18514 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
18515 "\xa0\x20\x35",
18516 .klen = 27,
18517 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
18518 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
18519 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
18520 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
18521 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
18522 .alen = 32,
18523 .ilen = 0,
18524 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
18525 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
18526 .rlen = 16,
18527 }, {
18528 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
18529 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
18530 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
18531 "\xd6\x3c\x8c",
18532 .klen = 27,
18533 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
18534 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
18535 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
18536 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
18537 "\xe3\x00\x73\x69\x84\x69\x87\x79",
18538 .alen = 32,
18539 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
18540 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
18541 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
18542 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
18543 .ilen = 32,
18544 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
18545 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
18546 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
18547 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
18548 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
18549 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
18550 .rlen = 48,
18551 }, {
18552 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
18553 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
18554 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
18555 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
18556 "\x1e\x29\x91",
18557 .klen = 35,
18558 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
18559 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
18560 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
18561 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
18562 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
18563 .alen = 32,
18564 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
18565 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
18566 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
18567 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
18568 .ilen = 32,
18569 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
18570 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
18571 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
18572 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
18573 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
18574 .rlen = 40,
18575 }, {
18576 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
18577 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
18578 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
18579 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
18580 "\xf9\xd9\x4e",
18581 .klen = 35,
18582 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
18583 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
18584 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
18585 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
18586 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
18587 .alen = 32,
18588 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
18589 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
18590 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
18591 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
18592 .ilen = 32,
18593 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
18594 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
18595 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
18596 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
18597 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
18598 "\x7b\x72\x8a\xf7",
18599 .rlen = 44,
18600 }, {
18601 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
18602 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
18603 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
18604 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
18605 "\x24\xa7\x8b",
18606 .klen = 35,
18607 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
18608 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
18609 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
18610 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
18611 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
18612 .alen = 32,
18613 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
18614 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
18615 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
18616 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
18617 .ilen = 32,
18618 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
18619 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
18620 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
18621 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
18622 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
18623 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
18624 .rlen = 48,
18625 },
18626};
18627
18628static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
18629 {
18630 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
18631 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
18632 "\xc6\xfb\x7d",
18633 .klen = 19,
18634 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
18635 .alen = 0,
18636 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
18637 .ilen = 8,
18638 .result = "\x00",
18639 .rlen = 0,
18640 .novrfy = 1,
18641 }, {
18642 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
18643 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
18644 "\xaf\x94\x87",
18645 .klen = 19,
18646 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
18647 .alen = 0,
18648 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
18649 .ilen = 8,
18650 .result = "\x00",
18651 .rlen = 0,
18652 }, {
18653 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
18654 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
18655 "\xc6\xfb\x7d",
18656 .klen = 19,
18657 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
18658 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
18659 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
18660 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
18661 "\xd8\x94\x99\x91\x81\x54\x62\x57",
18662 .alen = 32,
18663 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
18664 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
18665 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
18666 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
18667 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
18668 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
18669 .ilen = 48,
18670 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
18671 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
18672 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
18673 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
18674 .rlen = 32,
18675 .novrfy = 1,
18676 }, {
18677 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
18678 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
18679 "\x05\xe0\xc9",
18680 .klen = 19,
18681 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
18682 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
18683 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
18684 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
18685 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
18686 .alen = 32,
18687 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
18688 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
18689 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
18690 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
18691 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
18692 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
18693 .ilen = 48,
18694 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
18695 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
18696 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
18697 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
18698 .rlen = 32,
18699 }, {
18700 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
18701 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
18702 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
18703 "\xee\x49\x83",
18704 .klen = 27,
18705 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
18706 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
18707 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
18708 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
18709 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
18710 .alen = 32,
18711 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
18712 .ilen = 8,
18713 .result = "\x00",
18714 .rlen = 0,
18715 }, {
18716 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
18717 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
18718 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
18719 "\xee\x49\x83",
18720 .klen = 27,
18721 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
18722 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
18723 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
18724 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
18725 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
18726 .alen = 32,
18727 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
18728 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
18729 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
18730 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
18731 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
18732 .ilen = 40,
18733 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
18734 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
18735 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
18736 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
18737 .rlen = 32,
18738 }, {
18739 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
18740 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
18741 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
18742 "\xd1\xfc\x57",
18743 .klen = 27,
18744 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
18745 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
18746 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
18747 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
18748 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
18749 .alen = 32,
18750 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
18751 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
18752 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
18753 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
18754 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
18755 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
18756 .ilen = 48,
18757 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
18758 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
18759 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
18760 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
18761 .rlen = 32,
18762 .novrfy = 1,
18763 }, {
18764 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
18765 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
18766 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
18767 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
18768 "\xee\x49\x83",
18769 .klen = 35,
18770 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
18771 .alen = 0,
18772 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
18773 .ilen = 8,
18774 .result = "\x00",
18775 .rlen = 0,
18776 }, {
18777 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
18778 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
18779 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
18780 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
18781 "\x85\x34\x66",
18782 .klen = 35,
18783 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
18784 .alen = 0,
18785 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
18786 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
18787 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
18788 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
18789 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
18790 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
18791 .ilen = 48,
18792 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
18793 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
18794 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
18795 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
18796 .rlen = 32,
18797 .novrfy = 1,
18798 }, {
18799 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
18800 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
18801 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
18802 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
18803 "\xcf\x76\x3f",
18804 .klen = 35,
18805 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
18806 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
18807 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
18808 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
18809 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
18810 .alen = 32,
18811 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
18812 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
18813 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
18814 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
18815 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
18816 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
18817 .ilen = 48,
18818 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
18819 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
18820 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
18821 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
18822 .rlen = 32,
18823 },
18824};
18825
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080018826/*
18827 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
18828 * test vectors, taken from Appendix B.2.9 and B.2.10:
18829 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
18830 * Only AES-128 is supported at this time.
18831 */
18832#define ANSI_CPRNG_AES_TEST_VECTORS 6
18833
18834static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
18835 {
18836 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
18837 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
18838 .klen = 16,
18839 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
18840 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
18841 .dtlen = 16,
18842 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
18843 "\x00\x00\x00\x00\x00\x00\x00\x00",
18844 .vlen = 16,
18845 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
18846 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
18847 .rlen = 16,
18848 .loops = 1,
18849 }, {
18850 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
18851 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
18852 .klen = 16,
18853 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
18854 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
18855 .dtlen = 16,
18856 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
18857 "\x00\x00\x00\x00\x00\x00\x00\x00",
18858 .vlen = 16,
18859 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
18860 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
18861 .rlen = 16,
18862 .loops = 1,
18863 }, {
18864 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
18865 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
18866 .klen = 16,
18867 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
18868 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
18869 .dtlen = 16,
18870 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
18871 "\x00\x00\x00\x00\x00\x00\x00\x00",
18872 .vlen = 16,
18873 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
18874 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
18875 .rlen = 16,
18876 .loops = 1,
18877 }, {
18878 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
18879 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
18880 .klen = 16,
18881 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
18882 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
18883 .dtlen = 16,
18884 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
18885 "\x00\x00\x00\x00\x00\x00\x00\x00",
18886 .vlen = 16,
18887 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
18888 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
18889 .rlen = 16,
18890 .loops = 1,
18891 }, {
18892 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
18893 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
18894 .klen = 16,
18895 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
18896 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
18897 .dtlen = 16,
18898 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
18899 "\x00\x00\x00\x00\x00\x00\x00\x00",
18900 .vlen = 16,
18901 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
18902 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
18903 .rlen = 16,
18904 .loops = 1,
18905 }, { /* Monte Carlo Test */
18906 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
18907 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
18908 .klen = 16,
18909 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
18910 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
18911 .dtlen = 16,
18912 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
18913 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
18914 .vlen = 16,
18915 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
18916 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
18917 .rlen = 16,
18918 .loops = 10000,
18919 },
18920};
18921
Herbert Xuda7f0332008-07-31 17:08:25 +080018922/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020018923#define CAST5_ENC_TEST_VECTORS 4
18924#define CAST5_DEC_TEST_VECTORS 4
18925#define CAST5_CBC_ENC_TEST_VECTORS 1
18926#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030018927#define CAST5_CTR_ENC_TEST_VECTORS 2
18928#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080018929
18930static struct cipher_testvec cast5_enc_tv_template[] = {
18931 {
18932 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
18933 "\x23\x45\x67\x89\x34\x56\x78\x9a",
18934 .klen = 16,
18935 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
18936 .ilen = 8,
18937 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
18938 .rlen = 8,
18939 }, {
18940 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
18941 "\x23\x45",
18942 .klen = 10,
18943 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
18944 .ilen = 8,
18945 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
18946 .rlen = 8,
18947 }, {
18948 .key = "\x01\x23\x45\x67\x12",
18949 .klen = 5,
18950 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
18951 .ilen = 8,
18952 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
18953 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020018954 }, { /* Generated from TF test vectors */
18955 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
18956 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
18957 .klen = 16,
18958 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
18959 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
18960 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
18961 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
18962 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
18963 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
18964 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
18965 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
18966 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
18967 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
18968 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
18969 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
18970 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
18971 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
18972 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
18973 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
18974 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
18975 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
18976 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
18977 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
18978 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
18979 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
18980 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
18981 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
18982 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
18983 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
18984 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
18985 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
18986 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
18987 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
18988 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
18989 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
18990 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
18991 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
18992 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
18993 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
18994 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
18995 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
18996 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
18997 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
18998 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
18999 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19000 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19001 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19002 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19003 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19004 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19005 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19006 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19007 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19008 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19009 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19010 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19011 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19012 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19013 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19014 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19015 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19016 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19017 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19018 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19019 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19020 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19021 .ilen = 496,
19022 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
19023 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
19024 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
19025 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
19026 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
19027 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
19028 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
19029 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
19030 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
19031 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
19032 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
19033 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
19034 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
19035 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
19036 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
19037 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
19038 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
19039 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
19040 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
19041 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
19042 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
19043 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
19044 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
19045 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
19046 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
19047 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
19048 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
19049 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
19050 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
19051 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
19052 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
19053 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
19054 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
19055 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
19056 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
19057 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
19058 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
19059 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
19060 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
19061 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
19062 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
19063 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
19064 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
19065 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
19066 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
19067 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
19068 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
19069 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
19070 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
19071 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
19072 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
19073 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
19074 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
19075 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
19076 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
19077 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
19078 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
19079 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
19080 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
19081 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
19082 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
19083 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
19084 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019085 .also_non_np = 1,
19086 .np = 2,
19087 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080019088 },
19089};
19090
19091static struct cipher_testvec cast5_dec_tv_template[] = {
19092 {
19093 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19094 "\x23\x45\x67\x89\x34\x56\x78\x9a",
19095 .klen = 16,
19096 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
19097 .ilen = 8,
19098 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19099 .rlen = 8,
19100 }, {
19101 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19102 "\x23\x45",
19103 .klen = 10,
19104 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
19105 .ilen = 8,
19106 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19107 .rlen = 8,
19108 }, {
19109 .key = "\x01\x23\x45\x67\x12",
19110 .klen = 5,
19111 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
19112 .ilen = 8,
19113 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19114 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019115 }, { /* Generated from TF test vectors */
19116 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19117 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19118 .klen = 16,
19119 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19120 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
19121 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
19122 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
19123 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
19124 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
19125 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
19126 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
19127 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
19128 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
19129 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
19130 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
19131 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
19132 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
19133 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
19134 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
19135 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
19136 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
19137 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
19138 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
19139 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
19140 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
19141 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
19142 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
19143 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
19144 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
19145 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
19146 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
19147 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
19148 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
19149 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
19150 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
19151 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
19152 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
19153 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
19154 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
19155 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
19156 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
19157 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
19158 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
19159 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
19160 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
19161 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
19162 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
19163 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
19164 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
19165 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
19166 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
19167 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
19168 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
19169 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
19170 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
19171 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
19172 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
19173 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
19174 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
19175 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
19176 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
19177 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
19178 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
19179 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
19180 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
19181 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
19182 .ilen = 496,
19183 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19184 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19185 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19186 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19187 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19188 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19189 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19190 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19191 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19192 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19193 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19194 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19195 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19196 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19197 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19198 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19199 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19200 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19201 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19202 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19203 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19204 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19205 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19206 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19207 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19208 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19209 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19210 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19211 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19212 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19213 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19214 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19215 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19216 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19217 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19218 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19219 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19220 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19221 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19222 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19223 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19224 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19225 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19226 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19227 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19228 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19229 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19230 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19231 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19232 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19233 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19234 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19235 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19236 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19237 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19238 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19239 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19240 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19241 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19242 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19243 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19244 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19245 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019246 .also_non_np = 1,
19247 .np = 2,
19248 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019249 },
19250};
19251
19252static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
19253 { /* Generated from TF test vectors */
19254 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19255 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19256 .klen = 16,
19257 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19258 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19259 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19260 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19261 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19262 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19263 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19264 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19265 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19266 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19267 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19268 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19269 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19270 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19271 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19272 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19273 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19274 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19275 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19276 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19277 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19278 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19279 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19280 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19281 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19282 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19283 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19284 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19285 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19286 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19287 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19288 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19289 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19290 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19291 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19292 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19293 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19294 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19295 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19296 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19297 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19298 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19299 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19300 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19301 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19302 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19303 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19304 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19305 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19306 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19307 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19308 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19309 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19310 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19311 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19312 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19313 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19314 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19315 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19316 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19317 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19318 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19319 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19320 .ilen = 496,
19321 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
19322 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
19323 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
19324 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
19325 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
19326 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
19327 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
19328 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
19329 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
19330 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
19331 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
19332 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
19333 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
19334 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
19335 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
19336 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
19337 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
19338 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
19339 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
19340 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
19341 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
19342 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
19343 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
19344 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
19345 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
19346 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
19347 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
19348 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
19349 "\x90\x12\x37\x49\x27\x98\x69\x18"
19350 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
19351 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
19352 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
19353 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
19354 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
19355 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
19356 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
19357 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
19358 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
19359 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
19360 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
19361 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
19362 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
19363 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
19364 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
19365 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
19366 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
19367 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
19368 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
19369 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
19370 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
19371 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
19372 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
19373 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
19374 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
19375 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
19376 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
19377 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
19378 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
19379 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
19380 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
19381 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
19382 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
19383 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019384 .also_non_np = 1,
19385 .np = 2,
19386 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019387 },
19388};
19389
19390static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
19391 { /* Generated from TF test vectors */
19392 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19393 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19394 .klen = 16,
19395 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19396 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
19397 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
19398 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
19399 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
19400 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
19401 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
19402 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
19403 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
19404 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
19405 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
19406 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
19407 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
19408 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
19409 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
19410 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
19411 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
19412 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
19413 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
19414 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
19415 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
19416 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
19417 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
19418 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
19419 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
19420 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
19421 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
19422 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
19423 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
19424 "\x90\x12\x37\x49\x27\x98\x69\x18"
19425 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
19426 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
19427 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
19428 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
19429 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
19430 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
19431 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
19432 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
19433 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
19434 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
19435 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
19436 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
19437 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
19438 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
19439 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
19440 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
19441 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
19442 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
19443 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
19444 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
19445 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
19446 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
19447 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
19448 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
19449 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
19450 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
19451 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
19452 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
19453 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
19454 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
19455 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
19456 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
19457 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
19458 .ilen = 496,
19459 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19460 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19461 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19462 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19463 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19464 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19465 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19466 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19467 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19468 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19469 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19470 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19471 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19472 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19473 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19474 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19475 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19476 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19477 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19478 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19479 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19480 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19481 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19482 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19483 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19484 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19485 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19486 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19487 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19488 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19489 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19490 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19491 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19492 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19493 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19494 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19495 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19496 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19497 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19498 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19499 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19500 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19501 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19502 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19503 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19504 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19505 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19506 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19507 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19508 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19509 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19510 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19511 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19512 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19513 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19514 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19515 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19516 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19517 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19518 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19519 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19520 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19521 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019522 .also_non_np = 1,
19523 .np = 2,
19524 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019525 },
19526};
19527
19528static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
19529 { /* Generated from TF test vectors */
19530 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19531 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19532 .klen = 16,
19533 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19534 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19535 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030019536 "\x3A",
19537 .ilen = 17,
19538 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
19539 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
19540 "\x0C",
19541 .rlen = 17,
19542 }, { /* Generated from TF test vectors */
19543 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19544 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19545 .klen = 16,
19546 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19547 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19548 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019549 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19550 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19551 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19552 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19553 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19554 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19555 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19556 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19557 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19558 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19559 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19560 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19561 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19562 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19563 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19564 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19565 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19566 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19567 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19568 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19569 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19570 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19571 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19572 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19573 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19574 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19575 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19576 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19577 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19578 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19579 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19580 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19581 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19582 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19583 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19584 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19585 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19586 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19587 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19588 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19589 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19590 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19591 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19592 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19593 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19594 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19595 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19596 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19597 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19598 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19599 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19600 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19601 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19602 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19603 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19604 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19605 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19606 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19607 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19608 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19609 .ilen = 496,
19610 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
19611 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
19612 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
19613 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
19614 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
19615 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
19616 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
19617 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
19618 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
19619 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
19620 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
19621 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
19622 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
19623 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
19624 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
19625 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
19626 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
19627 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
19628 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
19629 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
19630 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
19631 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
19632 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
19633 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
19634 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
19635 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
19636 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
19637 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
19638 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
19639 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
19640 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
19641 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
19642 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
19643 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
19644 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
19645 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
19646 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
19647 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
19648 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
19649 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
19650 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
19651 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
19652 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
19653 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
19654 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
19655 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
19656 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
19657 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
19658 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
19659 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
19660 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
19661 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
19662 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
19663 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
19664 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
19665 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
19666 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
19667 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
19668 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
19669 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
19670 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
19671 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
19672 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019673 .also_non_np = 1,
19674 .np = 2,
19675 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019676 },
19677};
19678
19679static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
19680 { /* Generated from TF test vectors */
19681 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19682 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19683 .klen = 16,
19684 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19685 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
19686 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030019687 "\x0C",
19688 .ilen = 17,
19689 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19690 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19691 "\x3A",
19692 .rlen = 17,
19693 }, { /* Generated from TF test vectors */
19694 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19695 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19696 .klen = 16,
19697 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19698 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
19699 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019700 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
19701 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
19702 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
19703 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
19704 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
19705 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
19706 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
19707 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
19708 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
19709 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
19710 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
19711 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
19712 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
19713 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
19714 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
19715 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
19716 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
19717 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
19718 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
19719 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
19720 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
19721 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
19722 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
19723 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
19724 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
19725 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
19726 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
19727 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
19728 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
19729 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
19730 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
19731 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
19732 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
19733 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
19734 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
19735 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
19736 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
19737 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
19738 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
19739 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
19740 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
19741 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
19742 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
19743 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
19744 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
19745 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
19746 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
19747 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
19748 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
19749 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
19750 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
19751 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
19752 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
19753 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
19754 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
19755 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
19756 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
19757 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
19758 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
19759 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
19760 .ilen = 496,
19761 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19762 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19763 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19764 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19765 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19766 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19767 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19768 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19769 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19770 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19771 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19772 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19773 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19774 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19775 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19776 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19777 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19778 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19779 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19780 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19781 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19782 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19783 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19784 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19785 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19786 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19787 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19788 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19789 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19790 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19791 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19792 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19793 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19794 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19795 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19796 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19797 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19798 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19799 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19800 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19801 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19802 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19803 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19804 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19805 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19806 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19807 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19808 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19809 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19810 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19811 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19812 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19813 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19814 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19815 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19816 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19817 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19818 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19819 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19820 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19821 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19822 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19823 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019824 .also_non_np = 1,
19825 .np = 2,
19826 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080019827 },
19828};
19829
19830/*
19831 * ARC4 test vectors from OpenSSL
19832 */
19833#define ARC4_ENC_TEST_VECTORS 7
19834#define ARC4_DEC_TEST_VECTORS 7
19835
19836static struct cipher_testvec arc4_enc_tv_template[] = {
19837 {
19838 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19839 .klen = 8,
19840 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19841 .ilen = 8,
19842 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
19843 .rlen = 8,
19844 }, {
19845 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19846 .klen = 8,
19847 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
19848 .ilen = 8,
19849 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
19850 .rlen = 8,
19851 }, {
19852 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
19853 .klen = 8,
19854 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
19855 .ilen = 8,
19856 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
19857 .rlen = 8,
19858 }, {
19859 .key = "\xef\x01\x23\x45",
19860 .klen = 4,
19861 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19862 "\x00\x00\x00\x00\x00\x00\x00\x00"
19863 "\x00\x00\x00\x00",
19864 .ilen = 20,
19865 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
19866 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
19867 "\x36\xb6\x78\x58",
19868 .rlen = 20,
19869 }, {
19870 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19871 .klen = 8,
19872 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19873 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19874 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19875 "\x12\x34\x56\x78",
19876 .ilen = 28,
19877 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
19878 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
19879 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
19880 "\x40\x01\x1e\xcf",
19881 .rlen = 28,
19882 }, {
19883 .key = "\xef\x01\x23\x45",
19884 .klen = 4,
19885 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
19886 "\x00\x00",
19887 .ilen = 10,
19888 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
19889 "\xbd\x61",
19890 .rlen = 10,
19891 }, {
19892 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
19893 "\x00\x00\x00\x00\x00\x00\x00\x00",
19894 .klen = 16,
19895 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
19896 .ilen = 8,
19897 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
19898 .rlen = 8,
19899 },
19900};
19901
19902static struct cipher_testvec arc4_dec_tv_template[] = {
19903 {
19904 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19905 .klen = 8,
19906 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
19907 .ilen = 8,
19908 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19909 .rlen = 8,
19910 }, {
19911 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19912 .klen = 8,
19913 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
19914 .ilen = 8,
19915 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
19916 .rlen = 8,
19917 }, {
19918 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
19919 .klen = 8,
19920 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
19921 .ilen = 8,
19922 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
19923 .rlen = 8,
19924 }, {
19925 .key = "\xef\x01\x23\x45",
19926 .klen = 4,
19927 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
19928 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
19929 "\x36\xb6\x78\x58",
19930 .ilen = 20,
19931 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
19932 "\x00\x00\x00\x00\x00\x00\x00\x00"
19933 "\x00\x00\x00\x00",
19934 .rlen = 20,
19935 }, {
19936 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19937 .klen = 8,
19938 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
19939 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
19940 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
19941 "\x40\x01\x1e\xcf",
19942 .ilen = 28,
19943 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19944 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19945 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
19946 "\x12\x34\x56\x78",
19947 .rlen = 28,
19948 }, {
19949 .key = "\xef\x01\x23\x45",
19950 .klen = 4,
19951 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
19952 "\xbd\x61",
19953 .ilen = 10,
19954 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
19955 "\x00\x00",
19956 .rlen = 10,
19957 }, {
19958 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
19959 "\x00\x00\x00\x00\x00\x00\x00\x00",
19960 .klen = 16,
19961 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
19962 .ilen = 8,
19963 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
19964 .rlen = 8,
19965 },
19966};
19967
19968/*
19969 * TEA test vectors
19970 */
19971#define TEA_ENC_TEST_VECTORS 4
19972#define TEA_DEC_TEST_VECTORS 4
19973
19974static struct cipher_testvec tea_enc_tv_template[] = {
19975 {
19976 .key = zeroed_string,
19977 .klen = 16,
19978 .input = zeroed_string,
19979 .ilen = 8,
19980 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
19981 .rlen = 8,
19982 }, {
19983 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
19984 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
19985 .klen = 16,
19986 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
19987 .ilen = 8,
19988 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
19989 .rlen = 8,
19990 }, {
19991 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
19992 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
19993 .klen = 16,
19994 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
19995 "\x65\x73\x74\x5f\x76\x65\x63\x74",
19996 .ilen = 16,
19997 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
19998 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
19999 .rlen = 16,
20000 }, {
20001 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20002 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20003 .klen = 16,
20004 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20005 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20006 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20007 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20008 .ilen = 32,
20009 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
20010 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
20011 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
20012 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
20013 .rlen = 32,
20014 }
20015};
20016
20017static struct cipher_testvec tea_dec_tv_template[] = {
20018 {
20019 .key = zeroed_string,
20020 .klen = 16,
20021 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
20022 .ilen = 8,
20023 .result = zeroed_string,
20024 .rlen = 8,
20025 }, {
20026 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20027 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20028 .klen = 16,
20029 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
20030 .ilen = 8,
20031 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20032 .rlen = 8,
20033 }, {
20034 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20035 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20036 .klen = 16,
20037 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
20038 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
20039 .ilen = 16,
20040 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20041 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20042 .rlen = 16,
20043 }, {
20044 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20045 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20046 .klen = 16,
20047 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
20048 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
20049 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
20050 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
20051 .ilen = 32,
20052 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20053 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20054 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20055 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20056 .rlen = 32,
20057 }
20058};
20059
20060/*
20061 * XTEA test vectors
20062 */
20063#define XTEA_ENC_TEST_VECTORS 4
20064#define XTEA_DEC_TEST_VECTORS 4
20065
20066static struct cipher_testvec xtea_enc_tv_template[] = {
20067 {
20068 .key = zeroed_string,
20069 .klen = 16,
20070 .input = zeroed_string,
20071 .ilen = 8,
20072 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
20073 .rlen = 8,
20074 }, {
20075 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20076 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20077 .klen = 16,
20078 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20079 .ilen = 8,
20080 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
20081 .rlen = 8,
20082 }, {
20083 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20084 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20085 .klen = 16,
20086 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20087 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20088 .ilen = 16,
20089 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
20090 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
20091 .rlen = 16,
20092 }, {
20093 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20094 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20095 .klen = 16,
20096 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20097 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20098 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20099 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20100 .ilen = 32,
20101 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
20102 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
20103 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
20104 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
20105 .rlen = 32,
20106 }
20107};
20108
20109static struct cipher_testvec xtea_dec_tv_template[] = {
20110 {
20111 .key = zeroed_string,
20112 .klen = 16,
20113 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
20114 .ilen = 8,
20115 .result = zeroed_string,
20116 .rlen = 8,
20117 }, {
20118 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20119 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20120 .klen = 16,
20121 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
20122 .ilen = 8,
20123 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20124 .rlen = 8,
20125 }, {
20126 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20127 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20128 .klen = 16,
20129 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
20130 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
20131 .ilen = 16,
20132 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20133 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20134 .rlen = 16,
20135 }, {
20136 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20137 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20138 .klen = 16,
20139 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
20140 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
20141 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
20142 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
20143 .ilen = 32,
20144 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20145 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20146 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20147 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20148 .rlen = 32,
20149 }
20150};
20151
20152/*
20153 * KHAZAD test vectors.
20154 */
20155#define KHAZAD_ENC_TEST_VECTORS 5
20156#define KHAZAD_DEC_TEST_VECTORS 5
20157
20158static struct cipher_testvec khazad_enc_tv_template[] = {
20159 {
20160 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
20161 "\x00\x00\x00\x00\x00\x00\x00\x00",
20162 .klen = 16,
20163 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20164 .ilen = 8,
20165 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
20166 .rlen = 8,
20167 }, {
20168 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
20169 "\x38\x38\x38\x38\x38\x38\x38\x38",
20170 .klen = 16,
20171 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
20172 .ilen = 8,
20173 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
20174 .rlen = 8,
20175 }, {
20176 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
20177 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20178 .klen = 16,
20179 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20180 .ilen = 8,
20181 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
20182 .rlen = 8,
20183 }, {
20184 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20185 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20186 .klen = 16,
20187 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20188 .ilen = 8,
20189 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20190 .rlen = 8,
20191 }, {
20192 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20193 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20194 .klen = 16,
20195 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20196 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20197 .ilen = 16,
20198 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
20199 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20200 .rlen = 16,
20201 },
20202};
20203
20204static struct cipher_testvec khazad_dec_tv_template[] = {
20205 {
20206 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
20207 "\x00\x00\x00\x00\x00\x00\x00\x00",
20208 .klen = 16,
20209 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
20210 .ilen = 8,
20211 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
20212 .rlen = 8,
20213 }, {
20214 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
20215 "\x38\x38\x38\x38\x38\x38\x38\x38",
20216 .klen = 16,
20217 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
20218 .ilen = 8,
20219 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
20220 .rlen = 8,
20221 }, {
20222 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
20223 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20224 .klen = 16,
20225 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
20226 .ilen = 8,
20227 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20228 .rlen = 8,
20229 }, {
20230 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20231 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20232 .klen = 16,
20233 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20234 .ilen = 8,
20235 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20236 .rlen = 8,
20237 }, {
20238 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20239 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20240 .klen = 16,
20241 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
20242 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20243 .ilen = 16,
20244 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20245 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20246 .rlen = 16,
20247 },
20248};
20249
20250/*
20251 * Anubis test vectors.
20252 */
20253
20254#define ANUBIS_ENC_TEST_VECTORS 5
20255#define ANUBIS_DEC_TEST_VECTORS 5
20256#define ANUBIS_CBC_ENC_TEST_VECTORS 2
20257#define ANUBIS_CBC_DEC_TEST_VECTORS 2
20258
20259static struct cipher_testvec anubis_enc_tv_template[] = {
20260 {
20261 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20262 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20263 .klen = 16,
20264 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20265 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20266 .ilen = 16,
20267 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20268 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
20269 .rlen = 16,
20270 }, {
20271
20272 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
20273 "\x03\x03\x03\x03\x03\x03\x03\x03"
20274 "\x03\x03\x03\x03",
20275 .klen = 20,
20276 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
20277 "\x03\x03\x03\x03\x03\x03\x03\x03",
20278 .ilen = 16,
20279 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
20280 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
20281 .rlen = 16,
20282 }, {
20283 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
20284 "\x24\x24\x24\x24\x24\x24\x24\x24"
20285 "\x24\x24\x24\x24\x24\x24\x24\x24"
20286 "\x24\x24\x24\x24",
20287 .klen = 28,
20288 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
20289 "\x24\x24\x24\x24\x24\x24\x24\x24",
20290 .ilen = 16,
20291 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
20292 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
20293 .rlen = 16,
20294 }, {
20295 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
20296 "\x25\x25\x25\x25\x25\x25\x25\x25"
20297 "\x25\x25\x25\x25\x25\x25\x25\x25"
20298 "\x25\x25\x25\x25\x25\x25\x25\x25",
20299 .klen = 32,
20300 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
20301 "\x25\x25\x25\x25\x25\x25\x25\x25",
20302 .ilen = 16,
20303 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
20304 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
20305 .rlen = 16,
20306 }, {
20307 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20308 "\x35\x35\x35\x35\x35\x35\x35\x35"
20309 "\x35\x35\x35\x35\x35\x35\x35\x35"
20310 "\x35\x35\x35\x35\x35\x35\x35\x35"
20311 "\x35\x35\x35\x35\x35\x35\x35\x35",
20312 .klen = 40,
20313 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
20314 "\x35\x35\x35\x35\x35\x35\x35\x35",
20315 .ilen = 16,
20316 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20317 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
20318 .rlen = 16,
20319 },
20320};
20321
20322static struct cipher_testvec anubis_dec_tv_template[] = {
20323 {
20324 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20325 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20326 .klen = 16,
20327 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20328 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
20329 .ilen = 16,
20330 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20331 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20332 .rlen = 16,
20333 }, {
20334
20335 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
20336 "\x03\x03\x03\x03\x03\x03\x03\x03"
20337 "\x03\x03\x03\x03",
20338 .klen = 20,
20339 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
20340 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
20341 .ilen = 16,
20342 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
20343 "\x03\x03\x03\x03\x03\x03\x03\x03",
20344 .rlen = 16,
20345 }, {
20346 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
20347 "\x24\x24\x24\x24\x24\x24\x24\x24"
20348 "\x24\x24\x24\x24\x24\x24\x24\x24"
20349 "\x24\x24\x24\x24",
20350 .klen = 28,
20351 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
20352 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
20353 .ilen = 16,
20354 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
20355 "\x24\x24\x24\x24\x24\x24\x24\x24",
20356 .rlen = 16,
20357 }, {
20358 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
20359 "\x25\x25\x25\x25\x25\x25\x25\x25"
20360 "\x25\x25\x25\x25\x25\x25\x25\x25"
20361 "\x25\x25\x25\x25\x25\x25\x25\x25",
20362 .klen = 32,
20363 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
20364 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
20365 .ilen = 16,
20366 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
20367 "\x25\x25\x25\x25\x25\x25\x25\x25",
20368 .rlen = 16,
20369 }, {
20370 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20371 "\x35\x35\x35\x35\x35\x35\x35\x35"
20372 "\x35\x35\x35\x35\x35\x35\x35\x35"
20373 "\x35\x35\x35\x35\x35\x35\x35\x35"
20374 "\x35\x35\x35\x35\x35\x35\x35\x35",
20375 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20376 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
20377 .klen = 40,
20378 .ilen = 16,
20379 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
20380 "\x35\x35\x35\x35\x35\x35\x35\x35",
20381 .rlen = 16,
20382 },
20383};
20384
20385static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
20386 {
20387 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20388 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20389 .klen = 16,
20390 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20391 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20392 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20393 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20394 .ilen = 32,
20395 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20396 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
20397 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
20398 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
20399 .rlen = 32,
20400 }, {
20401 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20402 "\x35\x35\x35\x35\x35\x35\x35\x35"
20403 "\x35\x35\x35\x35\x35\x35\x35\x35"
20404 "\x35\x35\x35\x35\x35\x35\x35\x35"
20405 "\x35\x35\x35\x35\x35\x35\x35\x35",
20406 .klen = 40,
20407 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
20408 "\x35\x35\x35\x35\x35\x35\x35\x35"
20409 "\x35\x35\x35\x35\x35\x35\x35\x35"
20410 "\x35\x35\x35\x35\x35\x35\x35\x35",
20411 .ilen = 32,
20412 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20413 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
20414 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
20415 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
20416 .rlen = 32,
20417 },
20418};
20419
20420static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
20421 {
20422 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20423 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20424 .klen = 16,
20425 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20426 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
20427 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
20428 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
20429 .ilen = 32,
20430 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20431 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20432 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20433 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20434 .rlen = 32,
20435 }, {
20436 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20437 "\x35\x35\x35\x35\x35\x35\x35\x35"
20438 "\x35\x35\x35\x35\x35\x35\x35\x35"
20439 "\x35\x35\x35\x35\x35\x35\x35\x35"
20440 "\x35\x35\x35\x35\x35\x35\x35\x35",
20441 .klen = 40,
20442 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20443 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
20444 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
20445 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
20446 .ilen = 32,
20447 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
20448 "\x35\x35\x35\x35\x35\x35\x35\x35"
20449 "\x35\x35\x35\x35\x35\x35\x35\x35"
20450 "\x35\x35\x35\x35\x35\x35\x35\x35",
20451 .rlen = 32,
20452 },
20453};
20454
20455/*
20456 * XETA test vectors
20457 */
20458#define XETA_ENC_TEST_VECTORS 4
20459#define XETA_DEC_TEST_VECTORS 4
20460
20461static struct cipher_testvec xeta_enc_tv_template[] = {
20462 {
20463 .key = zeroed_string,
20464 .klen = 16,
20465 .input = zeroed_string,
20466 .ilen = 8,
20467 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
20468 .rlen = 8,
20469 }, {
20470 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20471 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20472 .klen = 16,
20473 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20474 .ilen = 8,
20475 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
20476 .rlen = 8,
20477 }, {
20478 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20479 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20480 .klen = 16,
20481 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20482 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20483 .ilen = 16,
20484 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
20485 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
20486 .rlen = 16,
20487 }, {
20488 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20489 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20490 .klen = 16,
20491 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20492 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20493 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20494 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20495 .ilen = 32,
20496 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
20497 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
20498 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
20499 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
20500 .rlen = 32,
20501 }
20502};
20503
20504static struct cipher_testvec xeta_dec_tv_template[] = {
20505 {
20506 .key = zeroed_string,
20507 .klen = 16,
20508 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
20509 .ilen = 8,
20510 .result = zeroed_string,
20511 .rlen = 8,
20512 }, {
20513 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20514 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20515 .klen = 16,
20516 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
20517 .ilen = 8,
20518 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20519 .rlen = 8,
20520 }, {
20521 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20522 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20523 .klen = 16,
20524 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
20525 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
20526 .ilen = 16,
20527 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20528 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20529 .rlen = 16,
20530 }, {
20531 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20532 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20533 .klen = 16,
20534 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
20535 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
20536 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
20537 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
20538 .ilen = 32,
20539 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20540 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20541 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20542 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20543 .rlen = 32,
20544 }
20545};
20546
20547/*
20548 * FCrypt test vectors
20549 */
20550#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
20551#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
20552
20553static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
20554 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
20555 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20556 .klen = 8,
20557 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20558 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20559 .ilen = 8,
20560 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
20561 .rlen = 8,
20562 }, {
20563 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
20564 .klen = 8,
20565 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20566 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
20567 .ilen = 8,
20568 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
20569 .rlen = 8,
20570 }, { /* From Arla */
20571 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20572 .klen = 8,
20573 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20574 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
20575 .ilen = 48,
20576 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
20577 "\xee\xac\x98\x62\x44\x51\xe4\x84"
20578 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
20579 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
20580 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
20581 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
20582 .rlen = 48,
20583 }, {
20584 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20585 .klen = 8,
20586 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20587 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
20588 .ilen = 48,
20589 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
20590 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
20591 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
20592 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
20593 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
20594 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
20595 .rlen = 48,
20596 }, { /* split-page version */
20597 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20598 .klen = 8,
20599 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20600 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
20601 .ilen = 48,
20602 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
20603 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
20604 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
20605 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
20606 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
20607 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
20608 .rlen = 48,
20609 .np = 2,
20610 .tap = { 20, 28 },
20611 }
20612};
20613
20614static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
20615 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
20616 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20617 .klen = 8,
20618 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20619 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
20620 .ilen = 8,
20621 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
20622 .rlen = 8,
20623 }, {
20624 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
20625 .klen = 8,
20626 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20627 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
20628 .ilen = 8,
20629 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
20630 .rlen = 8,
20631 }, { /* From Arla */
20632 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20633 .klen = 8,
20634 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20635 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
20636 "\xee\xac\x98\x62\x44\x51\xe4\x84"
20637 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
20638 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
20639 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
20640 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
20641 .ilen = 48,
20642 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
20643 .rlen = 48,
20644 }, {
20645 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20646 .klen = 8,
20647 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20648 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
20649 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
20650 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
20651 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
20652 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
20653 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
20654 .ilen = 48,
20655 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
20656 .rlen = 48,
20657 }, { /* split-page version */
20658 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20659 .klen = 8,
20660 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20661 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
20662 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
20663 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
20664 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
20665 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
20666 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
20667 .ilen = 48,
20668 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
20669 .rlen = 48,
20670 .np = 2,
20671 .tap = { 20, 28 },
20672 }
20673};
20674
20675/*
20676 * CAMELLIA test vectors.
20677 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020020678#define CAMELLIA_ENC_TEST_VECTORS 4
20679#define CAMELLIA_DEC_TEST_VECTORS 4
20680#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
20681#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
20682#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
20683#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
20684#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
20685#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
20686#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
20687#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080020688
20689static struct cipher_testvec camellia_enc_tv_template[] = {
20690 {
20691 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20692 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20693 .klen = 16,
20694 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20695 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20696 .ilen = 16,
20697 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
20698 "\x08\x57\x06\x56\x48\xea\xbe\x43",
20699 .rlen = 16,
20700 }, {
20701 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20702 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
20703 "\x00\x11\x22\x33\x44\x55\x66\x77",
20704 .klen = 24,
20705 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20706 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20707 .ilen = 16,
20708 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
20709 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
20710 .rlen = 16,
20711 }, {
20712 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20713 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
20714 "\x00\x11\x22\x33\x44\x55\x66\x77"
20715 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
20716 .klen = 32,
20717 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20718 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20719 .ilen = 16,
20720 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
20721 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
20722 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020723 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020020724 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
20725 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
20726 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
20727 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
20728 .klen = 32,
20729 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
20730 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
20731 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
20732 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
20733 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020734 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
20735 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
20736 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
20737 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
20738 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
20739 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
20740 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
20741 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
20742 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
20743 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
20744 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
20745 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
20746 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
20747 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
20748 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
20749 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
20750 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
20751 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
20752 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
20753 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
20754 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
20755 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
20756 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
20757 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
20758 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
20759 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
20760 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
20761 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
20762 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
20763 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
20764 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
20765 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
20766 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
20767 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
20768 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
20769 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
20770 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
20771 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
20772 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
20773 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
20774 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
20775 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
20776 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
20777 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
20778 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
20779 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
20780 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
20781 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
20782 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
20783 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
20784 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
20785 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
20786 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
20787 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
20788 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
20789 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
20790 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
20791 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020020792 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
20793 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
20794 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
20795 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
20796 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020797 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
20798 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
20799 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
20800 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
20801 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
20802 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
20803 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
20804 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
20805 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
20806 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
20807 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
20808 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
20809 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
20810 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
20811 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
20812 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
20813 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
20814 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
20815 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
20816 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
20817 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
20818 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
20819 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
20820 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
20821 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
20822 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
20823 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
20824 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
20825 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
20826 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
20827 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
20828 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
20829 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
20830 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
20831 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
20832 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
20833 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
20834 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
20835 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
20836 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
20837 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
20838 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
20839 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
20840 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
20841 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
20842 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
20843 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
20844 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
20845 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
20846 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
20847 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
20848 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
20849 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
20850 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
20851 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
20852 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
20853 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
20854 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030020855 .also_non_np = 1,
20856 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020857 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020020858 },
Herbert Xuda7f0332008-07-31 17:08:25 +080020859};
20860
20861static struct cipher_testvec camellia_dec_tv_template[] = {
20862 {
20863 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20864 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20865 .klen = 16,
20866 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
20867 "\x08\x57\x06\x56\x48\xea\xbe\x43",
20868 .ilen = 16,
20869 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20870 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20871 .rlen = 16,
20872 }, {
20873 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20874 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
20875 "\x00\x11\x22\x33\x44\x55\x66\x77",
20876 .klen = 24,
20877 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
20878 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
20879 .ilen = 16,
20880 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20881 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20882 .rlen = 16,
20883 }, {
20884 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20885 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
20886 "\x00\x11\x22\x33\x44\x55\x66\x77"
20887 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
20888 .klen = 32,
20889 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
20890 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
20891 .ilen = 16,
20892 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
20893 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20894 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020895 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020020896 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
20897 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
20898 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
20899 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
20900 .klen = 32,
20901 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
20902 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
20903 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
20904 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
20905 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020906 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
20907 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
20908 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
20909 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
20910 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
20911 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
20912 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
20913 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
20914 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
20915 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
20916 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
20917 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
20918 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
20919 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
20920 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
20921 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
20922 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
20923 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
20924 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
20925 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
20926 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
20927 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
20928 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
20929 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
20930 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
20931 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
20932 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
20933 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
20934 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
20935 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
20936 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
20937 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
20938 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
20939 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
20940 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
20941 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
20942 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
20943 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
20944 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
20945 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
20946 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
20947 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
20948 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
20949 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
20950 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
20951 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
20952 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
20953 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
20954 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
20955 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
20956 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
20957 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
20958 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
20959 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
20960 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
20961 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
20962 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB",
20963 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020020964 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
20965 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
20966 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
20967 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
20968 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030020969 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
20970 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
20971 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
20972 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
20973 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
20974 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
20975 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
20976 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
20977 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
20978 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
20979 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
20980 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
20981 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
20982 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
20983 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
20984 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
20985 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
20986 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
20987 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
20988 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
20989 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
20990 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
20991 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
20992 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
20993 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
20994 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
20995 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
20996 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
20997 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
20998 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
20999 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21000 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21001 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21002 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21003 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21004 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21005 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21006 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21007 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21008 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21009 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21010 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21011 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21012 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21013 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21014 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21015 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21016 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21017 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21018 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21019 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21020 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21021 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21022 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21023 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21024 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21025 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21026 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021027 .also_non_np = 1,
21028 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021029 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020021030 },
Herbert Xuda7f0332008-07-31 17:08:25 +080021031};
21032
21033static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
21034 {
21035 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
21036 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
21037 .klen = 16,
21038 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
21039 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
21040 .input = "Single block msg",
21041 .ilen = 16,
21042 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
21043 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
21044 .rlen = 16,
21045 }, {
21046 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
21047 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
21048 .klen = 16,
21049 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
21050 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
21051 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
21052 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21053 "\x10\x11\x12\x13\x14\x15\x16\x17"
21054 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
21055 .ilen = 32,
21056 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
21057 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
21058 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
21059 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
21060 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021061 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021062 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21063 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21064 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21065 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21066 .klen = 32,
21067 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21068 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21069 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21070 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21071 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21072 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21073 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021074 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21075 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21076 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21077 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21078 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21079 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21080 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21081 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21082 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21083 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21084 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21085 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21086 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21087 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21088 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21089 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21090 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21091 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21092 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21093 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21094 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21095 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21096 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21097 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21098 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21099 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21100 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21101 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21102 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21103 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21104 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21105 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21106 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21107 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21108 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21109 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21110 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21111 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21112 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21113 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21114 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21115 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21116 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21117 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21118 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21119 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21120 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21121 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21122 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21123 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21124 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21125 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21126 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21127 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21128 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21129 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21130 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21131 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021132 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
21133 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
21134 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
21135 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
21136 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021137 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
21138 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
21139 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
21140 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
21141 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
21142 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
21143 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
21144 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
21145 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
21146 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
21147 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
21148 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
21149 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
21150 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
21151 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
21152 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
21153 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
21154 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
21155 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
21156 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
21157 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
21158 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
21159 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
21160 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
21161 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
21162 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
21163 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
21164 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
21165 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
21166 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
21167 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
21168 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
21169 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
21170 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
21171 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
21172 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
21173 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
21174 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
21175 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
21176 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
21177 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
21178 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
21179 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
21180 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
21181 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
21182 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
21183 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
21184 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
21185 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
21186 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
21187 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
21188 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
21189 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
21190 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
21191 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
21192 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
21193 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
21194 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021195 .also_non_np = 1,
21196 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021197 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020021198 },
Herbert Xuda7f0332008-07-31 17:08:25 +080021199};
21200
21201static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
21202 {
21203 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
21204 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
21205 .klen = 16,
21206 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
21207 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
21208 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
21209 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
21210 .ilen = 16,
21211 .result = "Single block msg",
21212 .rlen = 16,
21213 }, {
21214 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
21215 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
21216 .klen = 16,
21217 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
21218 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
21219 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
21220 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
21221 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
21222 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
21223 .ilen = 32,
21224 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
21225 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21226 "\x10\x11\x12\x13\x14\x15\x16\x17"
21227 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
21228 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021229 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021230 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21231 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21232 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21233 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21234 .klen = 32,
21235 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21236 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21237 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
21238 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
21239 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
21240 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
21241 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021242 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
21243 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
21244 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
21245 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
21246 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
21247 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
21248 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
21249 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
21250 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
21251 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
21252 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
21253 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
21254 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
21255 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
21256 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
21257 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
21258 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
21259 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
21260 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
21261 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
21262 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
21263 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
21264 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
21265 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
21266 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
21267 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
21268 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
21269 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
21270 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
21271 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
21272 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
21273 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
21274 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
21275 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
21276 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
21277 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
21278 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
21279 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
21280 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
21281 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
21282 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
21283 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
21284 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
21285 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
21286 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
21287 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
21288 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
21289 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
21290 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
21291 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
21292 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
21293 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
21294 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
21295 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
21296 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
21297 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
21298 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20",
21299 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021300 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21301 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21302 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21303 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21304 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021305 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21306 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21307 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21308 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21309 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21310 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21311 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21312 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21313 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21314 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21315 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21316 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21317 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21318 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21319 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21320 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21321 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21322 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21323 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21324 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21325 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21326 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21327 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21328 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21329 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21330 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21331 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21332 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21333 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21334 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21335 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21336 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21337 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21338 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21339 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21340 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21341 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21342 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21343 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21344 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21345 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21346 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21347 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21348 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21349 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21350 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21351 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21352 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21353 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21354 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21355 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21356 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21357 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21358 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21359 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21360 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21361 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21362 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021363 .also_non_np = 1,
21364 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021365 .tap = { 496 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020021366 },
21367};
21368
21369static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
21370 { /* Generated with Crypto++ */
21371 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21372 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21373 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21374 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21375 .klen = 32,
21376 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21377 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21378 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21379 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21380 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21381 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21382 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021383 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21384 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21385 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21386 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21387 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21388 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21389 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21390 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21391 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21392 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21393 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21394 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21395 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21396 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21397 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21398 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21399 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21400 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21401 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21402 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21403 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21404 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21405 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21406 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21407 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21408 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21409 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21410 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21411 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21412 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21413 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21414 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21415 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21416 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21417 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21418 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21419 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21420 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21421 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21422 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21423 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21424 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21425 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21426 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21427 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21428 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21429 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21430 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21431 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21432 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21433 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21434 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21435 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21436 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21437 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21438 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21439 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21440 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021441 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
21442 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
21443 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
21444 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
21445 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021446 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
21447 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
21448 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
21449 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
21450 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
21451 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
21452 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
21453 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
21454 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
21455 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
21456 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
21457 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
21458 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
21459 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
21460 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
21461 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
21462 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
21463 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
21464 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
21465 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
21466 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
21467 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
21468 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
21469 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
21470 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
21471 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
21472 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
21473 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
21474 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
21475 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
21476 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
21477 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
21478 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
21479 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
21480 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
21481 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
21482 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
21483 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
21484 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
21485 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
21486 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
21487 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
21488 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
21489 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
21490 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
21491 "\x76\x44\x45\xF3\x24\x11\x57\x98"
21492 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
21493 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
21494 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
21495 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
21496 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
21497 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
21498 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
21499 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
21500 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
21501 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
21502 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
21503 .rlen = 496,
21504 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021505 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21506 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21507 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21508 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21509 .klen = 32,
21510 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21511 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21512 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21513 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21514 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21515 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21516 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
21517 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021518 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21519 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21520 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21521 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21522 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21523 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21524 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21525 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21526 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21527 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21528 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21529 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21530 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21531 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21532 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21533 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21534 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21535 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21536 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21537 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21538 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21539 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21540 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21541 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21542 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21543 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21544 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21545 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21546 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21547 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21548 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21549 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21550 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21551 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21552 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21553 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21554 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21555 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21556 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21557 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21558 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21559 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21560 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21561 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21562 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21563 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21564 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21565 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21566 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21567 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21568 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21569 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21570 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21571 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21572 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21573 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
21574 "\x2B\xC2\x59",
21575 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021576 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
21577 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
21578 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
21579 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
21580 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
21581 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021582 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
21583 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
21584 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
21585 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
21586 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
21587 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
21588 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
21589 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
21590 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
21591 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
21592 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
21593 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
21594 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
21595 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
21596 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
21597 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
21598 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
21599 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
21600 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
21601 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
21602 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
21603 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
21604 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
21605 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
21606 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
21607 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
21608 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
21609 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
21610 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
21611 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
21612 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
21613 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
21614 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
21615 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
21616 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
21617 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
21618 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
21619 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
21620 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
21621 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
21622 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
21623 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
21624 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
21625 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
21626 "\x76\x44\x45\xF3\x24\x11\x57\x98"
21627 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
21628 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
21629 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
21630 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
21631 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
21632 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
21633 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
21634 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
21635 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
21636 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
21637 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
21638 "\x93\x11\x1C",
21639 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021640 .also_non_np = 1,
21641 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021642 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030021643 }, { /* Generated with Crypto++ */
21644 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21645 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21646 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21647 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21648 .klen = 32,
21649 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
21650 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
21651 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21652 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21653 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21654 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21655 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
21656 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21657 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21658 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21659 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21660 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21661 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21662 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21663 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21664 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21665 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21666 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21667 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21668 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21669 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21670 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21671 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21672 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21673 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21674 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21675 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21676 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21677 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21678 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21679 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21680 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21681 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21682 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21683 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21684 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21685 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21686 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21687 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21688 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21689 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21690 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21691 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21692 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21693 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21694 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21695 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21696 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21697 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21698 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21699 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21700 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21701 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21702 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21703 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21704 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21705 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21706 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21707 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21708 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21709 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21710 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21711 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21712 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21713 .ilen = 496,
21714 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
21715 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
21716 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
21717 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
21718 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
21719 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
21720 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
21721 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
21722 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
21723 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
21724 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
21725 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
21726 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
21727 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
21728 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
21729 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
21730 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
21731 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
21732 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
21733 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
21734 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
21735 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
21736 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
21737 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
21738 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
21739 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
21740 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
21741 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
21742 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
21743 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
21744 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
21745 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
21746 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
21747 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
21748 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
21749 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
21750 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
21751 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
21752 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
21753 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
21754 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
21755 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
21756 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
21757 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
21758 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
21759 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
21760 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
21761 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
21762 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
21763 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
21764 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
21765 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
21766 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
21767 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
21768 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
21769 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
21770 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
21771 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
21772 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
21773 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
21774 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
21775 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
21776 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021777 },
21778};
21779
21780static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
21781 { /* Generated with Crypto++ */
21782 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21783 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21784 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21785 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21786 .klen = 32,
21787 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21788 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21789 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
21790 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
21791 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
21792 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
21793 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021794 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
21795 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
21796 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
21797 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
21798 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
21799 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
21800 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
21801 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
21802 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
21803 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
21804 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
21805 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
21806 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
21807 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
21808 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
21809 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
21810 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
21811 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
21812 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
21813 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
21814 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
21815 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
21816 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
21817 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
21818 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
21819 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
21820 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
21821 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
21822 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
21823 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
21824 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
21825 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
21826 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
21827 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
21828 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
21829 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
21830 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
21831 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
21832 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
21833 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
21834 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
21835 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
21836 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
21837 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
21838 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
21839 "\x76\x44\x45\xF3\x24\x11\x57\x98"
21840 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
21841 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
21842 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
21843 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
21844 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
21845 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
21846 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
21847 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
21848 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
21849 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
21850 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
21851 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021852 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21853 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21854 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21855 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21856 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021857 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21858 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21859 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21860 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21861 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21862 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21863 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21864 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21865 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21866 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21867 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21868 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21869 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21870 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21871 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21872 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21873 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21874 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21875 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21876 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21877 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21878 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21879 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21880 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21881 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21882 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21883 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21884 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21885 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21886 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21887 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21888 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21889 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21890 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21891 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21892 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21893 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21894 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21895 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21896 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21897 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21898 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21899 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21900 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21901 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21902 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21903 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21904 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21905 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21906 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21907 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21908 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21909 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21910 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21911 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21912 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
21913 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
21914 .rlen = 496,
21915 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021916 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21917 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21918 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21919 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21920 .klen = 32,
21921 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21922 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21923 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
21924 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
21925 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
21926 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
21927 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
21928 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021929 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
21930 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
21931 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
21932 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
21933 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
21934 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
21935 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
21936 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
21937 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
21938 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
21939 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
21940 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
21941 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
21942 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
21943 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
21944 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
21945 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
21946 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
21947 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
21948 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
21949 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
21950 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
21951 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
21952 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
21953 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
21954 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
21955 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
21956 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
21957 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
21958 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
21959 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
21960 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
21961 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
21962 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
21963 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
21964 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
21965 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
21966 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
21967 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
21968 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
21969 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
21970 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
21971 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
21972 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
21973 "\x76\x44\x45\xF3\x24\x11\x57\x98"
21974 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
21975 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
21976 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
21977 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
21978 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
21979 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
21980 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
21981 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
21982 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
21983 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
21984 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
21985 "\x93\x11\x1C",
21986 .ilen = 499,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021987 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21988 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21989 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21990 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21991 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
21992 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021993 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21994 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21995 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21996 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21997 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21998 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21999 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22000 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22001 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22002 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22003 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22004 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22005 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22006 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22007 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22008 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22009 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22010 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22011 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22012 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22013 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22014 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22015 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22016 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22017 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22018 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22019 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22020 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22021 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22022 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22023 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22024 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22025 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22026 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22027 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22028 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22029 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22030 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22031 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22032 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22033 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22034 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22035 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22036 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22037 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22038 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22039 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22040 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22041 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22042 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22043 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22044 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22045 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22046 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22047 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22048 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
22049 "\x2B\xC2\x59",
22050 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022051 .also_non_np = 1,
22052 .np = 2,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022053 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030022054 }, { /* Generated with Crypto++ */
22055 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22056 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22057 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22058 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22059 .klen = 32,
22060 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
22061 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
22062 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
22063 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
22064 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
22065 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
22066 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
22067 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
22068 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
22069 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
22070 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
22071 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
22072 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
22073 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
22074 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
22075 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
22076 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
22077 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
22078 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
22079 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
22080 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
22081 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
22082 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
22083 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
22084 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
22085 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
22086 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
22087 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
22088 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
22089 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
22090 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
22091 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
22092 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
22093 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
22094 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
22095 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
22096 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
22097 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
22098 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
22099 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
22100 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
22101 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
22102 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
22103 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
22104 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
22105 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
22106 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
22107 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
22108 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
22109 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
22110 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
22111 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
22112 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
22113 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
22114 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
22115 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
22116 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
22117 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
22118 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
22119 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
22120 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
22121 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
22122 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
22123 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
22124 .ilen = 496,
22125 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22126 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22127 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22128 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22129 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22130 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22131 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22132 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22133 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22134 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22135 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22136 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22137 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22138 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22139 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22140 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22141 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22142 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22143 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22144 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22145 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22146 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22147 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22148 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22149 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22150 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22151 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22152 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22153 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22154 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22155 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22156 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22157 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22158 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22159 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22160 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22161 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22162 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22163 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22164 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22165 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22166 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22167 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22168 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22169 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22170 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22171 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22172 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22173 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22174 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22175 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22176 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22177 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22178 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22179 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22180 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22181 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22182 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22183 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22184 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22185 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22186 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22187 .rlen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020022188 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020022189};
22190
22191static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
22192 /* Generated from AES-LRW test vectors */
22193 {
22194 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
22195 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
22196 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
22197 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
22198 .klen = 32,
22199 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22200 "\x00\x00\x00\x00\x00\x00\x00\x01",
22201 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22202 "\x38\x39\x41\x42\x43\x44\x45\x46",
22203 .ilen = 16,
22204 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
22205 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
22206 .rlen = 16,
22207 }, {
22208 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
22209 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
22210 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
22211 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
22212 .klen = 32,
22213 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22214 "\x00\x00\x00\x00\x00\x00\x00\x02",
22215 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22216 "\x38\x39\x41\x42\x43\x44\x45\x46",
22217 .ilen = 16,
22218 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
22219 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
22220 .rlen = 16,
22221 }, {
22222 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
22223 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
22224 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
22225 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
22226 .klen = 32,
22227 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22228 "\x00\x00\x00\x02\x00\x00\x00\x00",
22229 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22230 "\x38\x39\x41\x42\x43\x44\x45\x46",
22231 .ilen = 16,
22232 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
22233 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
22234 .rlen = 16,
22235 }, {
22236 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
22237 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
22238 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
22239 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
22240 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
22241 .klen = 40,
22242 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22243 "\x00\x00\x00\x00\x00\x00\x00\x01",
22244 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22245 "\x38\x39\x41\x42\x43\x44\x45\x46",
22246 .ilen = 16,
22247 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
22248 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
22249 .rlen = 16,
22250 }, {
22251 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
22252 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
22253 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
22254 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
22255 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
22256 .klen = 40,
22257 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22258 "\x00\x00\x00\x02\x00\x00\x00\x00",
22259 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22260 "\x38\x39\x41\x42\x43\x44\x45\x46",
22261 .ilen = 16,
22262 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
22263 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
22264 .rlen = 16,
22265 }, {
22266 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
22267 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
22268 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
22269 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
22270 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
22271 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
22272 .klen = 48,
22273 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22274 "\x00\x00\x00\x00\x00\x00\x00\x01",
22275 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22276 "\x38\x39\x41\x42\x43\x44\x45\x46",
22277 .ilen = 16,
22278 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
22279 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
22280 .rlen = 16,
22281 }, {
22282 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
22283 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
22284 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
22285 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
22286 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
22287 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
22288 .klen = 48,
22289 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22290 "\x00\x00\x00\x02\x00\x00\x00\x00",
22291 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
22292 "\x38\x39\x41\x42\x43\x44\x45\x46",
22293 .ilen = 16,
22294 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
22295 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
22296 .rlen = 16,
22297 }, {
22298 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
22299 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
22300 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
22301 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
22302 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
22303 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
22304 .klen = 48,
22305 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22306 "\x00\x00\x00\x00\x00\x00\x00\x01",
22307 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
22308 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
22309 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
22310 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
22311 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
22312 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
22313 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
22314 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
22315 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
22316 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
22317 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
22318 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
22319 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
22320 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
22321 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
22322 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
22323 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
22324 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
22325 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
22326 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
22327 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
22328 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
22329 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
22330 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
22331 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
22332 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
22333 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
22334 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
22335 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
22336 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
22337 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
22338 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
22339 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
22340 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
22341 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
22342 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
22343 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
22344 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
22345 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
22346 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
22347 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
22348 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
22349 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
22350 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
22351 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
22352 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
22353 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
22354 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
22355 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
22356 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
22357 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
22358 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
22359 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
22360 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
22361 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
22362 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
22363 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
22364 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
22365 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
22366 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
22367 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
22368 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
22369 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
22370 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
22371 .ilen = 512,
22372 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
22373 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
22374 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
22375 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
22376 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
22377 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
22378 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
22379 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
22380 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
22381 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
22382 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
22383 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
22384 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
22385 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
22386 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
22387 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
22388 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
22389 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
22390 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
22391 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
22392 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
22393 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
22394 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
22395 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
22396 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
22397 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
22398 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
22399 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
22400 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
22401 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
22402 "\xed\x14\xa9\x57\x19\x63\x40\x04"
22403 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
22404 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
22405 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
22406 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
22407 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
22408 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
22409 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
22410 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
22411 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
22412 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
22413 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
22414 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
22415 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
22416 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
22417 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
22418 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
22419 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
22420 "\x35\xa5\x83\x04\x84\x01\x99\x56"
22421 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
22422 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
22423 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
22424 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
22425 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
22426 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
22427 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
22428 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
22429 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
22430 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
22431 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
22432 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
22433 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
22434 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
22435 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
22436 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022437 .also_non_np = 1,
22438 .np = 2,
22439 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020022440 },
22441};
22442
22443static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
22444 /* Generated from AES-LRW test vectors */
22445 /* same as enc vectors with input and result reversed */
22446 {
22447 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
22448 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
22449 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
22450 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
22451 .klen = 32,
22452 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22453 "\x00\x00\x00\x00\x00\x00\x00\x01",
22454 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
22455 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
22456 .ilen = 16,
22457 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22458 "\x38\x39\x41\x42\x43\x44\x45\x46",
22459 .rlen = 16,
22460 }, {
22461 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
22462 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
22463 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
22464 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
22465 .klen = 32,
22466 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22467 "\x00\x00\x00\x00\x00\x00\x00\x02",
22468 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
22469 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
22470 .ilen = 16,
22471 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22472 "\x38\x39\x41\x42\x43\x44\x45\x46",
22473 .rlen = 16,
22474 }, {
22475 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
22476 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
22477 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
22478 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
22479 .klen = 32,
22480 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22481 "\x00\x00\x00\x02\x00\x00\x00\x00",
22482 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
22483 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
22484 .ilen = 16,
22485 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22486 "\x38\x39\x41\x42\x43\x44\x45\x46",
22487 .rlen = 16,
22488 }, {
22489 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
22490 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
22491 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
22492 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
22493 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
22494 .klen = 40,
22495 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22496 "\x00\x00\x00\x00\x00\x00\x00\x01",
22497 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
22498 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
22499 .ilen = 16,
22500 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22501 "\x38\x39\x41\x42\x43\x44\x45\x46",
22502 .rlen = 16,
22503 }, {
22504 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
22505 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
22506 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
22507 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
22508 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
22509 .klen = 40,
22510 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22511 "\x00\x00\x00\x02\x00\x00\x00\x00",
22512 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
22513 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
22514 .ilen = 16,
22515 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22516 "\x38\x39\x41\x42\x43\x44\x45\x46",
22517 .rlen = 16,
22518 }, {
22519 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
22520 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
22521 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
22522 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
22523 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
22524 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
22525 .klen = 48,
22526 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22527 "\x00\x00\x00\x00\x00\x00\x00\x01",
22528 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
22529 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
22530 .ilen = 16,
22531 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22532 "\x38\x39\x41\x42\x43\x44\x45\x46",
22533 .rlen = 16,
22534 }, {
22535 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
22536 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
22537 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
22538 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
22539 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
22540 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
22541 .klen = 48,
22542 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22543 "\x00\x00\x00\x02\x00\x00\x00\x00",
22544 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
22545 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
22546 .ilen = 16,
22547 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
22548 "\x38\x39\x41\x42\x43\x44\x45\x46",
22549 .rlen = 16,
22550 }, {
22551 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
22552 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
22553 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
22554 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
22555 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
22556 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
22557 .klen = 48,
22558 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22559 "\x00\x00\x00\x00\x00\x00\x00\x01",
22560 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
22561 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
22562 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
22563 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
22564 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
22565 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
22566 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
22567 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
22568 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
22569 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
22570 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
22571 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
22572 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
22573 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
22574 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
22575 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
22576 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
22577 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
22578 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
22579 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
22580 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
22581 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
22582 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
22583 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
22584 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
22585 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
22586 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
22587 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
22588 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
22589 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
22590 "\xed\x14\xa9\x57\x19\x63\x40\x04"
22591 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
22592 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
22593 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
22594 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
22595 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
22596 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
22597 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
22598 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
22599 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
22600 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
22601 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
22602 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
22603 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
22604 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
22605 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
22606 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
22607 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
22608 "\x35\xa5\x83\x04\x84\x01\x99\x56"
22609 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
22610 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
22611 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
22612 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
22613 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
22614 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
22615 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
22616 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
22617 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
22618 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
22619 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
22620 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
22621 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
22622 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
22623 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
22624 .ilen = 512,
22625 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
22626 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
22627 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
22628 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
22629 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
22630 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
22631 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
22632 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
22633 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
22634 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
22635 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
22636 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
22637 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
22638 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
22639 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
22640 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
22641 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
22642 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
22643 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
22644 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
22645 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
22646 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
22647 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
22648 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
22649 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
22650 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
22651 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
22652 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
22653 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
22654 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
22655 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
22656 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
22657 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
22658 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
22659 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
22660 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
22661 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
22662 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
22663 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
22664 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
22665 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
22666 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
22667 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
22668 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
22669 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
22670 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
22671 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
22672 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
22673 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
22674 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
22675 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
22676 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
22677 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
22678 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
22679 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
22680 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
22681 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
22682 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
22683 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
22684 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
22685 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
22686 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
22687 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
22688 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
22689 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022690 .also_non_np = 1,
22691 .np = 2,
22692 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020022693 },
22694};
22695
22696static struct cipher_testvec camellia_xts_enc_tv_template[] = {
22697 /* Generated from AES-XTS test vectors */
22698 {
22699 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
22700 "\x00\x00\x00\x00\x00\x00\x00\x00"
22701 "\x00\x00\x00\x00\x00\x00\x00\x00"
22702 "\x00\x00\x00\x00\x00\x00\x00\x00",
22703 .klen = 32,
22704 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22705 "\x00\x00\x00\x00\x00\x00\x00\x00",
22706 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
22707 "\x00\x00\x00\x00\x00\x00\x00\x00"
22708 "\x00\x00\x00\x00\x00\x00\x00\x00"
22709 "\x00\x00\x00\x00\x00\x00\x00\x00",
22710 .ilen = 32,
22711 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
22712 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
22713 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
22714 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
22715 .rlen = 32,
22716 }, {
22717 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
22718 "\x11\x11\x11\x11\x11\x11\x11\x11"
22719 "\x22\x22\x22\x22\x22\x22\x22\x22"
22720 "\x22\x22\x22\x22\x22\x22\x22\x22",
22721 .klen = 32,
22722 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
22723 "\x00\x00\x00\x00\x00\x00\x00\x00",
22724 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
22725 "\x44\x44\x44\x44\x44\x44\x44\x44"
22726 "\x44\x44\x44\x44\x44\x44\x44\x44"
22727 "\x44\x44\x44\x44\x44\x44\x44\x44",
22728 .ilen = 32,
22729 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
22730 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
22731 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
22732 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
22733 .rlen = 32,
22734 }, {
22735 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
22736 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
22737 "\x22\x22\x22\x22\x22\x22\x22\x22"
22738 "\x22\x22\x22\x22\x22\x22\x22\x22",
22739 .klen = 32,
22740 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
22741 "\x00\x00\x00\x00\x00\x00\x00\x00",
22742 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
22743 "\x44\x44\x44\x44\x44\x44\x44\x44"
22744 "\x44\x44\x44\x44\x44\x44\x44\x44"
22745 "\x44\x44\x44\x44\x44\x44\x44\x44",
22746 .ilen = 32,
22747 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
22748 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
22749 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
22750 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
22751 .rlen = 32,
22752 }, {
22753 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
22754 "\x23\x53\x60\x28\x74\x71\x35\x26"
22755 "\x31\x41\x59\x26\x53\x58\x97\x93"
22756 "\x23\x84\x62\x64\x33\x83\x27\x95",
22757 .klen = 32,
22758 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
22759 "\x00\x00\x00\x00\x00\x00\x00\x00",
22760 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
22761 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22762 "\x10\x11\x12\x13\x14\x15\x16\x17"
22763 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22764 "\x20\x21\x22\x23\x24\x25\x26\x27"
22765 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
22766 "\x30\x31\x32\x33\x34\x35\x36\x37"
22767 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
22768 "\x40\x41\x42\x43\x44\x45\x46\x47"
22769 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
22770 "\x50\x51\x52\x53\x54\x55\x56\x57"
22771 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
22772 "\x60\x61\x62\x63\x64\x65\x66\x67"
22773 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
22774 "\x70\x71\x72\x73\x74\x75\x76\x77"
22775 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
22776 "\x80\x81\x82\x83\x84\x85\x86\x87"
22777 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22778 "\x90\x91\x92\x93\x94\x95\x96\x97"
22779 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
22780 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
22781 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
22782 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
22783 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
22784 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22785 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
22786 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
22787 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
22788 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
22789 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
22790 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
22791 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
22792 "\x00\x01\x02\x03\x04\x05\x06\x07"
22793 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22794 "\x10\x11\x12\x13\x14\x15\x16\x17"
22795 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22796 "\x20\x21\x22\x23\x24\x25\x26\x27"
22797 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
22798 "\x30\x31\x32\x33\x34\x35\x36\x37"
22799 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
22800 "\x40\x41\x42\x43\x44\x45\x46\x47"
22801 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
22802 "\x50\x51\x52\x53\x54\x55\x56\x57"
22803 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
22804 "\x60\x61\x62\x63\x64\x65\x66\x67"
22805 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
22806 "\x70\x71\x72\x73\x74\x75\x76\x77"
22807 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
22808 "\x80\x81\x82\x83\x84\x85\x86\x87"
22809 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22810 "\x90\x91\x92\x93\x94\x95\x96\x97"
22811 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
22812 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
22813 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
22814 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
22815 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
22816 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22817 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
22818 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
22819 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
22820 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
22821 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
22822 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
22823 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
22824 .ilen = 512,
22825 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
22826 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
22827 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
22828 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
22829 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
22830 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
22831 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
22832 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
22833 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
22834 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
22835 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
22836 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
22837 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
22838 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
22839 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
22840 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
22841 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
22842 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
22843 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
22844 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
22845 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
22846 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
22847 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
22848 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
22849 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
22850 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
22851 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
22852 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
22853 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
22854 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
22855 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
22856 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
22857 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
22858 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
22859 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
22860 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
22861 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
22862 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
22863 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
22864 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
22865 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
22866 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
22867 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
22868 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
22869 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
22870 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
22871 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
22872 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
22873 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
22874 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
22875 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
22876 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
22877 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
22878 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
22879 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
22880 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
22881 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
22882 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
22883 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
22884 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
22885 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
22886 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
22887 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
22888 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
22889 .rlen = 512,
22890 }, {
22891 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
22892 "\x23\x53\x60\x28\x74\x71\x35\x26"
22893 "\x62\x49\x77\x57\x24\x70\x93\x69"
22894 "\x99\x59\x57\x49\x66\x96\x76\x27"
22895 "\x31\x41\x59\x26\x53\x58\x97\x93"
22896 "\x23\x84\x62\x64\x33\x83\x27\x95"
22897 "\x02\x88\x41\x97\x16\x93\x99\x37"
22898 "\x51\x05\x82\x09\x74\x94\x45\x92",
22899 .klen = 64,
22900 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
22901 "\x00\x00\x00\x00\x00\x00\x00\x00",
22902 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
22903 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22904 "\x10\x11\x12\x13\x14\x15\x16\x17"
22905 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22906 "\x20\x21\x22\x23\x24\x25\x26\x27"
22907 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
22908 "\x30\x31\x32\x33\x34\x35\x36\x37"
22909 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
22910 "\x40\x41\x42\x43\x44\x45\x46\x47"
22911 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
22912 "\x50\x51\x52\x53\x54\x55\x56\x57"
22913 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
22914 "\x60\x61\x62\x63\x64\x65\x66\x67"
22915 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
22916 "\x70\x71\x72\x73\x74\x75\x76\x77"
22917 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
22918 "\x80\x81\x82\x83\x84\x85\x86\x87"
22919 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22920 "\x90\x91\x92\x93\x94\x95\x96\x97"
22921 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
22922 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
22923 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
22924 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
22925 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
22926 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22927 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
22928 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
22929 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
22930 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
22931 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
22932 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
22933 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
22934 "\x00\x01\x02\x03\x04\x05\x06\x07"
22935 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22936 "\x10\x11\x12\x13\x14\x15\x16\x17"
22937 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
22938 "\x20\x21\x22\x23\x24\x25\x26\x27"
22939 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
22940 "\x30\x31\x32\x33\x34\x35\x36\x37"
22941 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
22942 "\x40\x41\x42\x43\x44\x45\x46\x47"
22943 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
22944 "\x50\x51\x52\x53\x54\x55\x56\x57"
22945 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
22946 "\x60\x61\x62\x63\x64\x65\x66\x67"
22947 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
22948 "\x70\x71\x72\x73\x74\x75\x76\x77"
22949 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
22950 "\x80\x81\x82\x83\x84\x85\x86\x87"
22951 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22952 "\x90\x91\x92\x93\x94\x95\x96\x97"
22953 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
22954 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
22955 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
22956 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
22957 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
22958 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
22959 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
22960 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
22961 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
22962 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
22963 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
22964 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
22965 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
22966 .ilen = 512,
22967 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
22968 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
22969 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
22970 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
22971 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
22972 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
22973 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
22974 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
22975 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
22976 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
22977 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
22978 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
22979 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
22980 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
22981 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
22982 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
22983 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
22984 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
22985 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
22986 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
22987 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
22988 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
22989 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
22990 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
22991 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
22992 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
22993 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
22994 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
22995 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
22996 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
22997 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
22998 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
22999 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
23000 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
23001 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
23002 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
23003 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
23004 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
23005 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
23006 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
23007 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
23008 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
23009 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
23010 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
23011 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
23012 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
23013 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
23014 "\x21\x17\xf8\x59\x15\x24\x64\x22"
23015 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
23016 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
23017 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
23018 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
23019 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
23020 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
23021 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
23022 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
23023 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
23024 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
23025 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
23026 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
23027 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
23028 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
23029 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
23030 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
23031 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023032 .also_non_np = 1,
23033 .np = 2,
23034 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020023035 },
23036};
23037
23038static struct cipher_testvec camellia_xts_dec_tv_template[] = {
23039 /* Generated from AES-XTS test vectors */
23040 /* same as enc vectors with input and result reversed */
23041 {
23042 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23043 "\x00\x00\x00\x00\x00\x00\x00\x00"
23044 "\x00\x00\x00\x00\x00\x00\x00\x00"
23045 "\x00\x00\x00\x00\x00\x00\x00\x00",
23046 .klen = 32,
23047 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23048 "\x00\x00\x00\x00\x00\x00\x00\x00",
23049 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
23050 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
23051 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
23052 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
23053 .ilen = 32,
23054 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
23055 "\x00\x00\x00\x00\x00\x00\x00\x00"
23056 "\x00\x00\x00\x00\x00\x00\x00\x00"
23057 "\x00\x00\x00\x00\x00\x00\x00\x00",
23058 .rlen = 32,
23059 }, {
23060 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
23061 "\x11\x11\x11\x11\x11\x11\x11\x11"
23062 "\x22\x22\x22\x22\x22\x22\x22\x22"
23063 "\x22\x22\x22\x22\x22\x22\x22\x22",
23064 .klen = 32,
23065 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
23066 "\x00\x00\x00\x00\x00\x00\x00\x00",
23067 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
23068 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
23069 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
23070 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
23071 .ilen = 32,
23072 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
23073 "\x44\x44\x44\x44\x44\x44\x44\x44"
23074 "\x44\x44\x44\x44\x44\x44\x44\x44"
23075 "\x44\x44\x44\x44\x44\x44\x44\x44",
23076 .rlen = 32,
23077 }, {
23078 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
23079 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
23080 "\x22\x22\x22\x22\x22\x22\x22\x22"
23081 "\x22\x22\x22\x22\x22\x22\x22\x22",
23082 .klen = 32,
23083 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
23084 "\x00\x00\x00\x00\x00\x00\x00\x00",
23085 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
23086 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
23087 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
23088 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
23089 .ilen = 32,
23090 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
23091 "\x44\x44\x44\x44\x44\x44\x44\x44"
23092 "\x44\x44\x44\x44\x44\x44\x44\x44"
23093 "\x44\x44\x44\x44\x44\x44\x44\x44",
23094 .rlen = 32,
23095 }, {
23096 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
23097 "\x23\x53\x60\x28\x74\x71\x35\x26"
23098 "\x31\x41\x59\x26\x53\x58\x97\x93"
23099 "\x23\x84\x62\x64\x33\x83\x27\x95",
23100 .klen = 32,
23101 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23102 "\x00\x00\x00\x00\x00\x00\x00\x00",
23103 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
23104 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
23105 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
23106 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
23107 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
23108 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
23109 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
23110 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
23111 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
23112 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
23113 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
23114 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
23115 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
23116 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
23117 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
23118 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
23119 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
23120 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
23121 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
23122 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
23123 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
23124 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
23125 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
23126 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
23127 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
23128 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
23129 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
23130 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
23131 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
23132 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
23133 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
23134 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
23135 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
23136 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
23137 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
23138 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
23139 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
23140 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
23141 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
23142 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
23143 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
23144 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
23145 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
23146 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
23147 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
23148 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
23149 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
23150 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
23151 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
23152 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
23153 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
23154 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
23155 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
23156 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
23157 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
23158 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
23159 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
23160 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
23161 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
23162 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
23163 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
23164 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
23165 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
23166 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
23167 .ilen = 512,
23168 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
23169 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23170 "\x10\x11\x12\x13\x14\x15\x16\x17"
23171 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
23172 "\x20\x21\x22\x23\x24\x25\x26\x27"
23173 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
23174 "\x30\x31\x32\x33\x34\x35\x36\x37"
23175 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
23176 "\x40\x41\x42\x43\x44\x45\x46\x47"
23177 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
23178 "\x50\x51\x52\x53\x54\x55\x56\x57"
23179 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
23180 "\x60\x61\x62\x63\x64\x65\x66\x67"
23181 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
23182 "\x70\x71\x72\x73\x74\x75\x76\x77"
23183 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
23184 "\x80\x81\x82\x83\x84\x85\x86\x87"
23185 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23186 "\x90\x91\x92\x93\x94\x95\x96\x97"
23187 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
23188 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
23189 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
23190 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
23191 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
23192 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
23193 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
23194 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
23195 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
23196 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
23197 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
23198 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
23199 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
23200 "\x00\x01\x02\x03\x04\x05\x06\x07"
23201 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23202 "\x10\x11\x12\x13\x14\x15\x16\x17"
23203 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
23204 "\x20\x21\x22\x23\x24\x25\x26\x27"
23205 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
23206 "\x30\x31\x32\x33\x34\x35\x36\x37"
23207 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
23208 "\x40\x41\x42\x43\x44\x45\x46\x47"
23209 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
23210 "\x50\x51\x52\x53\x54\x55\x56\x57"
23211 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
23212 "\x60\x61\x62\x63\x64\x65\x66\x67"
23213 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
23214 "\x70\x71\x72\x73\x74\x75\x76\x77"
23215 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
23216 "\x80\x81\x82\x83\x84\x85\x86\x87"
23217 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23218 "\x90\x91\x92\x93\x94\x95\x96\x97"
23219 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
23220 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
23221 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
23222 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
23223 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
23224 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
23225 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
23226 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
23227 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
23228 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
23229 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
23230 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
23231 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
23232 .rlen = 512,
23233 }, {
23234 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
23235 "\x23\x53\x60\x28\x74\x71\x35\x26"
23236 "\x62\x49\x77\x57\x24\x70\x93\x69"
23237 "\x99\x59\x57\x49\x66\x96\x76\x27"
23238 "\x31\x41\x59\x26\x53\x58\x97\x93"
23239 "\x23\x84\x62\x64\x33\x83\x27\x95"
23240 "\x02\x88\x41\x97\x16\x93\x99\x37"
23241 "\x51\x05\x82\x09\x74\x94\x45\x92",
23242 .klen = 64,
23243 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
23244 "\x00\x00\x00\x00\x00\x00\x00\x00",
23245 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
23246 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
23247 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
23248 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
23249 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
23250 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
23251 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
23252 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
23253 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
23254 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
23255 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
23256 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
23257 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
23258 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
23259 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
23260 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
23261 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
23262 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
23263 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
23264 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
23265 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
23266 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
23267 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
23268 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
23269 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
23270 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
23271 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
23272 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
23273 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
23274 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
23275 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
23276 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
23277 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
23278 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
23279 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
23280 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
23281 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
23282 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
23283 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
23284 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
23285 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
23286 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
23287 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
23288 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
23289 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
23290 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
23291 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
23292 "\x21\x17\xf8\x59\x15\x24\x64\x22"
23293 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
23294 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
23295 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
23296 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
23297 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
23298 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
23299 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
23300 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
23301 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
23302 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
23303 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
23304 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
23305 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
23306 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
23307 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
23308 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
23309 .ilen = 512,
23310 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
23311 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23312 "\x10\x11\x12\x13\x14\x15\x16\x17"
23313 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
23314 "\x20\x21\x22\x23\x24\x25\x26\x27"
23315 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
23316 "\x30\x31\x32\x33\x34\x35\x36\x37"
23317 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
23318 "\x40\x41\x42\x43\x44\x45\x46\x47"
23319 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
23320 "\x50\x51\x52\x53\x54\x55\x56\x57"
23321 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
23322 "\x60\x61\x62\x63\x64\x65\x66\x67"
23323 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
23324 "\x70\x71\x72\x73\x74\x75\x76\x77"
23325 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
23326 "\x80\x81\x82\x83\x84\x85\x86\x87"
23327 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23328 "\x90\x91\x92\x93\x94\x95\x96\x97"
23329 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
23330 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
23331 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
23332 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
23333 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
23334 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
23335 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
23336 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
23337 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
23338 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
23339 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
23340 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
23341 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
23342 "\x00\x01\x02\x03\x04\x05\x06\x07"
23343 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23344 "\x10\x11\x12\x13\x14\x15\x16\x17"
23345 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
23346 "\x20\x21\x22\x23\x24\x25\x26\x27"
23347 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
23348 "\x30\x31\x32\x33\x34\x35\x36\x37"
23349 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
23350 "\x40\x41\x42\x43\x44\x45\x46\x47"
23351 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
23352 "\x50\x51\x52\x53\x54\x55\x56\x57"
23353 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
23354 "\x60\x61\x62\x63\x64\x65\x66\x67"
23355 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
23356 "\x70\x71\x72\x73\x74\x75\x76\x77"
23357 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
23358 "\x80\x81\x82\x83\x84\x85\x86\x87"
23359 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23360 "\x90\x91\x92\x93\x94\x95\x96\x97"
23361 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
23362 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
23363 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
23364 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
23365 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
23366 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
23367 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
23368 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
23369 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
23370 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
23371 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
23372 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
23373 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
23374 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023375 .also_non_np = 1,
23376 .np = 2,
23377 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020023378 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023379};
23380
23381/*
23382 * SEED test vectors
23383 */
23384#define SEED_ENC_TEST_VECTORS 4
23385#define SEED_DEC_TEST_VECTORS 4
23386
23387static struct cipher_testvec seed_enc_tv_template[] = {
23388 {
23389 .key = zeroed_string,
23390 .klen = 16,
23391 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
23392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
23393 .ilen = 16,
23394 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
23395 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
23396 .rlen = 16,
23397 }, {
23398 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23399 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
23400 .klen = 16,
23401 .input = zeroed_string,
23402 .ilen = 16,
23403 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
23404 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
23405 .rlen = 16,
23406 }, {
23407 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
23408 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
23409 .klen = 16,
23410 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
23411 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
23412 .ilen = 16,
23413 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
23414 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
23415 .rlen = 16,
23416 }, {
23417 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
23418 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
23419 .klen = 16,
23420 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
23421 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
23422 .ilen = 16,
23423 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
23424 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
23425 .rlen = 16,
23426 }
23427};
23428
23429static struct cipher_testvec seed_dec_tv_template[] = {
23430 {
23431 .key = zeroed_string,
23432 .klen = 16,
23433 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
23434 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
23435 .ilen = 16,
23436 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
23437 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
23438 .rlen = 16,
23439 }, {
23440 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23441 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
23442 .klen = 16,
23443 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
23444 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
23445 .ilen = 16,
23446 .result = zeroed_string,
23447 .rlen = 16,
23448 }, {
23449 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
23450 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
23451 .klen = 16,
23452 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
23453 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
23454 .ilen = 16,
23455 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
23456 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
23457 .rlen = 16,
23458 }, {
23459 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
23460 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
23461 .klen = 16,
23462 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
23463 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
23464 .ilen = 16,
23465 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
23466 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
23467 .rlen = 16,
23468 }
23469};
23470
23471#define SALSA20_STREAM_ENC_TEST_VECTORS 5
23472static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
23473 /*
23474 * Testvectors from verified.test-vectors submitted to ECRYPT.
23475 * They are truncated to size 39, 64, 111, 129 to test a variety
23476 * of input length.
23477 */
23478 { /* Set 3, vector 0 */
23479 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23480 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
23481 .klen = 16,
23482 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
23483 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23484 "\x00\x00\x00\x00\x00\x00\x00\x00"
23485 "\x00\x00\x00\x00\x00\x00\x00\x00"
23486 "\x00\x00\x00\x00\x00\x00\x00\x00"
23487 "\x00\x00\x00\x00\x00\x00\x00",
23488 .ilen = 39,
23489 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
23490 "\x68\x02\x41\x0C\x68\x86\x88\x89"
23491 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
23492 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
23493 "\x58\x3F\x52\x79\x70\xEB\xC1",
23494 .rlen = 39,
23495 }, { /* Set 5, vector 0 */
23496 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23497 "\x00\x00\x00\x00\x00\x00\x00\x00",
23498 .klen = 16,
23499 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
23500 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23501 "\x00\x00\x00\x00\x00\x00\x00\x00"
23502 "\x00\x00\x00\x00\x00\x00\x00\x00"
23503 "\x00\x00\x00\x00\x00\x00\x00\x00"
23504 "\x00\x00\x00\x00\x00\x00\x00\x00"
23505 "\x00\x00\x00\x00\x00\x00\x00\x00"
23506 "\x00\x00\x00\x00\x00\x00\x00\x00"
23507 "\x00\x00\x00\x00\x00\x00\x00\x00",
23508 .ilen = 64,
23509 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
23510 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
23511 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
23512 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
23513 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
23514 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
23515 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
23516 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
23517 .rlen = 64,
23518 }, { /* Set 3, vector 27 */
23519 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
23520 "\x23\x24\x25\x26\x27\x28\x29\x2A"
23521 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
23522 "\x33\x34\x35\x36\x37\x38\x39\x3A",
23523 .klen = 32,
23524 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
23525 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23526 "\x00\x00\x00\x00\x00\x00\x00\x00"
23527 "\x00\x00\x00\x00\x00\x00\x00\x00"
23528 "\x00\x00\x00\x00\x00\x00\x00\x00"
23529 "\x00\x00\x00\x00\x00\x00\x00\x00"
23530 "\x00\x00\x00\x00\x00\x00\x00\x00"
23531 "\x00\x00\x00\x00\x00\x00\x00\x00"
23532 "\x00\x00\x00\x00\x00\x00\x00\x00"
23533 "\x00\x00\x00\x00\x00\x00\x00\x00"
23534 "\x00\x00\x00\x00\x00\x00\x00\x00"
23535 "\x00\x00\x00\x00\x00\x00\x00\x00"
23536 "\x00\x00\x00\x00\x00\x00\x00\x00"
23537 "\x00\x00\x00\x00\x00\x00\x00\x00"
23538 "\x00\x00\x00\x00\x00\x00\x00",
23539 .ilen = 111,
23540 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
23541 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
23542 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
23543 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
23544 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
23545 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
23546 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
23547 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
23548 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
23549 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
23550 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
23551 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
23552 "\x95\x46\x45\x54\xE9\x75\x03\x08"
23553 "\x44\xAF\xE5\x8A\x81\x12\x09",
23554 .rlen = 111,
23555 }, { /* Set 5, vector 27 */
23556 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
23557 "\x00\x00\x00\x00\x00\x00\x00\x00"
23558 "\x00\x00\x00\x00\x00\x00\x00\x00"
23559 "\x00\x00\x00\x00\x00\x00\x00\x00",
23560 .klen = 32,
23561 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
23562 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23563 "\x00\x00\x00\x00\x00\x00\x00\x00"
23564 "\x00\x00\x00\x00\x00\x00\x00\x00"
23565 "\x00\x00\x00\x00\x00\x00\x00\x00"
23566 "\x00\x00\x00\x00\x00\x00\x00\x00"
23567 "\x00\x00\x00\x00\x00\x00\x00\x00"
23568 "\x00\x00\x00\x00\x00\x00\x00\x00"
23569 "\x00\x00\x00\x00\x00\x00\x00\x00"
23570 "\x00\x00\x00\x00\x00\x00\x00\x00"
23571 "\x00\x00\x00\x00\x00\x00\x00\x00"
23572 "\x00\x00\x00\x00\x00\x00\x00\x00"
23573 "\x00\x00\x00\x00\x00\x00\x00\x00"
23574 "\x00\x00\x00\x00\x00\x00\x00\x00"
23575 "\x00\x00\x00\x00\x00\x00\x00\x00"
23576 "\x00\x00\x00\x00\x00\x00\x00\x00"
23577 "\x00\x00\x00\x00\x00\x00\x00\x00"
23578 "\x00",
23579 .ilen = 129,
23580 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
23581 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
23582 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
23583 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
23584 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
23585 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
23586 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
23587 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
23588 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
23589 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
23590 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
23591 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
23592 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
23593 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
23594 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
23595 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
23596 "\x5A",
23597 .rlen = 129,
23598 }, { /* large test vector generated using Crypto++ */
23599 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
23600 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23601 "\x10\x11\x12\x13\x14\x15\x16\x17"
23602 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
23603 .klen = 32,
23604 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23605 "\x00\x00\x00\x00\x00\x00\x00\x00",
23606 .input =
23607 "\x00\x01\x02\x03\x04\x05\x06\x07"
23608 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
23609 "\x10\x11\x12\x13\x14\x15\x16\x17"
23610 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
23611 "\x20\x21\x22\x23\x24\x25\x26\x27"
23612 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
23613 "\x30\x31\x32\x33\x34\x35\x36\x37"
23614 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
23615 "\x40\x41\x42\x43\x44\x45\x46\x47"
23616 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
23617 "\x50\x51\x52\x53\x54\x55\x56\x57"
23618 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
23619 "\x60\x61\x62\x63\x64\x65\x66\x67"
23620 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
23621 "\x70\x71\x72\x73\x74\x75\x76\x77"
23622 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
23623 "\x80\x81\x82\x83\x84\x85\x86\x87"
23624 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23625 "\x90\x91\x92\x93\x94\x95\x96\x97"
23626 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
23627 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
23628 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
23629 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
23630 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
23631 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
23632 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
23633 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
23634 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
23635 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
23636 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
23637 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
23638 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
23639 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
23640 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
23641 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
23642 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
23643 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
23644 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
23645 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
23646 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
23647 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
23648 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
23649 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
23650 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
23651 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
23652 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
23653 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
23654 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
23655 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
23656 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
23657 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
23658 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
23659 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
23660 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
23661 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
23662 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
23663 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
23664 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
23665 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
23666 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
23667 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
23668 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
23669 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
23670 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
23671 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
23672 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
23673 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
23674 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
23675 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
23676 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
23677 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
23678 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
23679 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
23680 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
23681 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
23682 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
23683 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
23684 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
23685 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
23686 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
23687 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
23688 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
23689 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
23690 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
23691 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
23692 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
23693 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
23694 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
23695 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
23696 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
23697 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
23698 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
23699 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
23700 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
23701 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
23702 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
23703 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
23704 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
23705 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
23706 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
23707 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
23708 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
23709 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
23710 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
23711 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
23712 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
23713 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
23714 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
23715 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
23716 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
23717 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
23718 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
23719 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
23720 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
23721 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
23722 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
23723 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
23724 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
23725 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
23726 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
23727 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
23728 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
23729 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
23730 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
23731 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
23732 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
23733 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
23734 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
23735 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
23736 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
23737 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
23738 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
23739 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
23740 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
23741 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
23742 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
23743 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
23744 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
23745 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
23746 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
23747 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
23748 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
23749 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
23750 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
23751 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
23752 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
23753 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
23754 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
23755 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
23756 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
23757 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
23758 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
23759 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
23760 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
23761 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
23762 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
23763 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
23764 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
23765 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
23766 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
23767 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
23768 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
23769 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
23770 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
23771 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
23772 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
23773 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
23774 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
23775 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
23776 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
23777 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
23778 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
23779 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
23780 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
23781 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
23782 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
23783 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
23784 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
23785 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
23786 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
23787 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
23788 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
23789 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
23790 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
23791 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
23792 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
23793 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
23794 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
23795 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
23796 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
23797 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
23798 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
23799 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
23800 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
23801 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
23802 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
23803 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
23804 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
23805 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
23806 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
23807 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
23808 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
23809 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
23810 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
23811 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
23812 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
23813 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
23814 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
23815 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
23816 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
23817 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
23818 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
23819 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
23820 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
23821 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
23822 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
23823 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
23824 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
23825 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
23826 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
23827 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
23828 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
23829 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
23830 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
23831 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
23832 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
23833 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
23834 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
23835 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
23836 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
23837 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
23838 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
23839 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
23840 "\x38\x47\x56\x65\x74\x83\x92\xa1"
23841 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
23842 "\x28\x37\x46\x55\x64\x73\x82\x91"
23843 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
23844 "\x18\x27\x36\x45\x54\x63\x72\x81"
23845 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
23846 "\x08\x17\x26\x35\x44\x53\x62\x71"
23847 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
23848 "\xf8\x07\x16\x25\x34\x43\x52\x61"
23849 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
23850 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
23851 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
23852 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
23853 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
23854 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
23855 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
23856 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
23857 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
23858 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
23859 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
23860 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
23861 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
23862 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
23863 "\x00\x11\x22\x33\x44\x55\x66\x77"
23864 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
23865 "\x10\x21\x32\x43\x54\x65\x76\x87"
23866 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
23867 "\x20\x31\x42\x53\x64\x75\x86\x97"
23868 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
23869 "\x30\x41\x52\x63\x74\x85\x96\xa7"
23870 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
23871 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
23872 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
23873 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
23874 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
23875 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
23876 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
23877 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
23878 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
23879 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
23880 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
23881 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
23882 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
23883 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
23884 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
23885 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
23886 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
23887 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
23888 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
23889 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
23890 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
23891 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
23892 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
23893 "\xf0\x01\x12\x23\x34\x45\x56\x67"
23894 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
23895 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
23896 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
23897 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
23898 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
23899 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
23900 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
23901 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
23902 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
23903 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
23904 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
23905 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
23906 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
23907 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
23908 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
23909 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
23910 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
23911 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
23912 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
23913 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
23914 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
23915 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
23916 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
23917 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
23918 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
23919 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
23920 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
23921 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
23922 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
23923 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
23924 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
23925 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
23926 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
23927 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
23928 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
23929 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
23930 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
23931 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
23932 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
23933 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
23934 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
23935 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
23936 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
23937 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
23938 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
23939 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
23940 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
23941 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
23942 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
23943 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
23944 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
23945 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
23946 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
23947 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
23948 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
23949 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
23950 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
23951 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
23952 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
23953 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
23954 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
23955 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
23956 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
23957 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
23958 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
23959 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
23960 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
23961 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
23962 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
23963 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
23964 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
23965 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
23966 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
23967 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
23968 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
23969 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
23970 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
23971 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
23972 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
23973 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
23974 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
23975 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
23976 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
23977 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
23978 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
23979 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
23980 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
23981 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
23982 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
23983 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
23984 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
23985 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
23986 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
23987 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
23988 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
23989 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
23990 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
23991 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
23992 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
23993 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
23994 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
23995 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
23996 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
23997 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
23998 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
23999 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
24000 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
24001 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
24002 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
24003 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
24004 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
24005 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
24006 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
24007 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
24008 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
24009 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
24010 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
24011 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
24012 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
24013 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
24014 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
24015 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
24016 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
24017 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
24018 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
24019 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
24020 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
24021 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
24022 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
24023 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
24024 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
24025 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
24026 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
24027 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
24028 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
24029 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
24030 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
24031 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
24032 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
24033 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
24034 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
24035 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
24036 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
24037 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
24038 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
24039 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
24040 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
24041 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
24042 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
24043 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
24044 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
24045 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
24046 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
24047 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
24048 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
24049 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
24050 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
24051 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
24052 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
24053 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
24054 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
24055 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
24056 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
24057 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
24058 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
24059 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
24060 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
24061 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
24062 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
24063 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
24064 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
24065 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
24066 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
24067 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
24068 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
24069 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
24070 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
24071 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
24072 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
24073 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
24074 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
24075 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
24076 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
24077 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
24078 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
24079 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
24080 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
24081 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
24082 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
24083 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
24084 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
24085 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
24086 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
24087 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
24088 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
24089 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
24090 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
24091 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
24092 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
24093 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
24094 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
24095 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
24096 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
24097 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
24098 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
24099 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
24100 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
24101 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
24102 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
24103 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
24104 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
24105 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
24106 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
24107 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
24108 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
24109 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
24110 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
24111 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
24112 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
24113 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
24114 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
24115 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
24116 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
24117 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
24118 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
24119 "\x00\x21\x42\x63",
24120 .ilen = 4100,
24121 .result =
24122 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
24123 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
24124 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
24125 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
24126 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
24127 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
24128 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
24129 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
24130 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
24131 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
24132 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
24133 "\xbb\xde\x56\x86\xab\x65\x21\x30"
24134 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
24135 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
24136 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
24137 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
24138 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
24139 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
24140 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
24141 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
24142 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
24143 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
24144 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
24145 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
24146 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
24147 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
24148 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
24149 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
24150 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
24151 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
24152 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
24153 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
24154 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
24155 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
24156 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
24157 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
24158 "\x62\x08\x18\x7a\x25\x49\x28\xac"
24159 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
24160 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
24161 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
24162 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
24163 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
24164 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
24165 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
24166 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
24167 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
24168 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
24169 "\x33\xee\x14\x19\x22\x52\x89\xa7"
24170 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
24171 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
24172 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
24173 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
24174 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
24175 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
24176 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
24177 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
24178 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
24179 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
24180 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
24181 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
24182 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
24183 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
24184 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
24185 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
24186 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
24187 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
24188 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
24189 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
24190 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
24191 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
24192 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
24193 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
24194 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
24195 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
24196 "\x49\x97\x33\xab\x36\x14\x0a\x70"
24197 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
24198 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
24199 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
24200 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
24201 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
24202 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
24203 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
24204 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
24205 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
24206 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
24207 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
24208 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
24209 "\xad\x04\x07\xae\x22\x90\x4a\x93"
24210 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
24211 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
24212 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
24213 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
24214 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
24215 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
24216 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
24217 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
24218 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
24219 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
24220 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
24221 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
24222 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
24223 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
24224 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
24225 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
24226 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
24227 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
24228 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
24229 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
24230 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
24231 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
24232 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
24233 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
24234 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
24235 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
24236 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
24237 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
24238 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
24239 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
24240 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
24241 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
24242 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
24243 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
24244 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
24245 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
24246 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
24247 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
24248 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
24249 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
24250 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
24251 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
24252 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
24253 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
24254 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
24255 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
24256 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
24257 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
24258 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
24259 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
24260 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
24261 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
24262 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
24263 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
24264 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
24265 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
24266 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
24267 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
24268 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
24269 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
24270 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
24271 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
24272 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
24273 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
24274 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
24275 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
24276 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
24277 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
24278 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
24279 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
24280 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
24281 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
24282 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
24283 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
24284 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
24285 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
24286 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
24287 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
24288 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
24289 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
24290 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
24291 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
24292 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
24293 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
24294 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
24295 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
24296 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
24297 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
24298 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
24299 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
24300 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
24301 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
24302 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
24303 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
24304 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
24305 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
24306 "\x2e\x53\x49\x97\x94\x33\xae\x40"
24307 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
24308 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
24309 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
24310 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
24311 "\xce\x87\xad\xcc\x72\x05\x00\x29"
24312 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
24313 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
24314 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
24315 "\xac\xc0\x79\x50\x69\xca\x59\x32"
24316 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
24317 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
24318 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
24319 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
24320 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
24321 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
24322 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
24323 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
24324 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
24325 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
24326 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
24327 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
24328 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
24329 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
24330 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
24331 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
24332 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
24333 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
24334 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
24335 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
24336 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
24337 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
24338 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
24339 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
24340 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
24341 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
24342 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
24343 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
24344 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
24345 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
24346 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
24347 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
24348 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
24349 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
24350 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
24351 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
24352 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
24353 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
24354 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
24355 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
24356 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
24357 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
24358 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
24359 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
24360 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
24361 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
24362 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
24363 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
24364 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
24365 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
24366 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
24367 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
24368 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
24369 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
24370 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
24371 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
24372 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
24373 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
24374 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
24375 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
24376 "\x38\x55\xab\x33\x26\xef\x9f\x43"
24377 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
24378 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
24379 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
24380 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
24381 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
24382 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
24383 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
24384 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
24385 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
24386 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
24387 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
24388 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
24389 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
24390 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
24391 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
24392 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
24393 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
24394 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
24395 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
24396 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
24397 "\x62\x36\x43\xb2\x82\x15\x75\x50"
24398 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
24399 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
24400 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
24401 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
24402 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
24403 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
24404 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
24405 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
24406 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
24407 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
24408 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
24409 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
24410 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
24411 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
24412 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
24413 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
24414 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
24415 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
24416 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
24417 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
24418 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
24419 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
24420 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
24421 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
24422 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
24423 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
24424 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
24425 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
24426 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
24427 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
24428 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
24429 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
24430 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
24431 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
24432 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
24433 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
24434 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
24435 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
24436 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
24437 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
24438 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
24439 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
24440 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
24441 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
24442 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
24443 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
24444 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
24445 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
24446 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
24447 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
24448 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
24449 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
24450 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
24451 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
24452 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
24453 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
24454 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
24455 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
24456 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
24457 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
24458 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
24459 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
24460 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
24461 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
24462 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
24463 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
24464 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
24465 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
24466 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
24467 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
24468 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
24469 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
24470 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
24471 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
24472 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
24473 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
24474 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
24475 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
24476 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
24477 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
24478 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
24479 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
24480 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
24481 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
24482 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
24483 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
24484 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
24485 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
24486 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
24487 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
24488 "\x73\x2e\x71\x79\x16\x06\x63\x28"
24489 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
24490 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
24491 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
24492 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
24493 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
24494 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
24495 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
24496 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
24497 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
24498 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
24499 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
24500 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
24501 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
24502 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
24503 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
24504 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
24505 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
24506 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
24507 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
24508 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
24509 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
24510 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
24511 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
24512 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
24513 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
24514 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
24515 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
24516 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
24517 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
24518 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
24519 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
24520 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
24521 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
24522 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
24523 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
24524 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
24525 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
24526 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
24527 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
24528 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
24529 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
24530 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
24531 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
24532 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
24533 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
24534 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
24535 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
24536 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
24537 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
24538 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
24539 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
24540 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
24541 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
24542 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
24543 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
24544 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
24545 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
24546 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
24547 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
24548 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
24549 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
24550 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
24551 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
24552 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
24553 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
24554 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
24555 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
24556 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
24557 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
24558 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
24559 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
24560 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
24561 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
24562 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
24563 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
24564 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
24565 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
24566 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
24567 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
24568 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
24569 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
24570 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
24571 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
24572 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
24573 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
24574 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
24575 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
24576 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
24577 "\x85\x73\x78\x45\x20\x7f\xae\x13"
24578 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
24579 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
24580 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
24581 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
24582 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
24583 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
24584 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
24585 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
24586 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
24587 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
24588 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
24589 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
24590 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
24591 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
24592 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
24593 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
24594 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
24595 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
24596 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
24597 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
24598 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
24599 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
24600 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
24601 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
24602 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
24603 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
24604 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
24605 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
24606 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
24607 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
24608 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
24609 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
24610 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
24611 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
24612 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
24613 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
24614 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
24615 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
24616 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
24617 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
24618 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
24619 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
24620 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
24621 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
24622 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
24623 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
24624 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
24625 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
24626 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
24627 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
24628 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
24629 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
24630 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
24631 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
24632 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
24633 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
24634 "\xaf\xdf\x11\x95",
24635 .rlen = 4100,
24636 .np = 2,
24637 .tap = { 4064, 36 },
24638 },
24639};
24640
24641/*
24642 * CTS (Cipher Text Stealing) mode tests
24643 */
24644#define CTS_MODE_ENC_TEST_VECTORS 6
24645#define CTS_MODE_DEC_TEST_VECTORS 6
24646static struct cipher_testvec cts_mode_enc_tv_template[] = {
24647 { /* from rfc3962 */
24648 .klen = 16,
24649 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24650 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24651 .ilen = 17,
24652 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24653 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24654 "\x20",
24655 .rlen = 17,
24656 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
24657 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
24658 "\x97",
24659 }, {
24660 .klen = 16,
24661 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24662 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24663 .ilen = 31,
24664 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24665 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24666 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24667 "\x20\x47\x61\x75\x27\x73\x20",
24668 .rlen = 31,
24669 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
24670 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
24671 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24672 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
24673 }, {
24674 .klen = 16,
24675 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24676 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24677 .ilen = 32,
24678 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24679 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24680 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24681 "\x20\x47\x61\x75\x27\x73\x20\x43",
24682 .rlen = 32,
24683 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24684 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
24685 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24686 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
24687 }, {
24688 .klen = 16,
24689 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24690 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24691 .ilen = 47,
24692 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24693 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24694 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24695 "\x20\x47\x61\x75\x27\x73\x20\x43"
24696 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24697 "\x70\x6c\x65\x61\x73\x65\x2c",
24698 .rlen = 47,
24699 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24700 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24701 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
24702 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
24703 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24704 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
24705 }, {
24706 .klen = 16,
24707 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24708 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24709 .ilen = 48,
24710 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24711 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24712 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24713 "\x20\x47\x61\x75\x27\x73\x20\x43"
24714 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24715 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
24716 .rlen = 48,
24717 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24718 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24719 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
24720 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
24721 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24722 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
24723 }, {
24724 .klen = 16,
24725 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24726 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24727 .ilen = 64,
24728 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24729 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24730 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24731 "\x20\x47\x61\x75\x27\x73\x20\x43"
24732 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24733 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
24734 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
24735 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
24736 .rlen = 64,
24737 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24738 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24739 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24740 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
24741 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
24742 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
24743 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
24744 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
24745 }
24746};
24747
24748static struct cipher_testvec cts_mode_dec_tv_template[] = {
24749 { /* from rfc3962 */
24750 .klen = 16,
24751 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24752 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24753 .rlen = 17,
24754 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24755 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24756 "\x20",
24757 .ilen = 17,
24758 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
24759 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
24760 "\x97",
24761 }, {
24762 .klen = 16,
24763 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24764 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24765 .rlen = 31,
24766 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24767 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24768 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24769 "\x20\x47\x61\x75\x27\x73\x20",
24770 .ilen = 31,
24771 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
24772 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
24773 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24774 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
24775 }, {
24776 .klen = 16,
24777 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24778 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24779 .rlen = 32,
24780 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24781 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24782 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24783 "\x20\x47\x61\x75\x27\x73\x20\x43",
24784 .ilen = 32,
24785 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24786 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
24787 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24788 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
24789 }, {
24790 .klen = 16,
24791 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24792 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24793 .rlen = 47,
24794 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24795 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24796 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24797 "\x20\x47\x61\x75\x27\x73\x20\x43"
24798 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24799 "\x70\x6c\x65\x61\x73\x65\x2c",
24800 .ilen = 47,
24801 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24802 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24803 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
24804 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
24805 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24806 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
24807 }, {
24808 .klen = 16,
24809 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24810 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24811 .rlen = 48,
24812 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24813 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24814 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24815 "\x20\x47\x61\x75\x27\x73\x20\x43"
24816 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24817 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
24818 .ilen = 48,
24819 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24820 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24821 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
24822 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
24823 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24824 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
24825 }, {
24826 .klen = 16,
24827 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
24828 "\x74\x65\x72\x69\x79\x61\x6b\x69",
24829 .rlen = 64,
24830 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
24831 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
24832 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
24833 "\x20\x47\x61\x75\x27\x73\x20\x43"
24834 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
24835 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
24836 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
24837 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
24838 .ilen = 64,
24839 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
24840 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
24841 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
24842 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
24843 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
24844 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
24845 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
24846 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
24847 }
24848};
24849
24850/*
24851 * Compression stuff.
24852 */
24853#define COMP_BUF_SIZE 512
24854
24855struct comp_testvec {
24856 int inlen, outlen;
24857 char input[COMP_BUF_SIZE];
24858 char output[COMP_BUF_SIZE];
24859};
24860
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080024861struct pcomp_testvec {
24862 void *params;
24863 unsigned int paramsize;
24864 int inlen, outlen;
24865 char input[COMP_BUF_SIZE];
24866 char output[COMP_BUF_SIZE];
24867};
24868
Herbert Xuda7f0332008-07-31 17:08:25 +080024869/*
24870 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110024871 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080024872 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080024873
Herbert Xuda7f0332008-07-31 17:08:25 +080024874#define DEFLATE_COMP_TEST_VECTORS 2
24875#define DEFLATE_DECOMP_TEST_VECTORS 2
24876
24877static struct comp_testvec deflate_comp_tv_template[] = {
24878 {
24879 .inlen = 70,
24880 .outlen = 38,
24881 .input = "Join us now and share the software "
24882 "Join us now and share the software ",
24883 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
24884 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
24885 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
24886 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
24887 "\x71\xbc\x08\x2b\x01\x00",
24888 }, {
24889 .inlen = 191,
24890 .outlen = 122,
24891 .input = "This document describes a compression method based on the DEFLATE"
24892 "compression algorithm. This document defines the application of "
24893 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
24894 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
24895 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
24896 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
24897 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
24898 "\x68\x12\x51\xae\x76\x67\xd6\x27"
24899 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
24900 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
24901 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
24902 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
24903 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
24904 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
24905 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
24906 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
24907 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
24908 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
24909 "\xfa\x02",
24910 },
24911};
24912
24913static struct comp_testvec deflate_decomp_tv_template[] = {
24914 {
24915 .inlen = 122,
24916 .outlen = 191,
24917 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
24918 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
24919 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
24920 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
24921 "\x68\x12\x51\xae\x76\x67\xd6\x27"
24922 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
24923 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
24924 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
24925 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
24926 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
24927 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
24928 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
24929 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
24930 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
24931 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
24932 "\xfa\x02",
24933 .output = "This document describes a compression method based on the DEFLATE"
24934 "compression algorithm. This document defines the application of "
24935 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
24936 }, {
24937 .inlen = 38,
24938 .outlen = 70,
24939 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
24940 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
24941 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
24942 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
24943 "\x71\xbc\x08\x2b\x01\x00",
24944 .output = "Join us now and share the software "
24945 "Join us now and share the software ",
24946 },
24947};
24948
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080024949#define ZLIB_COMP_TEST_VECTORS 2
24950#define ZLIB_DECOMP_TEST_VECTORS 2
24951
24952static const struct {
24953 struct nlattr nla;
24954 int val;
24955} deflate_comp_params[] = {
24956 {
24957 .nla = {
24958 .nla_len = NLA_HDRLEN + sizeof(int),
24959 .nla_type = ZLIB_COMP_LEVEL,
24960 },
24961 .val = Z_DEFAULT_COMPRESSION,
24962 }, {
24963 .nla = {
24964 .nla_len = NLA_HDRLEN + sizeof(int),
24965 .nla_type = ZLIB_COMP_METHOD,
24966 },
24967 .val = Z_DEFLATED,
24968 }, {
24969 .nla = {
24970 .nla_len = NLA_HDRLEN + sizeof(int),
24971 .nla_type = ZLIB_COMP_WINDOWBITS,
24972 },
24973 .val = -11,
24974 }, {
24975 .nla = {
24976 .nla_len = NLA_HDRLEN + sizeof(int),
24977 .nla_type = ZLIB_COMP_MEMLEVEL,
24978 },
24979 .val = MAX_MEM_LEVEL,
24980 }, {
24981 .nla = {
24982 .nla_len = NLA_HDRLEN + sizeof(int),
24983 .nla_type = ZLIB_COMP_STRATEGY,
24984 },
24985 .val = Z_DEFAULT_STRATEGY,
24986 }
24987};
24988
24989static const struct {
24990 struct nlattr nla;
24991 int val;
24992} deflate_decomp_params[] = {
24993 {
24994 .nla = {
24995 .nla_len = NLA_HDRLEN + sizeof(int),
24996 .nla_type = ZLIB_DECOMP_WINDOWBITS,
24997 },
24998 .val = -11,
24999 }
25000};
25001
25002static struct pcomp_testvec zlib_comp_tv_template[] = {
25003 {
25004 .params = &deflate_comp_params,
25005 .paramsize = sizeof(deflate_comp_params),
25006 .inlen = 70,
25007 .outlen = 38,
25008 .input = "Join us now and share the software "
25009 "Join us now and share the software ",
25010 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
25011 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
25012 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
25013 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
25014 "\x71\xbc\x08\x2b\x01\x00",
25015 }, {
25016 .params = &deflate_comp_params,
25017 .paramsize = sizeof(deflate_comp_params),
25018 .inlen = 191,
25019 .outlen = 122,
25020 .input = "This document describes a compression method based on the DEFLATE"
25021 "compression algorithm. This document defines the application of "
25022 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
25023 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
25024 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
25025 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
25026 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
25027 "\x68\x12\x51\xae\x76\x67\xd6\x27"
25028 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
25029 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
25030 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
25031 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
25032 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
25033 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
25034 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
25035 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
25036 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
25037 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
25038 "\xfa\x02",
25039 },
25040};
25041
25042static struct pcomp_testvec zlib_decomp_tv_template[] = {
25043 {
25044 .params = &deflate_decomp_params,
25045 .paramsize = sizeof(deflate_decomp_params),
25046 .inlen = 122,
25047 .outlen = 191,
25048 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
25049 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
25050 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
25051 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
25052 "\x68\x12\x51\xae\x76\x67\xd6\x27"
25053 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
25054 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
25055 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
25056 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
25057 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
25058 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
25059 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
25060 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
25061 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
25062 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
25063 "\xfa\x02",
25064 .output = "This document describes a compression method based on the DEFLATE"
25065 "compression algorithm. This document defines the application of "
25066 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
25067 }, {
25068 .params = &deflate_decomp_params,
25069 .paramsize = sizeof(deflate_decomp_params),
25070 .inlen = 38,
25071 .outlen = 70,
25072 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
25073 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
25074 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
25075 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
25076 "\x71\xbc\x08\x2b\x01\x00",
25077 .output = "Join us now and share the software "
25078 "Join us now and share the software ",
25079 },
25080};
25081
Herbert Xuda7f0332008-07-31 17:08:25 +080025082/*
25083 * LZO test vectors (null-terminated strings).
25084 */
25085#define LZO_COMP_TEST_VECTORS 2
25086#define LZO_DECOMP_TEST_VECTORS 2
25087
25088static struct comp_testvec lzo_comp_tv_template[] = {
25089 {
25090 .inlen = 70,
25091 .outlen = 46,
25092 .input = "Join us now and share the software "
25093 "Join us now and share the software ",
25094 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
25095 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
25096 "\x64\x20\x73\x68\x61\x72\x65\x20"
25097 "\x74\x68\x65\x20\x73\x6f\x66\x74"
25098 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
25099 "\x3d\x88\x00\x11\x00\x00",
25100 }, {
25101 .inlen = 159,
25102 .outlen = 133,
25103 .input = "This document describes a compression method based on the LZO "
25104 "compression algorithm. This document defines the application of "
25105 "the LZO algorithm used in UBIFS.",
25106 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
25107 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
25108 "\x64\x65\x73\x63\x72\x69\x62\x65"
25109 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
25110 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
25111 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
25112 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
25113 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
25114 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
25115 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
25116 "\x68\x69\x73\x2a\x54\x01\x02\x66"
25117 "\x69\x6e\x65\x73\x94\x06\x05\x61"
25118 "\x70\x70\x6c\x69\x63\x61\x74\x76"
25119 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
25120 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
25121 "\x20\x69\x6e\x20\x55\x42\x49\x46"
25122 "\x53\x2e\x11\x00\x00",
25123 },
25124};
25125
25126static struct comp_testvec lzo_decomp_tv_template[] = {
25127 {
25128 .inlen = 133,
25129 .outlen = 159,
25130 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
25131 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
25132 "\x64\x65\x73\x63\x72\x69\x62\x65"
25133 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
25134 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
25135 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
25136 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
25137 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
25138 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
25139 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
25140 "\x68\x69\x73\x2a\x54\x01\x02\x66"
25141 "\x69\x6e\x65\x73\x94\x06\x05\x61"
25142 "\x70\x70\x6c\x69\x63\x61\x74\x76"
25143 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
25144 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
25145 "\x20\x69\x6e\x20\x55\x42\x49\x46"
25146 "\x53\x2e\x11\x00\x00",
25147 .output = "This document describes a compression method based on the LZO "
25148 "compression algorithm. This document defines the application of "
25149 "the LZO algorithm used in UBIFS.",
25150 }, {
25151 .inlen = 46,
25152 .outlen = 70,
25153 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
25154 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
25155 "\x64\x20\x73\x68\x61\x72\x65\x20"
25156 "\x74\x68\x65\x20\x73\x6f\x66\x74"
25157 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
25158 "\x3d\x88\x00\x11\x00\x00",
25159 .output = "Join us now and share the software "
25160 "Join us now and share the software ",
25161 },
25162};
25163
25164/*
25165 * Michael MIC test vectors from IEEE 802.11i
25166 */
25167#define MICHAEL_MIC_TEST_VECTORS 6
25168
25169static struct hash_testvec michael_mic_tv_template[] = {
25170 {
25171 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
25172 .ksize = 8,
25173 .plaintext = zeroed_string,
25174 .psize = 0,
25175 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
25176 },
25177 {
25178 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
25179 .ksize = 8,
25180 .plaintext = "M",
25181 .psize = 1,
25182 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
25183 },
25184 {
25185 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
25186 .ksize = 8,
25187 .plaintext = "Mi",
25188 .psize = 2,
25189 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
25190 },
25191 {
25192 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
25193 .ksize = 8,
25194 .plaintext = "Mic",
25195 .psize = 3,
25196 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
25197 },
25198 {
25199 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
25200 .ksize = 8,
25201 .plaintext = "Mich",
25202 .psize = 4,
25203 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
25204 },
25205 {
25206 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
25207 .ksize = 8,
25208 .plaintext = "Michael",
25209 .psize = 7,
25210 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
25211 }
25212};
25213
25214/*
25215 * CRC32C test vectors
25216 */
25217#define CRC32C_TEST_VECTORS 14
25218
25219static struct hash_testvec crc32c_tv_template[] = {
25220 {
25221 .psize = 0,
25222 .digest = "\x00\x00\x00\x00",
25223 },
25224 {
25225 .key = "\x87\xa9\xcb\xed",
25226 .ksize = 4,
25227 .psize = 0,
25228 .digest = "\x78\x56\x34\x12",
25229 },
25230 {
25231 .key = "\xff\xff\xff\xff",
25232 .ksize = 4,
25233 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25234 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25235 "\x11\x12\x13\x14\x15\x16\x17\x18"
25236 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25237 "\x21\x22\x23\x24\x25\x26\x27\x28",
25238 .psize = 40,
25239 .digest = "\x7f\x15\x2c\x0e",
25240 },
25241 {
25242 .key = "\xff\xff\xff\xff",
25243 .ksize = 4,
25244 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
25245 "\x31\x32\x33\x34\x35\x36\x37\x38"
25246 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
25247 "\x41\x42\x43\x44\x45\x46\x47\x48"
25248 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
25249 .psize = 40,
25250 .digest = "\xf6\xeb\x80\xe9",
25251 },
25252 {
25253 .key = "\xff\xff\xff\xff",
25254 .ksize = 4,
25255 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
25256 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
25257 "\x61\x62\x63\x64\x65\x66\x67\x68"
25258 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
25259 "\x71\x72\x73\x74\x75\x76\x77\x78",
25260 .psize = 40,
25261 .digest = "\xed\xbd\x74\xde",
25262 },
25263 {
25264 .key = "\xff\xff\xff\xff",
25265 .ksize = 4,
25266 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
25267 "\x81\x82\x83\x84\x85\x86\x87\x88"
25268 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
25269 "\x91\x92\x93\x94\x95\x96\x97\x98"
25270 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
25271 .psize = 40,
25272 .digest = "\x62\xc8\x79\xd5",
25273 },
25274 {
25275 .key = "\xff\xff\xff\xff",
25276 .ksize = 4,
25277 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
25278 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
25279 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
25280 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
25281 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
25282 .psize = 40,
25283 .digest = "\xd0\x9a\x97\xba",
25284 },
25285 {
25286 .key = "\xff\xff\xff\xff",
25287 .ksize = 4,
25288 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
25289 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
25290 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
25291 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
25292 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
25293 .psize = 40,
25294 .digest = "\x13\xd9\x29\x2b",
25295 },
25296 {
25297 .key = "\x80\xea\xd3\xf1",
25298 .ksize = 4,
25299 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
25300 "\x31\x32\x33\x34\x35\x36\x37\x38"
25301 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
25302 "\x41\x42\x43\x44\x45\x46\x47\x48"
25303 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
25304 .psize = 40,
25305 .digest = "\x0c\xb5\xe2\xa2",
25306 },
25307 {
25308 .key = "\xf3\x4a\x1d\x5d",
25309 .ksize = 4,
25310 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
25311 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
25312 "\x61\x62\x63\x64\x65\x66\x67\x68"
25313 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
25314 "\x71\x72\x73\x74\x75\x76\x77\x78",
25315 .psize = 40,
25316 .digest = "\xd1\x7f\xfb\xa6",
25317 },
25318 {
25319 .key = "\x2e\x80\x04\x59",
25320 .ksize = 4,
25321 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
25322 "\x81\x82\x83\x84\x85\x86\x87\x88"
25323 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
25324 "\x91\x92\x93\x94\x95\x96\x97\x98"
25325 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
25326 .psize = 40,
25327 .digest = "\x59\x33\xe6\x7a",
25328 },
25329 {
25330 .key = "\xa6\xcc\x19\x85",
25331 .ksize = 4,
25332 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
25333 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
25334 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
25335 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
25336 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
25337 .psize = 40,
25338 .digest = "\xbe\x03\x01\xd2",
25339 },
25340 {
25341 .key = "\x41\xfc\xfe\x2d",
25342 .ksize = 4,
25343 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
25344 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
25345 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
25346 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
25347 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
25348 .psize = 40,
25349 .digest = "\x75\xd3\xc5\x24",
25350 },
25351 {
25352 .key = "\xff\xff\xff\xff",
25353 .ksize = 4,
25354 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25355 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25356 "\x11\x12\x13\x14\x15\x16\x17\x18"
25357 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25358 "\x21\x22\x23\x24\x25\x26\x27\x28"
25359 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
25360 "\x31\x32\x33\x34\x35\x36\x37\x38"
25361 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
25362 "\x41\x42\x43\x44\x45\x46\x47\x48"
25363 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
25364 "\x51\x52\x53\x54\x55\x56\x57\x58"
25365 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
25366 "\x61\x62\x63\x64\x65\x66\x67\x68"
25367 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
25368 "\x71\x72\x73\x74\x75\x76\x77\x78"
25369 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
25370 "\x81\x82\x83\x84\x85\x86\x87\x88"
25371 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
25372 "\x91\x92\x93\x94\x95\x96\x97\x98"
25373 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
25374 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
25375 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
25376 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
25377 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
25378 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
25379 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
25380 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
25381 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
25382 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
25383 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
25384 .psize = 240,
25385 .digest = "\x75\xd3\xc5\x24",
25386 .np = 2,
25387 .tap = { 31, 209 }
25388 },
25389};
25390
Sonic Zhanga482b082012-05-25 17:54:13 +080025391/*
25392 * Blakcifn CRC test vectors
25393 */
25394#define BFIN_CRC_TEST_VECTORS 6
25395
25396static struct hash_testvec bfin_crc_tv_template[] = {
25397 {
25398 .psize = 0,
25399 .digest = "\x00\x00\x00\x00",
25400 },
25401 {
25402 .key = "\x87\xa9\xcb\xed",
25403 .ksize = 4,
25404 .psize = 0,
25405 .digest = "\x87\xa9\xcb\xed",
25406 },
25407 {
25408 .key = "\xff\xff\xff\xff",
25409 .ksize = 4,
25410 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25411 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25412 "\x11\x12\x13\x14\x15\x16\x17\x18"
25413 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25414 "\x21\x22\x23\x24\x25\x26\x27\x28",
25415 .psize = 40,
25416 .digest = "\x84\x0c\x8d\xa2",
25417 },
25418 {
25419 .key = "\xff\xff\xff\xff",
25420 .ksize = 4,
25421 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25422 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25423 "\x11\x12\x13\x14\x15\x16\x17\x18"
25424 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25425 "\x21\x22\x23\x24\x25\x26",
25426 .psize = 38,
25427 .digest = "\x8c\x58\xec\xb7",
25428 },
25429 {
25430 .key = "\xff\xff\xff\xff",
25431 .ksize = 4,
25432 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25433 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25434 "\x11\x12\x13\x14\x15\x16\x17\x18"
25435 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25436 "\x21\x22\x23\x24\x25\x26\x27",
25437 .psize = 39,
25438 .digest = "\xdc\x50\x28\x7b",
25439 },
25440 {
25441 .key = "\xff\xff\xff\xff",
25442 .ksize = 4,
25443 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
25444 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
25445 "\x11\x12\x13\x14\x15\x16\x17\x18"
25446 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
25447 "\x21\x22\x23\x24\x25\x26\x27\x28"
25448 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
25449 "\x31\x32\x33\x34\x35\x36\x37\x38"
25450 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
25451 "\x41\x42\x43\x44\x45\x46\x47\x48"
25452 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
25453 "\x51\x52\x53\x54\x55\x56\x57\x58"
25454 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
25455 "\x61\x62\x63\x64\x65\x66\x67\x68"
25456 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
25457 "\x71\x72\x73\x74\x75\x76\x77\x78"
25458 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
25459 "\x81\x82\x83\x84\x85\x86\x87\x88"
25460 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
25461 "\x91\x92\x93\x94\x95\x96\x97\x98"
25462 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
25463 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
25464 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
25465 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
25466 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
25467 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
25468 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
25469 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
25470 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
25471 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
25472 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
25473 .psize = 240,
25474 .digest = "\x10\x19\x4a\x5c",
25475 .np = 2,
25476 .tap = { 31, 209 }
25477 },
25478
25479};
25480
Herbert Xuda7f0332008-07-31 17:08:25 +080025481#endif /* _CRYPTO_TESTMGR_H */