blob: 4d98e401852a1567c65ccdd7a8b31f174313b164 [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
Horia Geanta29b77e52014-07-23 11:59:38 +030035#define MAX_KEYLEN 160
Herbert Xuda7f0332008-07-31 17:08:25 +080036#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];
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020044 unsigned short psize;
Herbert Xuda7f0332008-07-31 17:08:25 +080045 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;
David Howells09e21782015-04-28 15:36:36 +010057 bool fail;
Herbert Xuda7f0332008-07-31 17:08:25 +080058 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;
David Howells09e21782015-04-28 15:36:36 +010074 bool 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
Stephan Mueller3332ee22014-05-31 17:24:38 +020095struct drbg_testvec {
96 unsigned char *entropy;
97 size_t entropylen;
98 unsigned char *entpra;
99 unsigned char *entprb;
100 size_t entprlen;
101 unsigned char *addtla;
102 unsigned char *addtlb;
103 size_t addtllen;
104 unsigned char *pers;
105 size_t perslen;
106 unsigned char *expected;
107 size_t expectedlen;
108};
109
Herbert Xuda7f0332008-07-31 17:08:25 +0800110static char zeroed_string[48];
111
112/*
113 * MD4 test vectors from RFC1320
114 */
115#define MD4_TEST_VECTORS 7
116
117static struct hash_testvec md4_tv_template [] = {
118 {
119 .plaintext = "",
120 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
121 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
122 }, {
123 .plaintext = "a",
124 .psize = 1,
125 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
126 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
127 }, {
128 .plaintext = "abc",
129 .psize = 3,
130 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
131 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
132 }, {
133 .plaintext = "message digest",
134 .psize = 14,
135 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
136 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
137 }, {
138 .plaintext = "abcdefghijklmnopqrstuvwxyz",
139 .psize = 26,
140 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
141 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
142 .np = 2,
143 .tap = { 13, 13 },
144 }, {
145 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
146 .psize = 62,
147 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
148 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
149 }, {
150 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
151 "45678901234567890",
152 .psize = 80,
153 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
154 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
155 },
156};
157
158/*
159 * MD5 test vectors from RFC1321
160 */
161#define MD5_TEST_VECTORS 7
162
163static struct hash_testvec md5_tv_template[] = {
164 {
165 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
166 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
167 }, {
168 .plaintext = "a",
169 .psize = 1,
170 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
171 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
172 }, {
173 .plaintext = "abc",
174 .psize = 3,
175 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
176 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
177 }, {
178 .plaintext = "message digest",
179 .psize = 14,
180 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
181 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
182 }, {
183 .plaintext = "abcdefghijklmnopqrstuvwxyz",
184 .psize = 26,
185 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
186 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
187 .np = 2,
188 .tap = {13, 13}
189 }, {
190 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
191 .psize = 62,
192 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
193 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
194 }, {
195 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
196 "345678901234567890",
197 .psize = 80,
198 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
199 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
200 }
201
202};
203
204/*
205 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
206 */
207#define RMD128_TEST_VECTORS 10
208
209static struct hash_testvec rmd128_tv_template[] = {
210 {
211 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
212 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
213 }, {
214 .plaintext = "a",
215 .psize = 1,
216 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
217 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
218 }, {
219 .plaintext = "abc",
220 .psize = 3,
221 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
222 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
223 }, {
224 .plaintext = "message digest",
225 .psize = 14,
226 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
227 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
228 }, {
229 .plaintext = "abcdefghijklmnopqrstuvwxyz",
230 .psize = 26,
231 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
232 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
233 }, {
234 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
235 "fghijklmnopqrstuvwxyz0123456789",
236 .psize = 62,
237 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
238 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
239 }, {
240 .plaintext = "1234567890123456789012345678901234567890"
241 "1234567890123456789012345678901234567890",
242 .psize = 80,
243 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
244 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
245 }, {
246 .plaintext = "abcdbcdecdefdefgefghfghighij"
247 "hijkijkljklmklmnlmnomnopnopq",
248 .psize = 56,
249 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
250 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
251 .np = 2,
252 .tap = { 28, 28 },
253 }, {
254 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
255 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
256 "lmnopqrsmnopqrstnopqrstu",
257 .psize = 112,
258 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
259 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
260 }, {
261 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
262 .psize = 32,
263 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
264 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
265 }
266};
267
268/*
269 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
270 */
271#define RMD160_TEST_VECTORS 10
272
273static struct hash_testvec rmd160_tv_template[] = {
274 {
275 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
276 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
277 }, {
278 .plaintext = "a",
279 .psize = 1,
280 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
281 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
282 }, {
283 .plaintext = "abc",
284 .psize = 3,
285 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
286 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
287 }, {
288 .plaintext = "message digest",
289 .psize = 14,
290 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
291 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
292 }, {
293 .plaintext = "abcdefghijklmnopqrstuvwxyz",
294 .psize = 26,
295 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
296 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
297 }, {
298 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
299 "fghijklmnopqrstuvwxyz0123456789",
300 .psize = 62,
301 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
302 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
303 }, {
304 .plaintext = "1234567890123456789012345678901234567890"
305 "1234567890123456789012345678901234567890",
306 .psize = 80,
307 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
308 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
309 }, {
310 .plaintext = "abcdbcdecdefdefgefghfghighij"
311 "hijkijkljklmklmnlmnomnopnopq",
312 .psize = 56,
313 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
314 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
315 .np = 2,
316 .tap = { 28, 28 },
317 }, {
318 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
319 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
320 "lmnopqrsmnopqrstnopqrstu",
321 .psize = 112,
322 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
323 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
324 }, {
325 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
326 .psize = 32,
327 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
328 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
329 }
330};
331
332/*
333 * RIPEMD-256 test vectors
334 */
335#define RMD256_TEST_VECTORS 8
336
337static struct hash_testvec rmd256_tv_template[] = {
338 {
339 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
340 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
341 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
342 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
343 }, {
344 .plaintext = "a",
345 .psize = 1,
346 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
347 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
348 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
349 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
350 }, {
351 .plaintext = "abc",
352 .psize = 3,
353 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
354 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
355 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
356 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
357 }, {
358 .plaintext = "message digest",
359 .psize = 14,
360 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
361 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
362 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
363 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
364 }, {
365 .plaintext = "abcdefghijklmnopqrstuvwxyz",
366 .psize = 26,
367 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
368 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
369 "\x78\x96\x11\x8a\x51\x97\x96\x87"
370 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
371 }, {
372 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
373 "fghijklmnopqrstuvwxyz0123456789",
374 .psize = 62,
375 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
376 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
377 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
378 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
379 }, {
380 .plaintext = "1234567890123456789012345678901234567890"
381 "1234567890123456789012345678901234567890",
382 .psize = 80,
383 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
384 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
385 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
386 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
387 }, {
388 .plaintext = "abcdbcdecdefdefgefghfghighij"
389 "hijkijkljklmklmnlmnomnopnopq",
390 .psize = 56,
391 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
392 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
393 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
394 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
395 .np = 2,
396 .tap = { 28, 28 },
397 }
398};
399
400/*
401 * RIPEMD-320 test vectors
402 */
403#define RMD320_TEST_VECTORS 8
404
405static struct hash_testvec rmd320_tv_template[] = {
406 {
407 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
408 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
409 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
410 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
411 }, {
412 .plaintext = "a",
413 .psize = 1,
414 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
415 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
416 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
417 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
418 }, {
419 .plaintext = "abc",
420 .psize = 3,
421 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
422 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
423 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
424 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
425 }, {
426 .plaintext = "message digest",
427 .psize = 14,
428 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
429 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
430 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
431 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
432 }, {
433 .plaintext = "abcdefghijklmnopqrstuvwxyz",
434 .psize = 26,
435 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
436 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
437 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
438 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
439 }, {
440 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
441 "fghijklmnopqrstuvwxyz0123456789",
442 .psize = 62,
443 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
444 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
445 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
446 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
447 }, {
448 .plaintext = "1234567890123456789012345678901234567890"
449 "1234567890123456789012345678901234567890",
450 .psize = 80,
451 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
452 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
453 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
454 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
455 }, {
456 .plaintext = "abcdbcdecdefdefgefghfghighij"
457 "hijkijkljklmklmnlmnomnopnopq",
458 .psize = 56,
459 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
460 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
461 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
462 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
463 .np = 2,
464 .tap = { 28, 28 },
465 }
466};
467
Herbert Xu684115212013-09-07 12:56:26 +1000468#define CRCT10DIF_TEST_VECTORS 3
469static struct hash_testvec crct10dif_tv_template[] = {
470 {
471 .plaintext = "abc",
472 .psize = 3,
473#ifdef __LITTLE_ENDIAN
474 .digest = "\x3b\x44",
475#else
476 .digest = "\x44\x3b",
477#endif
478 }, {
479 .plaintext = "1234567890123456789012345678901234567890"
480 "123456789012345678901234567890123456789",
481 .psize = 79,
482#ifdef __LITTLE_ENDIAN
483 .digest = "\x70\x4b",
484#else
485 .digest = "\x4b\x70",
486#endif
487 }, {
488 .plaintext =
489 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
490 .psize = 56,
491#ifdef __LITTLE_ENDIAN
492 .digest = "\xe3\x9c",
493#else
494 .digest = "\x9c\xe3",
495#endif
496 .np = 2,
497 .tap = { 28, 28 }
498 }
499};
500
Herbert Xuda7f0332008-07-31 17:08:25 +0800501/*
502 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100503 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800504 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300505#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +0800506
507static struct hash_testvec sha1_tv_template[] = {
508 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300509 .plaintext = "",
510 .psize = 0,
511 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
512 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
513 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800514 .plaintext = "abc",
515 .psize = 3,
516 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
517 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
518 }, {
519 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
520 .psize = 56,
521 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
522 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
523 .np = 2,
524 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100525 }, {
526 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
527 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
528 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
529 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
530 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
531 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
532 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
533 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
534 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
535 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
536 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
537 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
538 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
539 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
540 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
541 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
542 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
543 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
544 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
545 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
546 "\x5a\x90\x11",
547 .psize = 163,
548 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
549 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
550 .np = 4,
551 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800552 }, {
553 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
554 .psize = 64,
555 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
556 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300557 }, {
558 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
559 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
560 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
561 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
562 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
563 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
564 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
565 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
566 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
567 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
568 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
569 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
570 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
571 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
572 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
573 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
574 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
575 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
576 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
577 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
578 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
579 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
580 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
581 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
582 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
583 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
584 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
585 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
586 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
587 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
588 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
589 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
590 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
591 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
592 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
593 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
594 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
595 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
596 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
597 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
598 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
599 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
600 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
601 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
602 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
603 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
604 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
605 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
606 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
607 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
608 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
609 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
610 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
611 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
612 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
613 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
614 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
615 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
616 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
617 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
618 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
619 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
620 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
621 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
622 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
623 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
624 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
625 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
626 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
627 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
628 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
629 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
630 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
631 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
632 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
633 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
634 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
635 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
636 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
637 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
638 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
639 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
640 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
641 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
642 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
643 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
644 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
645 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
646 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
647 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
648 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
649 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
650 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
651 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
652 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
653 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
654 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
655 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
656 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
657 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
658 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
659 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
660 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
661 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
662 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
663 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
664 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
665 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
666 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
667 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
668 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
669 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
670 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
671 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
672 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
673 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
674 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
675 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
676 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
677 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
678 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
679 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
680 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
681 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
682 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
683 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
684 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
685 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
686 .psize = 1023,
687 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
688 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
689 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +0800690 }
691};
692
693
694/*
695 * SHA224 test vectors from from FIPS PUB 180-2
696 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300697#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800698
699static struct hash_testvec sha224_tv_template[] = {
700 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300701 .plaintext = "",
702 .psize = 0,
703 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
704 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
705 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
706 "\xc5\xb3\xe4\x2f",
707 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800708 .plaintext = "abc",
709 .psize = 3,
710 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
711 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
712 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
713 "\xE3\x6C\x9D\xA7",
714 }, {
715 .plaintext =
716 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
717 .psize = 56,
718 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
719 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
720 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
721 "\x52\x52\x25\x25",
722 .np = 2,
723 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800724 }, {
725 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
726 .psize = 64,
727 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
728 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
729 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
730 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300731 }, {
732 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
733 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
734 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
735 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
736 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
737 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
738 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
739 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
740 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
741 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
742 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
743 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
744 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
745 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
746 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
747 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
748 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
749 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
750 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
751 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
752 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
753 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
754 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
755 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
756 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
757 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
758 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
759 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
760 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
761 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
762 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
763 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
764 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
765 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
766 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
767 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
768 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
769 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
770 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
771 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
772 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
773 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
774 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
775 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
776 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
777 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
778 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
779 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
780 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
781 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
782 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
783 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
784 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
785 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
786 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
787 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
788 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
789 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
790 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
791 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
792 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
793 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
794 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
795 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
796 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
797 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
798 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
799 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
800 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
801 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
802 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
803 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
804 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
805 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
806 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
807 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
808 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
809 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
810 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
811 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
812 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
813 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
814 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
815 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
816 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
817 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
818 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
819 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
820 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
821 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
822 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
823 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
824 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
825 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
826 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
827 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
828 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
829 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
830 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
831 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
832 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
833 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
834 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
835 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
836 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
837 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
838 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
839 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
840 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
841 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
842 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
843 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
844 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
845 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
846 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
847 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
848 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
849 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
850 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
851 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
852 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
853 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
854 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
855 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
856 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
857 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
858 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
859 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
860 .psize = 1023,
861 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
862 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
863 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
864 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +0800865 }
866};
867
868/*
869 * SHA256 test vectors from from NIST
870 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300871#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800872
873static struct hash_testvec sha256_tv_template[] = {
874 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300875 .plaintext = "",
876 .psize = 0,
877 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
878 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
879 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
880 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
881 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800882 .plaintext = "abc",
883 .psize = 3,
884 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
885 "\x41\x41\x40\xde\x5d\xae\x22\x23"
886 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
887 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
888 }, {
889 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
890 .psize = 56,
891 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
892 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
893 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
894 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
895 .np = 2,
896 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800897 }, {
898 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
899 .psize = 64,
900 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
901 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
902 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
903 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300904 }, {
905 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
906 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
907 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
908 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
909 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
910 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
911 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
912 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
913 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
914 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
915 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
916 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
917 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
918 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
919 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
920 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
921 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
922 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
923 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
924 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
925 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
926 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
927 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
928 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
929 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
930 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
931 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
932 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
933 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
934 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
935 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
936 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
937 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
938 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
939 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
940 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
941 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
942 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
943 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
944 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
945 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
946 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
947 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
948 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
949 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
950 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
951 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
952 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
953 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
954 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
955 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
956 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
957 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
958 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
959 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
960 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
961 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
962 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
963 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
964 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
965 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
966 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
967 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
968 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
969 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
970 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
971 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
972 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
973 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
974 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
975 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
976 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
977 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
978 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
979 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
980 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
981 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
982 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
983 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
984 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
985 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
986 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
987 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
988 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
989 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
990 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
991 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
992 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
993 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
994 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
995 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
996 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
997 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
998 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
999 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1000 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1001 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1002 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1003 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1004 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1005 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1006 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1007 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1008 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1009 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1010 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1011 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1012 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1013 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1014 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1015 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1016 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1017 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1018 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1019 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1020 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1021 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1022 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1023 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1024 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1025 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1026 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1027 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1028 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1029 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1030 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1031 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1032 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1033 .psize = 1023,
1034 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1035 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1036 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1037 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001038 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001039};
1040
1041/*
1042 * SHA384 test vectors from from NIST and kerneli
1043 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001044#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001045
1046static struct hash_testvec sha384_tv_template[] = {
1047 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001048 .plaintext = "",
1049 .psize = 0,
1050 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1051 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1052 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1053 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1054 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1055 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1056 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001057 .plaintext= "abc",
1058 .psize = 3,
1059 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1060 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1061 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1062 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1063 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1064 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1065 }, {
1066 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1067 .psize = 56,
1068 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1069 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1070 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1071 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1072 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1073 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1074 }, {
1075 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1076 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1077 .psize = 112,
1078 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1079 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1080 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1081 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1082 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1083 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1084 }, {
1085 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1086 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1087 .psize = 104,
1088 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1089 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1090 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1091 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1092 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1093 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1094 .np = 4,
1095 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001096 }, {
1097 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1098 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1099 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1100 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1101 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1102 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1103 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1104 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1105 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1106 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1107 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1108 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1109 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1110 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1111 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1112 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1113 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1114 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1115 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1116 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1117 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1118 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1119 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1120 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1121 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1122 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1123 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1124 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1125 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1126 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1127 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1128 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1129 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1130 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1131 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1132 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1133 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1134 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1135 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1136 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1137 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1138 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1139 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1140 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1141 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1142 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1143 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1144 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1145 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1146 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1147 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1148 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1149 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1150 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1151 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1152 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1153 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1154 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1155 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1156 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1157 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1158 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1159 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1160 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1161 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1162 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1163 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1164 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1165 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1166 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1167 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1168 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1169 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1170 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1171 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1172 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1173 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1174 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1175 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1176 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1177 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1178 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1179 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1180 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1181 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1182 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1183 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1184 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1185 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1186 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1187 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1188 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1189 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1190 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1191 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1192 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1193 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1194 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1195 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1196 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1197 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1198 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1199 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1200 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1201 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1202 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1203 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1204 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1205 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1206 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1207 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1208 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1209 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1210 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1211 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1212 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1213 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1214 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1215 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1216 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1217 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1218 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1219 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1220 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1221 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1222 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1223 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1224 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1225 .psize = 1023,
1226 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1227 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1228 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1229 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1230 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1231 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1232 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001233};
1234
1235/*
1236 * SHA512 test vectors from from NIST and kerneli
1237 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001238#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001239
1240static struct hash_testvec sha512_tv_template[] = {
1241 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001242 .plaintext = "",
1243 .psize = 0,
1244 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1245 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1246 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1247 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1248 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1249 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1250 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1251 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1252 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001253 .plaintext = "abc",
1254 .psize = 3,
1255 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1256 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1257 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1258 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1259 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1260 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1261 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1262 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1263 }, {
1264 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1265 .psize = 56,
1266 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1267 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1268 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1269 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1270 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1271 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1272 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1273 "\x54\xec\x63\x12\x38\xca\x34\x45",
1274 }, {
1275 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1276 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1277 .psize = 112,
1278 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1279 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1280 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1281 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1282 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1283 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1284 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1285 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1286 }, {
1287 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1288 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1289 .psize = 104,
1290 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1291 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1292 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1293 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1294 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1295 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1296 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1297 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1298 .np = 4,
1299 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001300 }, {
1301 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1302 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1303 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1304 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1305 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1306 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1307 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1308 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1309 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1310 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1311 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1312 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1313 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1314 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1315 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1316 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1317 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1318 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1319 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1320 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1321 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1322 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1323 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1324 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1325 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1326 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1327 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1328 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1329 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1330 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1331 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1332 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1333 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1334 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1335 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1336 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1337 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1338 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1339 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1340 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1341 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1342 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1343 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1344 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1345 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1346 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1347 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1348 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1349 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1350 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1351 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1352 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1353 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1354 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1355 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1356 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1357 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1358 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1359 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1360 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1361 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1362 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1363 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1364 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1365 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1366 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1367 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1368 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1369 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1370 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1371 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1372 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1373 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1374 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1375 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1376 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1377 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1378 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1379 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1380 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1381 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1382 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1383 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1384 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1385 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1386 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1387 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1388 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1389 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1390 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1391 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1392 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1393 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1394 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1395 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1396 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1397 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1398 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1399 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1400 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1401 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1402 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1403 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1404 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1405 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1406 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1407 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1408 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1409 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1410 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1411 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1412 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1413 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1414 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1415 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1416 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1417 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1418 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1419 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1420 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1421 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1422 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1423 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1424 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1425 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1426 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1427 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1428 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1429 .psize = 1023,
1430 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1431 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1432 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1433 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1434 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1435 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1436 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1437 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1438 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001439};
1440
1441
1442/*
1443 * WHIRLPOOL test vectors from Whirlpool package
1444 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1445 * submission
1446 */
1447#define WP512_TEST_VECTORS 8
1448
1449static struct hash_testvec wp512_tv_template[] = {
1450 {
1451 .plaintext = "",
1452 .psize = 0,
1453 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1454 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1455 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1456 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1457 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1458 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1459 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1460 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1461
1462
1463 }, {
1464 .plaintext = "a",
1465 .psize = 1,
1466 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1467 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1468 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1469 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1470 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1471 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1472 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1473 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1474 }, {
1475 .plaintext = "abc",
1476 .psize = 3,
1477 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1478 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1479 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1480 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1481 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1482 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1483 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1484 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1485 }, {
1486 .plaintext = "message digest",
1487 .psize = 14,
1488 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1489 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1490 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1491 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1492 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1493 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1494 "\x92\xED\x92\x00\x52\x83\x8F\x33"
1495 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1496 }, {
1497 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1498 .psize = 26,
1499 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1500 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1501 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1502 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1503 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1504 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1505 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1506 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1507 }, {
1508 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1509 "abcdefghijklmnopqrstuvwxyz0123456789",
1510 .psize = 62,
1511 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1512 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1513 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1514 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1515 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1516 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1517 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1518 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1519 }, {
1520 .plaintext = "1234567890123456789012345678901234567890"
1521 "1234567890123456789012345678901234567890",
1522 .psize = 80,
1523 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1524 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1525 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1526 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1527 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1528 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1529 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1530 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1531 }, {
1532 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1533 .psize = 32,
1534 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1535 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1536 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1537 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1538 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1539 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1540 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1541 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1542 },
1543};
1544
1545#define WP384_TEST_VECTORS 8
1546
1547static struct hash_testvec wp384_tv_template[] = {
1548 {
1549 .plaintext = "",
1550 .psize = 0,
1551 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1552 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1553 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1554 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1555 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1556 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1557
1558
1559 }, {
1560 .plaintext = "a",
1561 .psize = 1,
1562 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1563 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1564 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1565 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1566 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1567 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1568 }, {
1569 .plaintext = "abc",
1570 .psize = 3,
1571 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1572 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1573 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1574 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1575 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1576 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1577 }, {
1578 .plaintext = "message digest",
1579 .psize = 14,
1580 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1581 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1582 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1583 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1584 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1585 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1586 }, {
1587 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1588 .psize = 26,
1589 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1590 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1591 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1592 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1593 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1594 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1595 }, {
1596 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1597 "abcdefghijklmnopqrstuvwxyz0123456789",
1598 .psize = 62,
1599 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1600 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1601 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1602 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1603 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1604 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1605 }, {
1606 .plaintext = "1234567890123456789012345678901234567890"
1607 "1234567890123456789012345678901234567890",
1608 .psize = 80,
1609 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1610 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1611 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1612 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1613 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1614 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1615 }, {
1616 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1617 .psize = 32,
1618 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1619 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1620 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1621 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1622 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1623 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1624 },
1625};
1626
1627#define WP256_TEST_VECTORS 8
1628
1629static struct hash_testvec wp256_tv_template[] = {
1630 {
1631 .plaintext = "",
1632 .psize = 0,
1633 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1634 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1635 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1636 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1637
1638
1639 }, {
1640 .plaintext = "a",
1641 .psize = 1,
1642 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1643 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1644 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1645 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1646 }, {
1647 .plaintext = "abc",
1648 .psize = 3,
1649 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1650 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1651 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1652 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1653 }, {
1654 .plaintext = "message digest",
1655 .psize = 14,
1656 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1657 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1658 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1659 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
1660 }, {
1661 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1662 .psize = 26,
1663 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1664 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1665 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1666 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
1667 }, {
1668 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1669 "abcdefghijklmnopqrstuvwxyz0123456789",
1670 .psize = 62,
1671 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1672 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1673 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1674 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
1675 }, {
1676 .plaintext = "1234567890123456789012345678901234567890"
1677 "1234567890123456789012345678901234567890",
1678 .psize = 80,
1679 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1680 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1681 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1682 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
1683 }, {
1684 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1685 .psize = 32,
1686 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1687 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1688 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1689 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
1690 },
1691};
1692
1693/*
1694 * TIGER test vectors from Tiger website
1695 */
1696#define TGR192_TEST_VECTORS 6
1697
1698static struct hash_testvec tgr192_tv_template[] = {
1699 {
1700 .plaintext = "",
1701 .psize = 0,
1702 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1703 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1704 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
1705 }, {
1706 .plaintext = "abc",
1707 .psize = 3,
1708 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1709 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1710 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
1711 }, {
1712 .plaintext = "Tiger",
1713 .psize = 5,
1714 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1715 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1716 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
1717 }, {
1718 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1719 .psize = 64,
1720 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1721 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1722 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
1723 }, {
1724 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1725 .psize = 64,
1726 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1727 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1728 "\x57\x89\x65\x65\x97\x5f\x91\x97",
1729 }, {
1730 .plaintext = "Tiger - A Fast New Hash Function, "
1731 "by Ross Anderson and Eli Biham, "
1732 "proceedings of Fast Software Encryption 3, "
1733 "Cambridge, 1996.",
1734 .psize = 125,
1735 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1736 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1737 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
1738 },
1739};
1740
1741#define TGR160_TEST_VECTORS 6
1742
1743static struct hash_testvec tgr160_tv_template[] = {
1744 {
1745 .plaintext = "",
1746 .psize = 0,
1747 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1748 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1749 "\xf3\x73\xde\x2d",
1750 }, {
1751 .plaintext = "abc",
1752 .psize = 3,
1753 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1754 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1755 "\x93\x5f\x7b\x95",
1756 }, {
1757 .plaintext = "Tiger",
1758 .psize = 5,
1759 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1760 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1761 "\x37\x79\x0c\x11",
1762 }, {
1763 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1764 .psize = 64,
1765 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1766 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1767 "\xb5\x86\x44\x50",
1768 }, {
1769 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1770 .psize = 64,
1771 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1772 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1773 "\x57\x89\x65\x65",
1774 }, {
1775 .plaintext = "Tiger - A Fast New Hash Function, "
1776 "by Ross Anderson and Eli Biham, "
1777 "proceedings of Fast Software Encryption 3, "
1778 "Cambridge, 1996.",
1779 .psize = 125,
1780 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1781 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1782 "\xdd\x68\x15\x1d",
1783 },
1784};
1785
1786#define TGR128_TEST_VECTORS 6
1787
1788static struct hash_testvec tgr128_tv_template[] = {
1789 {
1790 .plaintext = "",
1791 .psize = 0,
1792 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1793 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1794 }, {
1795 .plaintext = "abc",
1796 .psize = 3,
1797 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1798 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1799 }, {
1800 .plaintext = "Tiger",
1801 .psize = 5,
1802 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1803 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1804 }, {
1805 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1806 .psize = 64,
1807 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1808 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1809 }, {
1810 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1811 .psize = 64,
1812 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1813 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1814 }, {
1815 .plaintext = "Tiger - A Fast New Hash Function, "
1816 "by Ross Anderson and Eli Biham, "
1817 "proceedings of Fast Software Encryption 3, "
1818 "Cambridge, 1996.",
1819 .psize = 125,
1820 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1821 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1822 },
1823};
1824
Harald Freudenberger445a8e02015-05-21 17:34:31 +02001825#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08001826
1827static struct hash_testvec ghash_tv_template[] =
1828{
1829 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001830 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
1831 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08001832 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001833 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
1834 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08001835 .psize = 16,
1836 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1837 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001838 }, {
1839 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1840 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1841 .ksize = 16,
1842 .plaintext = "what do ya want for nothing?",
1843 .psize = 28,
1844 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
1845 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
1846 .np = 2,
1847 .tap = {14, 14}
1848 }, {
1849 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1850 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1851 .ksize = 16,
1852 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1853 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1854 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1855 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1856 .psize = 50,
1857 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
1858 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
1859 }, {
1860 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1861 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1862 .ksize = 16,
1863 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1864 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1865 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1866 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1867 .psize = 50,
1868 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
1869 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
1870 }, {
1871 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
1872 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1873 .ksize = 16,
1874 .plaintext = "Test With Truncation",
1875 .psize = 20,
1876 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
1877 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02001878 }, {
1879 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
1880 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
1881 .ksize = 16,
1882 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
1883 "\x65\x72\x20\x4c\x61\x75\x73\x63"
1884 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
1885 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
1886 "\x73\x65\x69\x20\x73\x74\x69\x6c"
1887 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
1888 "\x69\x6e\x20\x74\x69\x65\x66\x74"
1889 "\x69\x65\x66\x65\x73\x20\x4c\x65"
1890 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
1891 "\x73\x20\x64\x75\x20\x77\x65\x69"
1892 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
1893 "\x64\x65\x72\x20\x57\x69\x6e\x64"
1894 "\x20\x64\x69\x72\x20\x77\x69\x6c"
1895 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
1896 "\x63\x68\x20\x64\x69\x65\x20\x42"
1897 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
1898 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
1899 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
1900 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
1901 "\x6c\x20\x64\x61\x73\x20\x53\x63"
1902 "\x68\x77\x65\x69\x67\x65\x6e\x20"
1903 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
1904 "\x6c\x61\x73\x73\x20\x64\x65\x69"
1905 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
1906 "\x20\x62\x65\x73\x69\x65\x67\x65"
1907 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
1908 "\x20\x48\x61\x75\x63\x68\x65\x20"
1909 "\x67\x69\x62\x74\x20\x64\x69\x63"
1910 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
1911 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
1912 "\x77\x69\x72\x64\x20\x64\x69\x63"
1913 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
1914 "\x20\x75\x6e\x64\x20\x77\x69\x65"
1915 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
1916 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
1917 "\x65\x69\x6e\x65\x20\x53\x65\x65"
1918 "\x6c\x65\x20\x73\x65\x69\x74\x20"
1919 "\x77\x65\x69\x74\x2c\x20\x73\x65"
1920 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
1921 "\x64\x61\x73\x73\x20\x64\x69\x72"
1922 "\x20\x64\x61\x73\x20\x4c\x65\x62"
1923 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
1924 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
1925 "\x74\x65\x20\x64\x69\x63\x68\x20"
1926 "\x77\x69\x65\x20\x65\x69\x6e\x20"
1927 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
1928 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
1929 "\x20\x64\x69\x65\x20\x73\x69\x6e"
1930 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
1931 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
1932 .psize = 400,
1933 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
1934 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08001935 },
1936};
1937
Herbert Xuda7f0332008-07-31 17:08:25 +08001938/*
1939 * HMAC-MD5 test vectors from RFC2202
1940 * (These need to be fixed to not use strlen).
1941 */
1942#define HMAC_MD5_TEST_VECTORS 7
1943
1944static struct hash_testvec hmac_md5_tv_template[] =
1945{
1946 {
1947 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1948 .ksize = 16,
1949 .plaintext = "Hi There",
1950 .psize = 8,
1951 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1952 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1953 }, {
1954 .key = "Jefe",
1955 .ksize = 4,
1956 .plaintext = "what do ya want for nothing?",
1957 .psize = 28,
1958 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1959 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1960 .np = 2,
1961 .tap = {14, 14}
1962 }, {
1963 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1964 .ksize = 16,
1965 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1966 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1967 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1968 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1969 .psize = 50,
1970 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1971 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1972 }, {
1973 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1974 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1975 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1976 .ksize = 25,
1977 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1978 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1979 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1980 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1981 .psize = 50,
1982 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1983 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1984 }, {
1985 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1986 .ksize = 16,
1987 .plaintext = "Test With Truncation",
1988 .psize = 20,
1989 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1990 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1991 }, {
1992 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1993 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1994 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1995 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1996 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1997 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1998 "\xaa\xaa",
1999 .ksize = 80,
2000 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2001 .psize = 54,
2002 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2003 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2004 }, {
2005 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2006 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2007 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2008 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2009 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2010 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2011 "\xaa\xaa",
2012 .ksize = 80,
2013 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2014 "Block-Size Data",
2015 .psize = 73,
2016 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2017 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2018 },
2019};
2020
2021/*
2022 * HMAC-RIPEMD128 test vectors from RFC2286
2023 */
2024#define HMAC_RMD128_TEST_VECTORS 7
2025
2026static struct hash_testvec hmac_rmd128_tv_template[] = {
2027 {
2028 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2029 .ksize = 16,
2030 .plaintext = "Hi There",
2031 .psize = 8,
2032 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2033 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2034 }, {
2035 .key = "Jefe",
2036 .ksize = 4,
2037 .plaintext = "what do ya want for nothing?",
2038 .psize = 28,
2039 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2040 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2041 .np = 2,
2042 .tap = { 14, 14 },
2043 }, {
2044 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2045 .ksize = 16,
2046 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2047 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2048 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2049 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2050 .psize = 50,
2051 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2052 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2053 }, {
2054 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2055 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2056 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2057 .ksize = 25,
2058 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2059 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2060 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2061 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2062 .psize = 50,
2063 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2064 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2065 }, {
2066 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2067 .ksize = 16,
2068 .plaintext = "Test With Truncation",
2069 .psize = 20,
2070 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2071 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2072 }, {
2073 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2074 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2075 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2076 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2077 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2078 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2079 "\xaa\xaa",
2080 .ksize = 80,
2081 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2082 .psize = 54,
2083 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2084 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2085 }, {
2086 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2087 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2088 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2089 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2090 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2091 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2092 "\xaa\xaa",
2093 .ksize = 80,
2094 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2095 "Block-Size Data",
2096 .psize = 73,
2097 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2098 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2099 },
2100};
2101
2102/*
2103 * HMAC-RIPEMD160 test vectors from RFC2286
2104 */
2105#define HMAC_RMD160_TEST_VECTORS 7
2106
2107static struct hash_testvec hmac_rmd160_tv_template[] = {
2108 {
2109 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2110 .ksize = 20,
2111 .plaintext = "Hi There",
2112 .psize = 8,
2113 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2114 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2115 }, {
2116 .key = "Jefe",
2117 .ksize = 4,
2118 .plaintext = "what do ya want for nothing?",
2119 .psize = 28,
2120 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2121 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2122 .np = 2,
2123 .tap = { 14, 14 },
2124 }, {
2125 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2126 .ksize = 20,
2127 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2128 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2129 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2130 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2131 .psize = 50,
2132 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2133 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2134 }, {
2135 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2136 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2137 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2138 .ksize = 25,
2139 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2140 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2141 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2142 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2143 .psize = 50,
2144 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2145 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2146 }, {
2147 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2148 .ksize = 20,
2149 .plaintext = "Test With Truncation",
2150 .psize = 20,
2151 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2152 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2153 }, {
2154 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2155 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2156 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2157 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2158 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2159 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2160 "\xaa\xaa",
2161 .ksize = 80,
2162 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2163 .psize = 54,
2164 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2165 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2166 }, {
2167 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2168 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2169 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2170 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2171 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2172 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2173 "\xaa\xaa",
2174 .ksize = 80,
2175 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2176 "Block-Size Data",
2177 .psize = 73,
2178 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2179 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2180 },
2181};
2182
2183/*
2184 * HMAC-SHA1 test vectors from RFC2202
2185 */
2186#define HMAC_SHA1_TEST_VECTORS 7
2187
2188static struct hash_testvec hmac_sha1_tv_template[] = {
2189 {
2190 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2191 .ksize = 20,
2192 .plaintext = "Hi There",
2193 .psize = 8,
2194 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2195 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2196 "\x46\xbe",
2197 }, {
2198 .key = "Jefe",
2199 .ksize = 4,
2200 .plaintext = "what do ya want for nothing?",
2201 .psize = 28,
2202 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2203 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2204 .np = 2,
2205 .tap = { 14, 14 }
2206 }, {
2207 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2208 .ksize = 20,
2209 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2210 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2211 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2212 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2213 .psize = 50,
2214 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2215 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2216 }, {
2217 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2218 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2219 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2220 .ksize = 25,
2221 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2222 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2223 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2224 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2225 .psize = 50,
2226 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2227 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2228 }, {
2229 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2230 .ksize = 20,
2231 .plaintext = "Test With Truncation",
2232 .psize = 20,
2233 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2234 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2235 }, {
2236 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2237 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2238 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2239 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2240 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2241 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2242 "\xaa\xaa",
2243 .ksize = 80,
2244 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2245 .psize = 54,
2246 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2247 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2248 }, {
2249 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2250 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2251 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2252 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2253 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2254 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2255 "\xaa\xaa",
2256 .ksize = 80,
2257 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2258 "Block-Size Data",
2259 .psize = 73,
2260 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2261 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2262 },
2263};
2264
2265
2266/*
2267 * SHA224 HMAC test vectors from RFC4231
2268 */
2269#define HMAC_SHA224_TEST_VECTORS 4
2270
2271static struct hash_testvec hmac_sha224_tv_template[] = {
2272 {
2273 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2274 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2275 "\x0b\x0b\x0b\x0b",
2276 .ksize = 20,
2277 /* ("Hi There") */
2278 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2279 .psize = 8,
2280 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2281 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2282 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2283 "\x53\x68\x4b\x22",
2284 }, {
2285 .key = "Jefe",
2286 .ksize = 4,
2287 /* ("what do ya want for nothing?") */
2288 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2289 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2290 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2291 "\x69\x6e\x67\x3f",
2292 .psize = 28,
2293 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2294 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2295 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2296 "\x8f\xd0\x5e\x44",
2297 .np = 4,
2298 .tap = { 7, 7, 7, 7 }
2299 }, {
2300 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2301 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2302 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2303 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2304 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2305 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2306 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2307 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2308 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2309 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2310 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2311 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2312 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2313 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2314 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2315 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2316 "\xaa\xaa\xaa",
2317 .ksize = 131,
2318 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2319 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2320 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2321 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2322 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2323 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2324 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2325 "\x20\x46\x69\x72\x73\x74",
2326 .psize = 54,
2327 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2328 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2329 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2330 "\x3f\xa6\x87\x0e",
2331 }, {
2332 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2333 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2334 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2335 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2336 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2337 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2338 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2339 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2340 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2341 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2342 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2343 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2344 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2345 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2346 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2347 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2348 "\xaa\xaa\xaa",
2349 .ksize = 131,
2350 /* ("This is a test using a larger than block-size key and a")
2351 (" larger than block-size data. The key needs to be")
2352 (" hashed before being used by the HMAC algorithm.") */
2353 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2354 "\x61\x20\x74\x65\x73\x74\x20\x75"
2355 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2356 "\x61\x72\x67\x65\x72\x20\x74\x68"
2357 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2358 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2359 "\x79\x20\x61\x6e\x64\x20\x61\x20"
2360 "\x6c\x61\x72\x67\x65\x72\x20\x74"
2361 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2362 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2363 "\x61\x74\x61\x2e\x20\x54\x68\x65"
2364 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2365 "\x64\x73\x20\x74\x6f\x20\x62\x65"
2366 "\x20\x68\x61\x73\x68\x65\x64\x20"
2367 "\x62\x65\x66\x6f\x72\x65\x20\x62"
2368 "\x65\x69\x6e\x67\x20\x75\x73\x65"
2369 "\x64\x20\x62\x79\x20\x74\x68\x65"
2370 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2371 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2372 .psize = 152,
2373 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2374 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2375 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2376 "\xf6\xf5\x65\xd1",
2377 },
2378};
2379
2380/*
2381 * HMAC-SHA256 test vectors from
2382 * draft-ietf-ipsec-ciph-sha-256-01.txt
2383 */
2384#define HMAC_SHA256_TEST_VECTORS 10
2385
2386static struct hash_testvec hmac_sha256_tv_template[] = {
2387 {
2388 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2389 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2390 "\x11\x12\x13\x14\x15\x16\x17\x18"
2391 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2392 .ksize = 32,
2393 .plaintext = "abc",
2394 .psize = 3,
2395 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2396 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2397 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2398 "\x92\x75\x90\x21\xcf\xab\x81\x81",
2399 }, {
2400 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2401 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2402 "\x11\x12\x13\x14\x15\x16\x17\x18"
2403 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2404 .ksize = 32,
2405 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2406 .psize = 56,
2407 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2408 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2409 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2410 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2411 }, {
2412 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2413 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2414 "\x11\x12\x13\x14\x15\x16\x17\x18"
2415 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2416 .ksize = 32,
2417 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2418 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2419 .psize = 112,
2420 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2421 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2422 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2423 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2424 }, {
2425 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2426 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2427 "\x0b\x0b\x0b\x0b\x0b\x0b",
2428 .ksize = 32,
2429 .plaintext = "Hi There",
2430 .psize = 8,
2431 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2432 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2433 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2434 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2435 }, {
2436 .key = "Jefe",
2437 .ksize = 4,
2438 .plaintext = "what do ya want for nothing?",
2439 .psize = 28,
2440 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2441 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2442 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2443 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2444 .np = 2,
2445 .tap = { 14, 14 }
2446 }, {
2447 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2448 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2449 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2450 .ksize = 32,
2451 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2452 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2453 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2454 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2455 .psize = 50,
2456 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2457 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2458 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2459 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2460 }, {
2461 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2462 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2463 "\x11\x12\x13\x14\x15\x16\x17\x18"
2464 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2465 "\x21\x22\x23\x24\x25",
2466 .ksize = 37,
2467 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2468 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2469 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2470 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2471 .psize = 50,
2472 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2473 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2474 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2475 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2476 }, {
2477 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2478 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2479 "\x0c\x0c\x0c\x0c\x0c\x0c",
2480 .ksize = 32,
2481 .plaintext = "Test With Truncation",
2482 .psize = 20,
2483 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2484 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2485 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2486 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2487 }, {
2488 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2489 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2490 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2491 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2492 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2493 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2494 "\xaa\xaa",
2495 .ksize = 80,
2496 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2497 .psize = 54,
2498 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2499 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2500 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2501 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2502 }, {
2503 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2504 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2505 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2506 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2507 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2508 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2509 "\xaa\xaa",
2510 .ksize = 80,
2511 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2512 "One Block-Size Data",
2513 .psize = 73,
2514 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2515 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2516 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2517 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2518 },
2519};
2520
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03002521#define CMAC_AES_TEST_VECTORS 6
2522
2523static struct hash_testvec aes_cmac128_tv_template[] = {
2524 { /* From NIST Special Publication 800-38B, AES-128 */
2525 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2526 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2527 .plaintext = zeroed_string,
2528 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2529 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2530 .psize = 0,
2531 .ksize = 16,
2532 }, {
2533 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2534 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2535 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2536 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2537 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2538 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2539 .psize = 16,
2540 .ksize = 16,
2541 }, {
2542 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2543 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2544 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2545 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2546 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2547 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2548 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2549 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2550 "\x30\xca\x32\x61\x14\x97\xc8\x27",
2551 .psize = 40,
2552 .ksize = 16,
2553 }, {
2554 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2555 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2556 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2557 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2558 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2559 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2560 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2561 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2562 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2563 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2564 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2565 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2566 .psize = 64,
2567 .ksize = 16,
2568 }, { /* From NIST Special Publication 800-38B, AES-256 */
2569 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2570 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2571 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2572 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2573 .plaintext = zeroed_string,
2574 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2575 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2576 .psize = 0,
2577 .ksize = 32,
2578 }, {
2579 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2580 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2581 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2582 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2583 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2584 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2585 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2586 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2587 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2588 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2589 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2590 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2591 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2592 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2593 .psize = 64,
2594 .ksize = 32,
2595 }
2596};
2597
2598#define CMAC_DES3_EDE_TEST_VECTORS 4
2599
2600static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2601/*
2602 * From NIST Special Publication 800-38B, Three Key TDEA
2603 * Corrected test vectors from:
2604 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2605 */
2606 {
2607 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2608 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2609 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2610 .plaintext = zeroed_string,
2611 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2612 .psize = 0,
2613 .ksize = 24,
2614 }, {
2615 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2616 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2617 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2618 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
2619 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2620 .psize = 8,
2621 .ksize = 24,
2622 }, {
2623 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2624 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2625 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2626 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2627 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2628 "\xae\x2d\x8a\x57",
2629 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2630 .psize = 20,
2631 .ksize = 24,
2632 }, {
2633 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2634 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2635 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2636 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2637 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2638 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2639 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2640 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2641 .psize = 32,
2642 .ksize = 24,
2643 }
2644};
2645
Herbert Xuda7f0332008-07-31 17:08:25 +08002646#define XCBC_AES_TEST_VECTORS 6
2647
2648static struct hash_testvec aes_xcbc128_tv_template[] = {
2649 {
2650 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2651 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2652 .plaintext = zeroed_string,
2653 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
2654 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
2655 .psize = 0,
2656 .ksize = 16,
2657 }, {
2658 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2659 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2660 .plaintext = "\x00\x01\x02",
2661 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
2662 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
2663 .psize = 3,
2664 .ksize = 16,
2665 } , {
2666 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2667 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2668 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2669 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2670 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
2671 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
2672 .psize = 16,
2673 .ksize = 16,
2674 }, {
2675 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2676 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2677 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2678 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2679 "\x10\x11\x12\x13",
2680 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
2681 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
2682 .tap = { 10, 10 },
2683 .psize = 20,
2684 .np = 2,
2685 .ksize = 16,
2686 }, {
2687 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2688 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2689 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2690 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2691 "\x10\x11\x12\x13\x14\x15\x16\x17"
2692 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
2693 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
2694 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
2695 .psize = 32,
2696 .ksize = 16,
2697 }, {
2698 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2699 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2700 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2701 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2702 "\x10\x11\x12\x13\x14\x15\x16\x17"
2703 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
2704 "\x20\x21",
2705 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
2706 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
2707 .tap = { 17, 17 },
2708 .psize = 34,
2709 .np = 2,
2710 .ksize = 16,
2711 }
2712};
2713
Salman Qaziba1ee072012-10-05 14:24:14 -07002714#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08002715static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10002716 '\x02', '\x03', '\x02', '\x02',
2717 '\x02', '\x04', '\x01', '\x07',
2718 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08002719static char vmac_string2[128] = {'a', 'b', 'c',};
2720static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
2721 'a', 'b', 'c', 'a', 'b', 'c',
2722 'a', 'b', 'c', 'a', 'b', 'c',
2723 'a', 'b', 'c', 'a', 'b', 'c',
2724 'a', 'b', 'c', 'a', 'b', 'c',
2725 'a', 'b', 'c', 'a', 'b', 'c',
2726 'a', 'b', 'c', 'a', 'b', 'c',
2727 'a', 'b', 'c', 'a', 'b', 'c',
2728 };
2729
Salman Qaziba1ee072012-10-05 14:24:14 -07002730static char vmac_string4[17] = {'b', 'c', 'e', 'f',
2731 'i', 'j', 'l', 'm',
2732 'o', 'p', 'r', 's',
2733 't', 'u', 'w', 'x', 'z'};
2734
2735static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
2736 'o', 'l', 'k', ']', '%',
2737 '9', '2', '7', '!', 'A'};
2738
2739static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
2740 'i', '!', '#', 'w', '0',
2741 'z', '/', '4', 'A', 'n'};
2742
Shane Wangf1939f72009-09-02 20:05:22 +10002743static struct hash_testvec aes_vmac128_tv_template[] = {
2744 {
Shane Wang304a2042010-03-18 20:22:55 +08002745 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2746 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2747 .plaintext = NULL,
2748 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
2749 .psize = 0,
2750 .ksize = 16,
2751 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10002752 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2753 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08002754 .plaintext = vmac_string1,
2755 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
2756 .psize = 128,
2757 .ksize = 16,
2758 }, {
2759 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2760 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2761 .plaintext = vmac_string2,
2762 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
2763 .psize = 128,
2764 .ksize = 16,
2765 }, {
2766 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2767 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2768 .plaintext = vmac_string3,
2769 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
2770 .psize = 128,
2771 .ksize = 16,
2772 }, {
2773 .key = "abcdefghijklmnop",
2774 .plaintext = NULL,
2775 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
2776 .psize = 0,
2777 .ksize = 16,
2778 }, {
2779 .key = "abcdefghijklmnop",
2780 .plaintext = vmac_string1,
2781 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
2782 .psize = 128,
2783 .ksize = 16,
2784 }, {
2785 .key = "abcdefghijklmnop",
2786 .plaintext = vmac_string2,
2787 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
2788 .psize = 128,
2789 .ksize = 16,
2790 }, {
2791 .key = "abcdefghijklmnop",
2792 .plaintext = vmac_string3,
2793 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10002794 .psize = 128,
2795 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07002796 }, {
2797 .key = "a09b5cd!f#07K\x00\x00\x00",
2798 .plaintext = vmac_string4,
2799 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
2800 .psize = sizeof(vmac_string4),
2801 .ksize = 16,
2802 }, {
2803 .key = "a09b5cd!f#07K\x00\x00\x00",
2804 .plaintext = vmac_string5,
2805 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
2806 .psize = sizeof(vmac_string5),
2807 .ksize = 16,
2808 }, {
2809 .key = "a09b5cd!f#07K\x00\x00\x00",
2810 .plaintext = vmac_string6,
2811 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
2812 .psize = sizeof(vmac_string6),
2813 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10002814 },
2815};
2816
Herbert Xuda7f0332008-07-31 17:08:25 +08002817/*
2818 * SHA384 HMAC test vectors from RFC4231
2819 */
2820
2821#define HMAC_SHA384_TEST_VECTORS 4
2822
2823static struct hash_testvec hmac_sha384_tv_template[] = {
2824 {
2825 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2826 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2827 "\x0b\x0b\x0b\x0b",
2828 .ksize = 20,
2829 .plaintext = "Hi There",
2830 .psize = 8,
2831 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
2832 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
2833 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
2834 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
2835 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
2836 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
2837 }, {
2838 .key = "Jefe",
2839 .ksize = 4,
2840 .plaintext = "what do ya want for nothing?",
2841 .psize = 28,
2842 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
2843 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
2844 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
2845 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
2846 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
2847 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
2848 .np = 4,
2849 .tap = { 7, 7, 7, 7 }
2850 }, {
2851 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2852 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2853 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2854 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2855 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2856 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2857 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2858 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2859 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2860 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2861 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2862 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2863 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2864 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2865 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2866 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2867 "\xaa\xaa\xaa",
2868 .ksize = 131,
2869 .plaintext = "Test Using Larger Than Block-Siz"
2870 "e Key - Hash Key First",
2871 .psize = 54,
2872 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
2873 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
2874 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
2875 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
2876 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
2877 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
2878 }, {
2879 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2880 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2881 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2882 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2883 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2884 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2885 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2886 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2887 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2888 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2889 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2890 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2891 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2892 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2893 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2894 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2895 "\xaa\xaa\xaa",
2896 .ksize = 131,
2897 .plaintext = "This is a test u"
2898 "sing a larger th"
2899 "an block-size ke"
2900 "y and a larger t"
2901 "han block-size d"
2902 "ata. The key nee"
2903 "ds to be hashed "
2904 "before being use"
2905 "d by the HMAC al"
2906 "gorithm.",
2907 .psize = 152,
2908 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
2909 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
2910 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
2911 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
2912 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
2913 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
2914 },
2915};
2916
2917/*
2918 * SHA512 HMAC test vectors from RFC4231
2919 */
2920
2921#define HMAC_SHA512_TEST_VECTORS 4
2922
2923static struct hash_testvec hmac_sha512_tv_template[] = {
2924 {
2925 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2926 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2927 "\x0b\x0b\x0b\x0b",
2928 .ksize = 20,
2929 .plaintext = "Hi There",
2930 .psize = 8,
2931 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
2932 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
2933 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
2934 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
2935 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
2936 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
2937 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
2938 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
2939 }, {
2940 .key = "Jefe",
2941 .ksize = 4,
2942 .plaintext = "what do ya want for nothing?",
2943 .psize = 28,
2944 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
2945 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
2946 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
2947 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
2948 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
2949 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
2950 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
2951 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
2952 .np = 4,
2953 .tap = { 7, 7, 7, 7 }
2954 }, {
2955 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2956 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2957 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2958 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2959 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2960 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2961 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2962 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2963 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2964 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2965 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2966 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2967 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2968 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2969 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2970 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2971 "\xaa\xaa\xaa",
2972 .ksize = 131,
2973 .plaintext = "Test Using Large"
2974 "r Than Block-Siz"
2975 "e Key - Hash Key"
2976 " First",
2977 .psize = 54,
2978 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
2979 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
2980 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
2981 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
2982 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
2983 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
2984 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
2985 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
2986 }, {
2987 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2988 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2989 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2990 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2991 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2992 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2993 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2994 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2995 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2996 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2997 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2998 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2999 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3000 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3001 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3002 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3003 "\xaa\xaa\xaa",
3004 .ksize = 131,
3005 .plaintext =
3006 "This is a test u"
3007 "sing a larger th"
3008 "an block-size ke"
3009 "y and a larger t"
3010 "han block-size d"
3011 "ata. The key nee"
3012 "ds to be hashed "
3013 "before being use"
3014 "d by the HMAC al"
3015 "gorithm.",
3016 .psize = 152,
3017 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3018 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3019 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3020 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3021 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3022 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3023 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3024 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3025 },
3026};
3027
3028/*
Martin Willieee9dc62015-06-01 13:43:59 +02003029 * Poly1305 test vectors from RFC7539 A.3.
3030 */
3031
3032#define POLY1305_TEST_VECTORS 11
3033
3034static struct hash_testvec poly1305_tv_template[] = {
3035 { /* Test Vector #1 */
3036 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3037 "\x00\x00\x00\x00\x00\x00\x00\x00"
3038 "\x00\x00\x00\x00\x00\x00\x00\x00"
3039 "\x00\x00\x00\x00\x00\x00\x00\x00",
3040 .ksize = 32,
3041 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3042 "\x00\x00\x00\x00\x00\x00\x00\x00"
3043 "\x00\x00\x00\x00\x00\x00\x00\x00"
3044 "\x00\x00\x00\x00\x00\x00\x00\x00"
3045 "\x00\x00\x00\x00\x00\x00\x00\x00"
3046 "\x00\x00\x00\x00\x00\x00\x00\x00"
3047 "\x00\x00\x00\x00\x00\x00\x00\x00"
3048 "\x00\x00\x00\x00\x00\x00\x00\x00",
3049 .psize = 64,
3050 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3051 "\x00\x00\x00\x00\x00\x00\x00\x00",
3052 }, { /* Test Vector #2 */
3053 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3054 "\x00\x00\x00\x00\x00\x00\x00\x00"
3055 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3056 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3057 .ksize = 32,
3058 .plaintext = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3059 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3060 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3061 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3062 "\x64\x65\x64\x20\x62\x79\x20\x74"
3063 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3064 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3065 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3066 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3067 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3068 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3069 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3070 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3071 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3072 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3073 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3074 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3075 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3076 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3077 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3078 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3079 "\x45\x54\x46\x20\x61\x63\x74\x69"
3080 "\x76\x69\x74\x79\x20\x69\x73\x20"
3081 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3082 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3083 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3084 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3085 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3086 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3087 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3088 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3089 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3090 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3091 "\x54\x46\x20\x73\x65\x73\x73\x69"
3092 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3093 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3094 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3095 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3096 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3097 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3098 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3099 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3100 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3101 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3102 "\x20\x77\x68\x69\x63\x68\x20\x61"
3103 "\x72\x65\x20\x61\x64\x64\x72\x65"
3104 "\x73\x73\x65\x64\x20\x74\x6f",
3105 .psize = 375,
3106 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3107 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3108 }, { /* Test Vector #3 */
3109 .key = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3110 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3111 "\x00\x00\x00\x00\x00\x00\x00\x00"
3112 "\x00\x00\x00\x00\x00\x00\x00\x00",
3113 .ksize = 32,
3114 .plaintext = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3115 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3116 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3117 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3118 "\x64\x65\x64\x20\x62\x79\x20\x74"
3119 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3120 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3121 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3122 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3123 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3124 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3125 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3126 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3127 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3128 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3129 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3130 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3131 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3132 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3133 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3134 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3135 "\x45\x54\x46\x20\x61\x63\x74\x69"
3136 "\x76\x69\x74\x79\x20\x69\x73\x20"
3137 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3138 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3139 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3140 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3141 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3142 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3143 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3144 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3145 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3146 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3147 "\x54\x46\x20\x73\x65\x73\x73\x69"
3148 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3149 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3150 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3151 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3152 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3153 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3154 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3155 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3156 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3157 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3158 "\x20\x77\x68\x69\x63\x68\x20\x61"
3159 "\x72\x65\x20\x61\x64\x64\x72\x65"
3160 "\x73\x73\x65\x64\x20\x74\x6f",
3161 .psize = 375,
3162 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3163 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3164 }, { /* Test Vector #4 */
3165 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
3166 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3167 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
3168 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
3169 .ksize = 32,
3170 .plaintext = "\x27\x54\x77\x61\x73\x20\x62\x72"
3171 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3172 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3173 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3174 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3175 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3176 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3177 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3178 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3179 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3180 "\x65\x72\x65\x20\x74\x68\x65\x20"
3181 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3182 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3183 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3184 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3185 "\x74\x67\x72\x61\x62\x65\x2e",
3186 .psize = 127,
3187 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3188 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3189 }, { /* Test Vector #5 */
3190 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3191 "\x00\x00\x00\x00\x00\x00\x00\x00"
3192 "\x00\x00\x00\x00\x00\x00\x00\x00"
3193 "\x00\x00\x00\x00\x00\x00\x00\x00",
3194 .ksize = 32,
3195 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3196 "\xff\xff\xff\xff\xff\xff\xff\xff",
3197 .psize = 16,
3198 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3199 "\x00\x00\x00\x00\x00\x00\x00\x00",
3200 }, { /* Test Vector #6 */
3201 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3202 "\x00\x00\x00\x00\x00\x00\x00\x00"
3203 "\xff\xff\xff\xff\xff\xff\xff\xff"
3204 "\xff\xff\xff\xff\xff\xff\xff\xff",
3205 .ksize = 32,
3206 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3207 "\x00\x00\x00\x00\x00\x00\x00\x00",
3208 .psize = 16,
3209 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3210 "\x00\x00\x00\x00\x00\x00\x00\x00",
3211 }, { /* Test Vector #7 */
3212 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3213 "\x00\x00\x00\x00\x00\x00\x00\x00"
3214 "\x00\x00\x00\x00\x00\x00\x00\x00"
3215 "\x00\x00\x00\x00\x00\x00\x00\x00",
3216 .ksize = 32,
3217 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3218 "\xff\xff\xff\xff\xff\xff\xff\xff"
3219 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3220 "\xff\xff\xff\xff\xff\xff\xff\xff"
3221 "\x11\x00\x00\x00\x00\x00\x00\x00"
3222 "\x00\x00\x00\x00\x00\x00\x00\x00",
3223 .psize = 48,
3224 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3225 "\x00\x00\x00\x00\x00\x00\x00\x00",
3226 }, { /* Test Vector #8 */
3227 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3228 "\x00\x00\x00\x00\x00\x00\x00\x00"
3229 "\x00\x00\x00\x00\x00\x00\x00\x00"
3230 "\x00\x00\x00\x00\x00\x00\x00\x00",
3231 .ksize = 32,
3232 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3233 "\xff\xff\xff\xff\xff\xff\xff\xff"
3234 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3235 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3236 "\x01\x01\x01\x01\x01\x01\x01\x01"
3237 "\x01\x01\x01\x01\x01\x01\x01\x01",
3238 .psize = 48,
3239 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3240 "\x00\x00\x00\x00\x00\x00\x00\x00",
3241 }, { /* Test Vector #9 */
3242 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3243 "\x00\x00\x00\x00\x00\x00\x00\x00"
3244 "\x00\x00\x00\x00\x00\x00\x00\x00"
3245 "\x00\x00\x00\x00\x00\x00\x00\x00",
3246 .ksize = 32,
3247 .plaintext = "\xfd\xff\xff\xff\xff\xff\xff\xff"
3248 "\xff\xff\xff\xff\xff\xff\xff\xff",
3249 .psize = 16,
3250 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3251 "\xff\xff\xff\xff\xff\xff\xff\xff",
3252 }, { /* Test Vector #10 */
3253 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3254 "\x04\x00\x00\x00\x00\x00\x00\x00"
3255 "\x00\x00\x00\x00\x00\x00\x00\x00"
3256 "\x00\x00\x00\x00\x00\x00\x00\x00",
3257 .ksize = 32,
3258 .plaintext = "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3259 "\x00\x00\x00\x00\x00\x00\x00\x00"
3260 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3261 "\x01\x00\x00\x00\x00\x00\x00\x00"
3262 "\x00\x00\x00\x00\x00\x00\x00\x00"
3263 "\x00\x00\x00\x00\x00\x00\x00\x00"
3264 "\x01\x00\x00\x00\x00\x00\x00\x00"
3265 "\x00\x00\x00\x00\x00\x00\x00\x00",
3266 .psize = 64,
3267 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3268 "\x55\x00\x00\x00\x00\x00\x00\x00",
3269 }, { /* Test Vector #11 */
3270 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3271 "\x04\x00\x00\x00\x00\x00\x00\x00"
3272 "\x00\x00\x00\x00\x00\x00\x00\x00"
3273 "\x00\x00\x00\x00\x00\x00\x00\x00",
3274 .ksize = 32,
3275 .plaintext = "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3276 "\x00\x00\x00\x00\x00\x00\x00\x00"
3277 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3278 "\x01\x00\x00\x00\x00\x00\x00\x00"
3279 "\x00\x00\x00\x00\x00\x00\x00\x00"
3280 "\x00\x00\x00\x00\x00\x00\x00\x00",
3281 .psize = 48,
3282 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3283 "\x00\x00\x00\x00\x00\x00\x00\x00",
3284 },
3285};
3286
3287/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003288 * DES test vectors.
3289 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003290#define DES_ENC_TEST_VECTORS 11
3291#define DES_DEC_TEST_VECTORS 5
3292#define DES_CBC_ENC_TEST_VECTORS 6
3293#define DES_CBC_DEC_TEST_VECTORS 5
3294#define DES_CTR_ENC_TEST_VECTORS 2
3295#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003296#define DES3_EDE_ENC_TEST_VECTORS 4
3297#define DES3_EDE_DEC_TEST_VECTORS 4
3298#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3299#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3300#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3301#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003302
3303static struct cipher_testvec des_enc_tv_template[] = {
3304 { /* From Applied Cryptography */
3305 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3306 .klen = 8,
3307 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3308 .ilen = 8,
3309 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3310 .rlen = 8,
3311 }, { /* Same key, different plaintext block */
3312 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3313 .klen = 8,
3314 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3315 .ilen = 8,
3316 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3317 .rlen = 8,
3318 }, { /* Sbox test from NBS */
3319 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3320 .klen = 8,
3321 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3322 .ilen = 8,
3323 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3324 .rlen = 8,
3325 }, { /* Three blocks */
3326 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3327 .klen = 8,
3328 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3329 "\x22\x33\x44\x55\x66\x77\x88\x99"
3330 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3331 .ilen = 24,
3332 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3333 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3334 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3335 .rlen = 24,
3336 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003337 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003338 .wk = 1,
3339 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3340 .klen = 8,
3341 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3342 .ilen = 8,
3343 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3344 .rlen = 8,
3345 }, { /* Two blocks -- for testing encryption across pages */
3346 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3347 .klen = 8,
3348 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3349 "\x22\x33\x44\x55\x66\x77\x88\x99",
3350 .ilen = 16,
3351 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3352 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3353 .rlen = 16,
3354 .np = 2,
3355 .tap = { 8, 8 }
3356 }, { /* Four blocks -- for testing encryption with chunking */
3357 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3358 .klen = 8,
3359 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3360 "\x22\x33\x44\x55\x66\x77\x88\x99"
3361 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3362 "\x22\x33\x44\x55\x66\x77\x88\x99",
3363 .ilen = 32,
3364 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3365 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3366 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3367 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3368 .rlen = 32,
3369 .np = 3,
3370 .tap = { 14, 10, 8 }
3371 }, {
3372 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3373 .klen = 8,
3374 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3375 "\x22\x33\x44\x55\x66\x77\x88\x99"
3376 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3377 .ilen = 24,
3378 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3379 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3380 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3381 .rlen = 24,
3382 .np = 4,
3383 .tap = { 2, 1, 3, 18 }
3384 }, {
3385 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3386 .klen = 8,
3387 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3388 "\x22\x33\x44\x55\x66\x77\x88\x99",
3389 .ilen = 16,
3390 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3391 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3392 .rlen = 16,
3393 .np = 5,
3394 .tap = { 2, 2, 2, 2, 8 }
3395 }, {
3396 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3397 .klen = 8,
3398 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3399 .ilen = 8,
3400 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3401 .rlen = 8,
3402 .np = 8,
3403 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003404 }, { /* Generated with Crypto++ */
3405 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3406 .klen = 8,
3407 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3408 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3409 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3410 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3411 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3412 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3413 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3414 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3415 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3416 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3417 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3418 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3419 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3420 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3421 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3422 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3423 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3424 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3425 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3426 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3427 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3428 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3429 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3430 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3431 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3432 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3433 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3434 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3435 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3436 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3437 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3438 .ilen = 248,
3439 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3440 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3441 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3442 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3443 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3444 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3445 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3446 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3447 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3448 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3449 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3450 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3451 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3452 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3453 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3454 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3455 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3456 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3457 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3458 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3459 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3460 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3461 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3462 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3463 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3464 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3465 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3466 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3467 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3468 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3469 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3470 .rlen = 248,
3471 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003472 .np = 3,
3473 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003474 },
3475};
3476
3477static struct cipher_testvec des_dec_tv_template[] = {
3478 { /* From Applied Cryptography */
3479 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3480 .klen = 8,
3481 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3482 .ilen = 8,
3483 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3484 .rlen = 8,
3485 }, { /* Sbox test from NBS */
3486 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3487 .klen = 8,
3488 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3489 .ilen = 8,
3490 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3491 .rlen = 8,
3492 }, { /* Two blocks, for chunking test */
3493 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3494 .klen = 8,
3495 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3496 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3497 .ilen = 16,
3498 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3499 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3500 .rlen = 16,
3501 .np = 2,
3502 .tap = { 8, 8 }
3503 }, {
3504 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3505 .klen = 8,
3506 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3507 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3508 .ilen = 16,
3509 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3510 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3511 .rlen = 16,
3512 .np = 3,
3513 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003514 }, { /* Generated with Crypto++ */
3515 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3516 .klen = 8,
3517 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3518 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3519 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3520 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3521 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3522 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3523 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3524 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3525 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3526 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3527 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3528 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3529 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3530 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3531 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3532 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3533 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3534 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3535 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3536 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3537 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3538 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3539 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3540 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3541 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3542 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3543 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3544 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3545 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3546 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3547 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3548 .ilen = 248,
3549 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3550 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3551 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3552 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3553 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3554 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3555 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3556 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3557 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3558 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3559 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3560 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3561 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3562 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3563 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3564 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3565 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3566 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3567 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3568 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3569 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3570 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3571 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3572 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3573 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3574 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3575 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3576 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3577 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3578 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3579 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3580 .rlen = 248,
3581 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003582 .np = 3,
3583 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003584 },
3585};
3586
3587static struct cipher_testvec des_cbc_enc_tv_template[] = {
3588 { /* From OpenSSL */
3589 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3590 .klen = 8,
3591 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3592 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3593 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3594 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3595 .ilen = 24,
3596 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3597 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3598 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3599 .rlen = 24,
3600 }, { /* FIPS Pub 81 */
3601 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3602 .klen = 8,
3603 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3604 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3605 .ilen = 8,
3606 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3607 .rlen = 8,
3608 }, {
3609 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3610 .klen = 8,
3611 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3612 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3613 .ilen = 8,
3614 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3615 .rlen = 8,
3616 }, {
3617 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3618 .klen = 8,
3619 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3620 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3621 .ilen = 8,
3622 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3623 .rlen = 8,
3624 }, { /* Copy of openssl vector for chunk testing */
3625 /* From OpenSSL */
3626 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3627 .klen = 8,
3628 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3629 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3630 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3631 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3632 .ilen = 24,
3633 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3634 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3635 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3636 .rlen = 24,
3637 .np = 2,
3638 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003639 }, { /* Generated with Crypto++ */
3640 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3641 .klen = 8,
3642 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3643 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3644 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3645 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3646 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3647 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3648 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3649 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3650 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3651 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3652 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3653 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3654 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3655 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3656 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3657 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3658 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3659 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3660 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3661 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3662 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3663 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3664 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3665 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3666 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3667 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3668 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3669 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3670 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3671 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3672 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3673 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3674 .ilen = 248,
3675 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3676 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3677 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3678 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3679 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3680 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3681 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3682 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3683 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3684 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3685 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3686 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3687 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3688 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3689 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3690 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3691 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3692 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3693 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3694 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3695 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3696 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3697 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3698 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3699 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3700 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3701 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3702 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3703 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3704 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3705 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3706 .rlen = 248,
3707 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003708 .np = 3,
3709 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003710 },
3711};
3712
3713static struct cipher_testvec des_cbc_dec_tv_template[] = {
3714 { /* FIPS Pub 81 */
3715 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3716 .klen = 8,
3717 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3718 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3719 .ilen = 8,
3720 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3721 .rlen = 8,
3722 }, {
3723 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3724 .klen = 8,
3725 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3726 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3727 .ilen = 8,
3728 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3729 .rlen = 8,
3730 }, {
3731 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3732 .klen = 8,
3733 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3734 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3735 .ilen = 8,
3736 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3737 .rlen = 8,
3738 }, { /* Copy of above, for chunk testing */
3739 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3740 .klen = 8,
3741 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3742 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3743 .ilen = 8,
3744 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3745 .rlen = 8,
3746 .np = 2,
3747 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003748 }, { /* Generated with Crypto++ */
3749 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3750 .klen = 8,
3751 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3752 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3753 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3754 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3755 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3756 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3757 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3758 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3759 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3760 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3761 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3762 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3763 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3764 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3765 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3766 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3767 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3768 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3769 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3770 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3771 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3772 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3773 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3774 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3775 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3776 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3777 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3778 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3779 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3780 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3781 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3782 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3783 .ilen = 248,
3784 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3785 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3786 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3787 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3788 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3789 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3790 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3791 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3792 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3793 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3794 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3795 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3796 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3797 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3798 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3799 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3800 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3801 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3802 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3803 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3804 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3805 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3806 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3807 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3808 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3809 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3810 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3811 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3812 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3813 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3814 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3815 .rlen = 248,
3816 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003817 .np = 3,
3818 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003819 },
3820};
3821
3822static struct cipher_testvec des_ctr_enc_tv_template[] = {
3823 { /* Generated with Crypto++ */
3824 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3825 .klen = 8,
3826 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3827 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3828 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3829 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3830 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3831 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3832 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3833 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3834 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3835 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3836 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3837 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3838 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3839 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3840 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3841 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3842 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3843 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3844 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3845 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3846 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3847 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3848 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3849 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3850 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3851 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3852 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3853 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3854 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3855 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3856 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3857 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3858 .ilen = 248,
3859 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3860 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3861 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3862 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3863 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3864 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3865 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3866 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3867 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
3868 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
3869 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
3870 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
3871 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
3872 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
3873 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
3874 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
3875 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
3876 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
3877 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
3878 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
3879 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
3880 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
3881 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
3882 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
3883 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
3884 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
3885 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
3886 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
3887 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
3888 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
3889 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
3890 .rlen = 248,
3891 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003892 .np = 3,
3893 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003894 }, { /* Generated with Crypto++ */
3895 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3896 .klen = 8,
3897 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3898 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3899 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3900 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3901 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3902 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3903 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3904 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3905 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3906 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3907 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3908 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3909 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3910 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3911 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3912 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3913 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3914 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3915 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3916 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3917 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3918 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3919 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3920 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3921 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3922 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3923 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3924 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3925 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3926 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3927 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3928 "\xC6\x2F\xBB\x24\x8D\x19\x82",
3929 .ilen = 247,
3930 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
3931 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
3932 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
3933 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
3934 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
3935 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
3936 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
3937 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
3938 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
3939 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
3940 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
3941 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
3942 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
3943 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
3944 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
3945 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
3946 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
3947 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
3948 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
3949 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
3950 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
3951 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
3952 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
3953 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
3954 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
3955 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
3956 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
3957 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
3958 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
3959 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
3960 "\x91\x45\x05\x3E\x58\xBF\x32",
3961 .rlen = 247,
3962 .also_non_np = 1,
3963 .np = 2,
3964 .tap = { 247 - 8, 8 },
3965 },
3966};
3967
3968static struct cipher_testvec des_ctr_dec_tv_template[] = {
3969 { /* Generated with Crypto++ */
3970 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3971 .klen = 8,
3972 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3973 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3974 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3975 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3976 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3977 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3978 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3979 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3980 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3981 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
3982 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
3983 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
3984 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
3985 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
3986 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
3987 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
3988 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
3989 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
3990 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
3991 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
3992 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
3993 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
3994 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
3995 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
3996 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
3997 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
3998 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
3999 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4000 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4001 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4002 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4003 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4004 .ilen = 248,
4005 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4006 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4007 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4008 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4009 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4010 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4011 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4012 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4013 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4014 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4015 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4016 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4017 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4018 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4019 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4020 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4021 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4022 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4023 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4024 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4025 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4026 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4027 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4028 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4029 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4030 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4031 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4032 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4033 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4034 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4035 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4036 .rlen = 248,
4037 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004038 .np = 3,
4039 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004040 }, { /* Generated with Crypto++ */
4041 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4042 .klen = 8,
4043 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4044 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4045 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4046 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4047 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4048 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4049 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4050 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4051 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4052 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4053 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4054 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4055 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4056 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4057 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4058 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4059 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4060 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4061 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4062 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4063 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4064 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4065 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4066 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4067 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4068 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4069 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4070 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4071 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4072 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4073 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4074 "\x91\x45\x05\x3E\x58\xBF\x32",
4075 .ilen = 247,
4076 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4077 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4078 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4079 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4080 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4081 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4082 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4083 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4084 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4085 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4086 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4087 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4088 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4089 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4090 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4091 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4092 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4093 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4094 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4095 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4096 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4097 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4098 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4099 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4100 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4101 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4102 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4103 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4104 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4105 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4106 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4107 .rlen = 247,
4108 .also_non_np = 1,
4109 .np = 2,
4110 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004111 },
4112};
4113
4114static struct cipher_testvec des3_ede_enc_tv_template[] = {
4115 { /* These are from openssl */
4116 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4117 "\x55\x55\x55\x55\x55\x55\x55\x55"
4118 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4119 .klen = 24,
4120 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4121 .ilen = 8,
4122 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4123 .rlen = 8,
4124 }, {
4125 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4126 "\x86\x02\x87\x66\x59\x08\x21\x98"
4127 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4128 .klen = 24,
4129 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4130 .ilen = 8,
4131 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4132 .rlen = 8,
4133 }, {
4134 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4135 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4136 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4137 .klen = 24,
4138 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4139 .ilen = 8,
4140 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4141 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004142 }, { /* Generated with Crypto++ */
4143 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4144 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4145 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4146 .klen = 24,
4147 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4148 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4149 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4150 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4151 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4152 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4153 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4154 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4155 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4156 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4157 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4158 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4159 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4160 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4161 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4162 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4163 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4164 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4165 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4166 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4167 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4168 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4169 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4170 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4171 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4172 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4173 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4174 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4175 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4176 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4177 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4178 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4179 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4180 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4181 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4182 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4183 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4184 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4185 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4186 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4187 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4188 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4189 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4190 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4191 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4192 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4193 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4194 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4195 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4196 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4197 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4198 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4199 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4200 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4201 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4202 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4203 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4204 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4205 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4206 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4207 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4208 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4209 .ilen = 496,
4210 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4211 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4212 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4213 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4214 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4215 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4216 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4217 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4218 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4219 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4220 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4221 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4222 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4223 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4224 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4225 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4226 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4227 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4228 "\x45\x86\x50\x01\x70\x35\x99\x92"
4229 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4230 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4231 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4232 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4233 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4234 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4235 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4236 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4237 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4238 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4239 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4240 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4241 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4242 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4243 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4244 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4245 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4246 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4247 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4248 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4249 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4250 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4251 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4252 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4253 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4254 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4255 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4256 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4257 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4258 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4259 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4260 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4261 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4262 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4263 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4264 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4265 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4266 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4267 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4268 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4269 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4270 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4271 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4272 .rlen = 496,
4273 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004274 .np = 3,
4275 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004276 },
4277};
4278
4279static struct cipher_testvec des3_ede_dec_tv_template[] = {
4280 { /* These are from openssl */
4281 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4282 "\x55\x55\x55\x55\x55\x55\x55\x55"
4283 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4284 .klen = 24,
4285 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4286 .ilen = 8,
4287 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4288 .rlen = 8,
4289 }, {
4290 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4291 "\x86\x02\x87\x66\x59\x08\x21\x98"
4292 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4293 .klen = 24,
4294 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4295 .ilen = 8,
4296 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4297 .rlen = 8,
4298 }, {
4299 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4300 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4301 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4302 .klen = 24,
4303 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4304 .ilen = 8,
4305 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4306 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004307 }, { /* Generated with Crypto++ */
4308 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4309 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4310 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4311 .klen = 24,
4312 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4313 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4314 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4315 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4316 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4317 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4318 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4319 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4320 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4321 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4322 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4323 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4324 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4325 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4326 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4327 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4328 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4329 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4330 "\x45\x86\x50\x01\x70\x35\x99\x92"
4331 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4332 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4333 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4334 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4335 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4336 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4337 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4338 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4339 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4340 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4341 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4342 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4343 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4344 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4345 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4346 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4347 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4348 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4349 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4350 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4351 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4352 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4353 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4354 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4355 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4356 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4357 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4358 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4359 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4360 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4361 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4362 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4363 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4364 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4365 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4366 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4367 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4368 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4369 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4370 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4371 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4372 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4373 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4374 .ilen = 496,
4375 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4376 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4377 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4378 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4379 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4380 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4381 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4382 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4383 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4384 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4385 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4386 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4387 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4388 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4389 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4390 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4391 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4392 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4393 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4394 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4395 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4396 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4397 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4398 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4399 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4400 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4401 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4402 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4403 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4404 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4405 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4406 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4407 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4408 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4409 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4410 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4411 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4412 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4413 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4414 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4415 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4416 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4417 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4418 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4419 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4420 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4421 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4422 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4423 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4424 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4425 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4426 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4427 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4428 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4429 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4430 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4431 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4432 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4433 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4434 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4435 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4436 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4437 .rlen = 496,
4438 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004439 .np = 3,
4440 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004441 },
4442};
4443
4444static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4445 { /* Generated from openssl */
4446 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4447 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4448 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4449 .klen = 24,
4450 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4451 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4452 "\x53\x20\x63\x65\x65\x72\x73\x74"
4453 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4454 "\x20\x79\x65\x53\x72\x63\x74\x65"
4455 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4456 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4457 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4458 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4459 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4460 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4461 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4462 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4463 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4464 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4465 "\x63\x65\x65\x72\x73\x74\x54\x20"
4466 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4467 .ilen = 128,
4468 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4469 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4470 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4471 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4472 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4473 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4474 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4475 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4476 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4477 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4478 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4479 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4480 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4481 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4482 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4483 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4484 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004485 }, { /* Generated with Crypto++ */
4486 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4487 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4488 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4489 .klen = 24,
4490 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4491 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4492 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4493 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4494 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4495 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4496 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4497 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4498 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4499 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4500 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4501 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4502 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4503 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4504 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4505 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4506 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4507 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4508 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4509 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4510 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4511 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4512 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4513 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4514 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4515 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4516 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4517 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4518 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4519 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4520 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4521 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4522 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4523 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4524 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4525 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4526 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4527 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4528 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4529 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4530 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4531 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4532 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4533 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4534 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4535 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4536 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4537 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4538 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4539 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4540 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4541 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4542 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4543 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4544 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4545 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4546 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4547 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4548 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4549 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4550 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4551 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4552 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4553 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4554 .ilen = 496,
4555 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4556 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4557 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4558 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4559 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4560 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4561 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4562 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4563 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4564 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4565 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4566 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4567 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4568 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4569 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4570 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4571 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4572 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4573 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4574 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4575 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4576 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4577 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4578 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4579 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4580 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4581 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4582 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4583 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4584 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4585 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4586 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4587 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4588 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4589 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4590 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4591 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4592 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4593 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4594 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4595 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4596 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4597 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4598 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4599 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4600 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4601 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4602 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4603 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4604 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4605 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4606 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4607 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4608 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4609 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4610 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4611 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4612 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4613 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4614 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4615 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4616 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4617 .rlen = 496,
4618 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004619 .np = 3,
4620 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004621 },
4622};
4623
4624static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4625 { /* Generated from openssl */
4626 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4627 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4628 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4629 .klen = 24,
4630 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4631 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4632 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4633 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4634 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4635 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4636 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4637 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4638 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4639 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4640 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4641 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4642 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4643 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4644 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4645 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4646 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4647 .ilen = 128,
4648 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4649 "\x53\x20\x63\x65\x65\x72\x73\x74"
4650 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4651 "\x20\x79\x65\x53\x72\x63\x74\x65"
4652 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4653 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4654 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4655 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4656 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4657 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4658 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4659 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4660 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4661 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4662 "\x63\x65\x65\x72\x73\x74\x54\x20"
4663 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4664 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004665 }, { /* Generated with Crypto++ */
4666 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4667 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4668 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4669 .klen = 24,
4670 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4671 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4672 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4673 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4674 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4675 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4676 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4677 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4678 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4679 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4680 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4681 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4682 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4683 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4684 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4685 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4686 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4687 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4688 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4689 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4690 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4691 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4692 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4693 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4694 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4695 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4696 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4697 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4698 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4699 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4700 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4701 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4702 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4703 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4704 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4705 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4706 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4707 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4708 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4709 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4710 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4711 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4712 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4713 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4714 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4715 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4716 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4717 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4718 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4719 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4720 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4721 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4722 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4723 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4724 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4725 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4726 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4727 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4728 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4729 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4730 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4731 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4732 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4733 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4734 .ilen = 496,
4735 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4736 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4737 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4738 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4739 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4740 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4741 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4742 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4743 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4744 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4745 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4746 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4747 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4748 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4749 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4750 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4751 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4752 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4753 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4754 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4755 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4756 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4757 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4758 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4759 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4760 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4761 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4762 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4763 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4764 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4765 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4766 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4767 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4768 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4769 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4770 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4771 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4772 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4773 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4774 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4775 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4776 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4777 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4778 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4779 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4780 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4781 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4782 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4783 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4784 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4785 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4786 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4787 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4788 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4789 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4790 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4791 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4792 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4793 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4794 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4795 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4796 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4797 .rlen = 496,
4798 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004799 .np = 3,
4800 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004801 },
4802};
4803
4804static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
4805 { /* Generated with Crypto++ */
4806 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4807 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4808 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4809 .klen = 24,
4810 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4811 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4812 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4813 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4814 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4815 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4816 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4817 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4818 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4819 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4820 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4821 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4822 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4823 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4824 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4825 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4826 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4827 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4828 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4829 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4830 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4831 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4832 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4833 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4834 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4835 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4836 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4837 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4838 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4839 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4840 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4841 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4842 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4843 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4844 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4845 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4846 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4847 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4848 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4849 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4850 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4851 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4852 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4853 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4854 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4855 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4856 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4857 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4858 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4859 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4860 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4861 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4862 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4863 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4864 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4865 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4866 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4867 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4868 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4869 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4870 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4871 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4872 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4873 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4874 .ilen = 496,
4875 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
4876 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
4877 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
4878 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
4879 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
4880 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
4881 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
4882 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
4883 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
4884 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
4885 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
4886 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
4887 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
4888 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
4889 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
4890 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
4891 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
4892 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
4893 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
4894 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
4895 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
4896 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
4897 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
4898 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
4899 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
4900 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
4901 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
4902 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
4903 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
4904 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
4905 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
4906 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
4907 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
4908 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
4909 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
4910 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
4911 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
4912 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
4913 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
4914 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
4915 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
4916 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
4917 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
4918 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
4919 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
4920 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
4921 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
4922 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
4923 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
4924 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
4925 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
4926 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
4927 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
4928 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
4929 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
4930 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
4931 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
4932 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
4933 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
4934 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
4935 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
4936 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
4937 .rlen = 496,
4938 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004939 .np = 3,
4940 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004941 }, { /* Generated with Crypto++ */
4942 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4943 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4944 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4945 .klen = 24,
4946 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4947 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4948 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4949 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4950 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4951 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4952 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4953 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4954 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4955 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4956 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4957 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4958 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4959 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4960 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4961 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4962 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4963 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4964 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4965 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4966 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4967 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4968 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4969 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4970 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4971 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4972 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4973 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4974 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4975 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4976 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4977 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4978 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4979 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4980 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4981 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4982 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4983 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4984 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4985 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4986 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4987 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4988 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4989 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4990 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4991 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4992 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4993 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4994 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4995 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4996 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4997 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4998 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4999 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5000 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5001 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5002 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5003 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5004 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5005 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5006 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5007 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5008 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5009 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5010 "\x2E\xB1\x18",
5011 .ilen = 499,
5012 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5013 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5014 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5015 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5016 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5017 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5018 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5019 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5020 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5021 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5022 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5023 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5024 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5025 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5026 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5027 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5028 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5029 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5030 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5031 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5032 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5033 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5034 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5035 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5036 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5037 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5038 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5039 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5040 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5041 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5042 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5043 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5044 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5045 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5046 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5047 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5048 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5049 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5050 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5051 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5052 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5053 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5054 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5055 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5056 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5057 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5058 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5059 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5060 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5061 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5062 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5063 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5064 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5065 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5066 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5067 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5068 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5069 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5070 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5071 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5072 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5073 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5074 "\xF2\x79\xD9",
5075 .rlen = 499,
5076 .also_non_np = 1,
5077 .np = 2,
5078 .tap = { 499 - 16, 16 },
5079 },
5080};
5081
5082static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5083 { /* Generated with Crypto++ */
5084 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5085 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5086 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5087 .klen = 24,
5088 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5089 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5090 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5091 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5092 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5093 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5094 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5095 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5096 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5097 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5098 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5099 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5100 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5101 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5102 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5103 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5104 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5105 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5106 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5107 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5108 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5109 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5110 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5111 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5112 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5113 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5114 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5115 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5116 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5117 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5118 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5119 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5120 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5121 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5122 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5123 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5124 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5125 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5126 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5127 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5128 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5129 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5130 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5131 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5132 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5133 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5134 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5135 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5136 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5137 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5138 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5139 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5140 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5141 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5142 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5143 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5144 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5145 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5146 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5147 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5148 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5149 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5150 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5151 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5152 .ilen = 496,
5153 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5154 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5155 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5156 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5157 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5158 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5159 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5160 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5161 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5162 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5163 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5164 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5165 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5166 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5167 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5168 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5169 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5170 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5171 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5172 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5173 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5174 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5175 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5176 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5177 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5178 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5179 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5180 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5181 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5182 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5183 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5184 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5185 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5186 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5187 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5188 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5189 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5190 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5191 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5192 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5193 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5194 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5195 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5196 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5197 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5198 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5199 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5200 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5201 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5202 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5203 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5204 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5205 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5206 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5207 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5208 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5209 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5210 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5211 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5212 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5213 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5214 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5215 .rlen = 496,
5216 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005217 .np = 3,
5218 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005219 }, { /* Generated with Crypto++ */
5220 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5221 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5222 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5223 .klen = 24,
5224 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5225 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5226 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5227 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5228 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5229 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5230 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5231 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5232 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5233 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5234 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5235 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5236 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5237 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5238 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5239 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5240 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5241 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5242 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5243 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5244 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5245 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5246 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5247 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5248 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5249 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5250 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5251 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5252 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5253 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5254 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5255 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5256 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5257 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5258 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5259 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5260 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5261 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5262 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5263 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5264 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5265 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5266 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5267 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5268 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5269 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5270 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5271 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5272 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5273 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5274 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5275 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5276 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5277 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5278 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5279 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5280 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5281 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5282 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5283 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5284 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5285 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5286 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5287 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5288 "\xF2\x79\xD9",
5289 .ilen = 499,
5290 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5291 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5292 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5293 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5294 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5295 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5296 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5297 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5298 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5299 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5300 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5301 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5302 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5303 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5304 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5305 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5306 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5307 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5308 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5309 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5310 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5311 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5312 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5313 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5314 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5315 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5316 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5317 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5318 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5319 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5320 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5321 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5322 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5323 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5324 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5325 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5326 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5327 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5328 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5329 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5330 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5331 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5332 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5333 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5334 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5335 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5336 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5337 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5338 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5339 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5340 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5341 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5342 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5343 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5344 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5345 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5346 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5347 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5348 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5349 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5350 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5351 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5352 "\x2E\xB1\x18",
5353 .rlen = 499,
5354 .also_non_np = 1,
5355 .np = 2,
5356 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005357 },
5358};
5359
5360/*
5361 * Blowfish test vectors.
5362 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005363#define BF_ENC_TEST_VECTORS 7
5364#define BF_DEC_TEST_VECTORS 7
5365#define BF_CBC_ENC_TEST_VECTORS 2
5366#define BF_CBC_DEC_TEST_VECTORS 2
5367#define BF_CTR_ENC_TEST_VECTORS 2
5368#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005369
5370static struct cipher_testvec bf_enc_tv_template[] = {
5371 { /* DES test vectors from OpenSSL */
5372 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5373 .klen = 8,
5374 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5375 .ilen = 8,
5376 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5377 .rlen = 8,
5378 }, {
5379 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5380 .klen = 8,
5381 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5382 .ilen = 8,
5383 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5384 .rlen = 8,
5385 }, {
5386 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5387 .klen = 8,
5388 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5389 .ilen = 8,
5390 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5391 .rlen = 8,
5392 }, { /* Vary the keylength... */
5393 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5394 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5395 .klen = 16,
5396 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5397 .ilen = 8,
5398 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5399 .rlen = 8,
5400 }, {
5401 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5402 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5403 "\x00\x11\x22\x33\x44",
5404 .klen = 21,
5405 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5406 .ilen = 8,
5407 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5408 .rlen = 8,
5409 }, { /* Generated with bf488 */
5410 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5411 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5412 "\x00\x11\x22\x33\x44\x55\x66\x77"
5413 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5414 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5415 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5416 "\xff\xff\xff\xff\xff\xff\xff\xff",
5417 .klen = 56,
5418 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5419 .ilen = 8,
5420 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5421 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005422 }, { /* Generated with Crypto++ */
5423 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5424 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5425 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5426 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5427 .klen = 32,
5428 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5429 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5430 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5431 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005432 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5433 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5434 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5435 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5436 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5437 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5438 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5439 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5440 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5441 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5442 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5443 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5444 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5445 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5446 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5447 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5448 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5449 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5450 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5451 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5452 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5453 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5454 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5455 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5456 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5457 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5458 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5459 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5460 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5461 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5462 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5463 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5464 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5465 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5466 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5467 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5468 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5469 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5470 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5471 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5472 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5473 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5474 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5475 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5476 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5477 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5478 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5479 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5480 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5481 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5482 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5483 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5484 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5485 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5486 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5487 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5488 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5489 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5490 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5491 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005492 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5493 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5494 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5495 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005496 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5497 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5498 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5499 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5500 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5501 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5502 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5503 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5504 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5505 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5506 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5507 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5508 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5509 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5510 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5511 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5512 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5513 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5514 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5515 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5516 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5517 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5518 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5519 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5520 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5521 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5522 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5523 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5524 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5525 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5526 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5527 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5528 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5529 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5530 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5531 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5532 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5533 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5534 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5535 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5536 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5537 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5538 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5539 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5540 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5541 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5542 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5543 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5544 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5545 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5546 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5547 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5548 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5549 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5550 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5551 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5552 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5553 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5554 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5555 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005556 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005557 .np = 3,
5558 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005559 },
5560};
5561
5562static struct cipher_testvec bf_dec_tv_template[] = {
5563 { /* DES test vectors from OpenSSL */
5564 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5565 .klen = 8,
5566 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5567 .ilen = 8,
5568 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5569 .rlen = 8,
5570 }, {
5571 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5572 .klen = 8,
5573 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5574 .ilen = 8,
5575 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5576 .rlen = 8,
5577 }, {
5578 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5579 .klen = 8,
5580 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5581 .ilen = 8,
5582 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5583 .rlen = 8,
5584 }, { /* Vary the keylength... */
5585 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5586 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5587 .klen = 16,
5588 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5589 .ilen = 8,
5590 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5591 .rlen = 8,
5592 }, {
5593 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5594 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5595 "\x00\x11\x22\x33\x44",
5596 .klen = 21,
5597 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5598 .ilen = 8,
5599 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5600 .rlen = 8,
5601 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5602 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5603 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5604 "\x00\x11\x22\x33\x44\x55\x66\x77"
5605 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5606 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5607 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5608 "\xff\xff\xff\xff\xff\xff\xff\xff",
5609 .klen = 56,
5610 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5611 .ilen = 8,
5612 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5613 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005614 }, { /* Generated with Crypto++ */
5615 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5616 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5617 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5618 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5619 .klen = 32,
5620 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5621 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5622 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5623 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005624 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5625 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5626 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5627 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5628 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5629 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5630 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5631 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5632 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5633 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5634 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5635 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5636 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5637 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5638 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5639 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5640 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5641 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5642 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5643 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5644 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5645 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5646 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5647 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5648 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5649 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5650 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5651 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5652 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5653 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5654 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5655 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5656 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5657 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5658 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5659 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5660 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5661 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5662 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5663 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5664 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5665 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5666 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5667 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5668 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5669 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5670 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5671 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5672 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5673 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5674 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5675 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5676 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5677 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5678 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5679 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5680 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5681 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5682 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5683 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005684 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5685 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5686 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5687 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005688 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5689 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5690 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5691 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5692 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5693 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5694 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5695 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5696 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5697 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5698 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5699 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5700 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5701 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5702 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5703 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5704 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5705 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5706 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5707 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5708 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5709 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5710 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5711 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5712 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5713 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5714 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5715 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5716 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5717 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5718 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5719 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5720 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5721 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5722 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5723 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5724 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5725 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5726 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5727 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5728 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5729 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5730 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5731 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5732 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5733 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5734 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5735 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5736 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5737 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5738 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5739 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5740 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5741 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5742 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5743 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5744 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5745 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5746 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5747 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005748 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005749 .np = 3,
5750 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005751 },
5752};
5753
5754static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5755 { /* From OpenSSL */
5756 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5757 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5758 .klen = 16,
5759 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5760 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
5761 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5762 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5763 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5764 .ilen = 32,
5765 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5766 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5767 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5768 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5769 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005770 }, { /* Generated with Crypto++ */
5771 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5772 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5773 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5774 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5775 .klen = 32,
5776 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5777 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5778 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5779 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5780 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005781 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5782 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5783 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5784 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5785 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5786 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5787 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5788 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5789 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5790 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5791 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5792 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5793 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5794 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5795 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5796 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5797 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5798 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5799 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5800 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5801 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5802 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5803 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5804 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5805 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5806 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5807 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5808 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5809 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5810 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5811 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5812 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5813 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5814 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5815 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5816 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5817 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5818 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5819 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5820 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5821 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5822 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5823 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5824 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5825 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5826 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5827 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5828 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5829 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5830 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5831 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5832 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5833 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5834 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5835 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5836 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5837 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5838 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5839 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5840 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005841 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5842 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5843 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5844 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005845 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5846 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5847 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5848 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5849 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5850 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5851 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5852 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5853 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5854 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5855 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5856 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5857 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5858 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5859 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5860 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5861 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5862 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5863 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5864 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5865 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5866 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5867 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5868 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5869 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5870 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5871 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5872 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5873 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5874 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5875 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5876 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5877 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5878 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5879 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5880 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5881 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5882 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5883 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5884 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5885 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5886 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5887 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5888 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
5889 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
5890 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
5891 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
5892 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
5893 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
5894 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
5895 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
5896 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
5897 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
5898 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
5899 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
5900 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
5901 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
5902 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
5903 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
5904 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005905 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005906 .np = 3,
5907 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005908 },
5909};
5910
5911static struct cipher_testvec bf_cbc_dec_tv_template[] = {
5912 { /* From OpenSSL */
5913 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5914 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5915 .klen = 16,
5916 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5917 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5918 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5919 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5920 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5921 .ilen = 32,
5922 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
5923 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5924 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5925 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5926 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005927 }, { /* Generated with Crypto++ */
5928 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5929 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5930 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5931 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5932 .klen = 32,
5933 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5934 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5935 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5936 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5937 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005938 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5939 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5940 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5941 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5942 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5943 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5944 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5945 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5946 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5947 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5948 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5949 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5950 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5951 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5952 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5953 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5954 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5955 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5956 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5957 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5958 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5959 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5960 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5961 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5962 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5963 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5964 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5965 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5966 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5967 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5968 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5969 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5970 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5971 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5972 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5973 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5974 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5975 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5976 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5977 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5978 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5979 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5980 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5981 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
5982 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
5983 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
5984 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
5985 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
5986 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
5987 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
5988 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
5989 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
5990 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
5991 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
5992 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
5993 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
5994 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
5995 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
5996 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
5997 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005998 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5999 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6000 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6001 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006002 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6003 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6004 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6005 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6006 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6007 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6008 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6009 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6010 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6011 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6012 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6013 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6014 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6015 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6016 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6017 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6018 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6019 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6020 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6021 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6022 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6023 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6024 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6025 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6026 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6027 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6028 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6029 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6030 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6031 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6032 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6033 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6034 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6035 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6036 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6037 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6038 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6039 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6040 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6041 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6042 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6043 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6044 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6045 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6046 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6047 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6048 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6049 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6050 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6051 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6052 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6053 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6054 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6055 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6056 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6057 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6058 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6059 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6060 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6061 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006062 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006063 .np = 3,
6064 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006065 },
6066};
6067
6068static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6069 { /* Generated with Crypto++ */
6070 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6071 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6072 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6073 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6074 .klen = 32,
6075 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6076 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6077 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6078 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6079 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006080 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6081 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6082 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6083 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6084 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6085 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6086 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6087 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6088 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6089 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6090 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6091 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6092 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6093 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6094 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6095 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6096 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6097 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6098 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6099 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6100 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6101 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6102 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6103 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6104 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6105 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6106 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6107 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6108 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6109 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6110 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6111 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6112 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6113 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6114 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6115 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6116 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6117 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6118 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6119 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6120 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6121 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6122 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6123 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6124 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6125 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6126 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6127 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6128 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6129 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6130 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6131 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6132 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6133 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6134 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6135 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6136 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6137 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6138 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6139 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006140 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6141 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6142 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6143 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006144 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6145 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6146 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6147 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6148 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6149 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6150 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6151 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6152 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6153 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6154 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6155 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6156 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6157 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6158 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6159 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6160 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6161 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6162 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6163 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6164 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6165 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6166 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6167 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6168 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6169 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6170 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6171 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6172 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6173 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6174 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6175 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6176 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6177 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6178 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6179 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6180 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6181 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6182 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6183 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6184 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6185 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6186 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6187 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6188 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6189 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6190 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6191 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6192 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6193 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6194 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6195 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6196 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6197 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6198 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6199 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6200 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6201 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6202 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6203 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006204 }, { /* Generated with Crypto++ */
6205 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6206 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6207 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6208 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6209 .klen = 32,
6210 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6211 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6212 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6213 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6214 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6215 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006216 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6217 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6218 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6219 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6220 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6221 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6222 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6223 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6224 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6225 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6226 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6227 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6228 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6229 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6230 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6231 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6232 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6233 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6234 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6235 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6236 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6237 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6238 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6239 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6240 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6241 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6242 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6243 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6244 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6245 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6246 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6247 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6248 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6249 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6250 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6251 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6252 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6253 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6254 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6255 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6256 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6257 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6258 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6259 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6260 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6261 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6262 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6263 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6264 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6265 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6266 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6267 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6268 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6269 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6270 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6271 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6272 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6273 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6274 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006275 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6276 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6277 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6278 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6279 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006280 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6281 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6282 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6283 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6284 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6285 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6286 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6287 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6288 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6289 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6290 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6291 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6292 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6293 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6294 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6295 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6296 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6297 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6298 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6299 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6300 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6301 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6302 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6303 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6304 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6305 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6306 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6307 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6308 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6309 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6310 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6311 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6312 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6313 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6314 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6315 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6316 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6317 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6318 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6319 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6320 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6321 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6322 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6323 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6324 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6325 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6326 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6327 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6328 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6329 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6330 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6331 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6332 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6333 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6334 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6335 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6336 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6337 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6338 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006339 .also_non_np = 1,
6340 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006341 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006342 }, { /* Generated with Crypto++ */
6343 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6344 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6345 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6346 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6347 .klen = 32,
6348 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6349 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6350 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6351 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6352 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6353 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6354 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6355 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6356 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6357 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6358 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6359 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6360 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6361 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6362 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6363 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6364 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6365 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6366 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6367 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6368 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6369 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6370 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6371 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6372 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6373 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6374 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6375 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6376 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6377 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6378 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6379 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6380 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6381 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6382 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6383 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6384 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6385 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6386 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6387 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6388 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6389 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6390 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6391 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6392 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6393 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6394 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6395 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6396 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6397 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6398 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6399 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6400 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6401 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6402 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6403 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6404 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6405 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6406 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6407 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6408 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6409 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6410 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6411 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6412 .ilen = 504,
6413 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6414 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6415 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6416 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6417 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6418 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6419 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6420 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6421 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6422 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6423 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6424 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6425 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6426 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6427 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6428 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6429 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6430 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6431 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6432 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6433 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6434 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6435 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6436 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6437 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6438 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6439 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6440 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6441 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6442 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6443 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6444 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6445 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6446 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6447 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6448 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6449 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6450 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6451 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6452 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6453 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6454 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6455 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6456 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6457 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6458 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6459 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6460 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6461 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6462 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6463 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6464 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6465 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6466 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6467 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6468 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6469 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6470 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6471 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6472 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6473 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6474 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6475 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6476 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006477 },
6478};
6479
6480static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6481 { /* Generated with Crypto++ */
6482 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6483 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6484 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6485 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6486 .klen = 32,
6487 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6488 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6489 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6490 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6491 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006492 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6493 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6494 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6495 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6496 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6497 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6498 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6499 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6500 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6501 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6502 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6503 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6504 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6505 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6506 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6507 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6508 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6509 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6510 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6511 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6512 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6513 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6514 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6515 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6516 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6517 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6518 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6519 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6520 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6521 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6522 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6523 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6524 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6525 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6526 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6527 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6528 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6529 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6530 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6531 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6532 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6533 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6534 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6535 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6536 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6537 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6538 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6539 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6540 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6541 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6542 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6543 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6544 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6545 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6546 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6547 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6548 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6549 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6550 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6551 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006552 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6553 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6554 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6555 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006556 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6557 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6558 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6559 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6560 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6561 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6562 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6563 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6564 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6565 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6566 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6567 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6568 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6569 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6570 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6571 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6572 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6573 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6574 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6575 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6576 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6577 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6578 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6579 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6580 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6581 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6582 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6583 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6584 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6585 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6586 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6587 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6588 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6589 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6590 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6591 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6592 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6593 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6594 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6595 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6596 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6597 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6598 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6599 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6600 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6601 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6602 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6603 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6604 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6605 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6606 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6607 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6608 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6609 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6610 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6611 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6612 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6613 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6614 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6615 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006616 }, { /* Generated with Crypto++ */
6617 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6618 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6619 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6620 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6621 .klen = 32,
6622 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6623 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6624 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6625 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6626 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6627 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006628 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6629 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6630 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6631 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6632 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6633 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6634 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6635 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6636 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6637 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6638 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6639 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6640 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6641 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6642 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6643 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6644 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6645 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6646 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6647 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6648 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6649 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6650 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6651 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6652 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6653 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6654 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6655 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6656 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6657 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6658 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6659 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6660 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6661 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6662 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6663 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6664 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6665 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6666 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6667 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6668 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6669 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6670 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6671 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6672 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6673 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6674 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6675 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6676 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6677 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6678 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6679 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6680 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6681 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6682 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6683 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6684 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6685 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6686 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006687 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6688 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6689 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6690 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6691 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006692 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6693 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6694 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6695 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6696 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6697 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6698 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6699 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6700 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6701 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6702 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6703 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6704 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6705 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6706 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6707 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6708 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6709 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6710 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6711 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6712 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6713 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6714 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6715 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6716 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6717 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6718 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6719 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6720 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6721 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6722 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6723 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6724 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6725 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6726 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6727 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6728 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6729 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6730 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6731 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6732 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6733 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6734 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6735 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6736 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6737 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6738 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6739 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6740 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6741 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6742 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6743 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6744 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6745 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6746 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6747 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6748 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6749 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6750 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006751 .also_non_np = 1,
6752 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006753 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006754 }, { /* Generated with Crypto++ */
6755 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6756 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6757 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6758 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6759 .klen = 32,
6760 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6761 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6762 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6763 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6764 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6765 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6766 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6767 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6768 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6769 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6770 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6771 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6772 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6773 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6774 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6775 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6776 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6777 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6778 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6779 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6780 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6781 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6782 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6783 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6784 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6785 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6786 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6787 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6788 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6789 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6790 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6791 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6792 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6793 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6794 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6795 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6796 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6797 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6798 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6799 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6800 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6801 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6802 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6803 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6804 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6805 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6806 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6807 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6808 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6809 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6810 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6811 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6812 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6813 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6814 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6815 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6816 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6817 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6818 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6819 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6820 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6821 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6822 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6823 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6824 .ilen = 504,
6825 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6826 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6827 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6828 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6829 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6830 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6831 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6832 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6833 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6834 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6835 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6836 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6837 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6838 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6839 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6840 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6841 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6842 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6843 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6844 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6845 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6846 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6847 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6848 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6849 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6850 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6851 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6852 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6853 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6854 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6855 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6856 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6857 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6858 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6859 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6860 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6861 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6862 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6863 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6864 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6865 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6866 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6867 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6868 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6869 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6870 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6871 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6872 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6873 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6874 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6875 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6876 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6877 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6878 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6879 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6880 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6881 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6882 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6883 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6884 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6885 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6886 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6887 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6888 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08006889 },
6890};
6891
6892/*
6893 * Twofish test vectors.
6894 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03006895#define TF_ENC_TEST_VECTORS 4
6896#define TF_DEC_TEST_VECTORS 4
6897#define TF_CBC_ENC_TEST_VECTORS 5
6898#define TF_CBC_DEC_TEST_VECTORS 5
6899#define TF_CTR_ENC_TEST_VECTORS 2
6900#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03006901#define TF_LRW_ENC_TEST_VECTORS 8
6902#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03006903#define TF_XTS_ENC_TEST_VECTORS 5
6904#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08006905
6906static struct cipher_testvec tf_enc_tv_template[] = {
6907 {
6908 .key = zeroed_string,
6909 .klen = 16,
6910 .input = zeroed_string,
6911 .ilen = 16,
6912 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6913 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6914 .rlen = 16,
6915 }, {
6916 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6917 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6918 "\x00\x11\x22\x33\x44\x55\x66\x77",
6919 .klen = 24,
6920 .input = zeroed_string,
6921 .ilen = 16,
6922 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
6923 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
6924 .rlen = 16,
6925 }, {
6926 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6927 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6928 "\x00\x11\x22\x33\x44\x55\x66\x77"
6929 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6930 .klen = 32,
6931 .input = zeroed_string,
6932 .ilen = 16,
6933 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
6934 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
6935 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006936 }, { /* Generated with Crypto++ */
6937 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
6938 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
6939 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
6940 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
6941 .klen = 32,
6942 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6943 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6944 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6945 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6946 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6947 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6948 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006949 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6950 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6951 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6952 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6953 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6954 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6955 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6956 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6957 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6958 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6959 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6960 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6961 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6962 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6963 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6964 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6965 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6966 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6967 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6968 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6969 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6970 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6971 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6972 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6973 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6974 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6975 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6976 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6977 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6978 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6979 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6980 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6981 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6982 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6983 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6984 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6985 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6986 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6987 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6988 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6989 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6990 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6991 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6992 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6993 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6994 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6995 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6996 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6997 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6998 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6999 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7000 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7001 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7002 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7003 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7004 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007005 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7006 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7007 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7008 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7009 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7010 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7011 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007012 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7013 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7014 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7015 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7016 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7017 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7018 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7019 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7020 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7021 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7022 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7023 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7024 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7025 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7026 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7027 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7028 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7029 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7030 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7031 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7032 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7033 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7034 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7035 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7036 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7037 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7038 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7039 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7040 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7041 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7042 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7043 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7044 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7045 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7046 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7047 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7048 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7049 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7050 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7051 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7052 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7053 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7054 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7055 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7056 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7057 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7058 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7059 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7060 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7061 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7062 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7063 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7064 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7065 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7066 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7067 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007068 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007069 .np = 3,
7070 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007071 },
7072};
7073
7074static struct cipher_testvec tf_dec_tv_template[] = {
7075 {
7076 .key = zeroed_string,
7077 .klen = 16,
7078 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7079 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7080 .ilen = 16,
7081 .result = zeroed_string,
7082 .rlen = 16,
7083 }, {
7084 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7085 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7086 "\x00\x11\x22\x33\x44\x55\x66\x77",
7087 .klen = 24,
7088 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7089 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7090 .ilen = 16,
7091 .result = zeroed_string,
7092 .rlen = 16,
7093 }, {
7094 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7095 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7096 "\x00\x11\x22\x33\x44\x55\x66\x77"
7097 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7098 .klen = 32,
7099 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7100 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7101 .ilen = 16,
7102 .result = zeroed_string,
7103 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007104 }, { /* Generated with Crypto++ */
7105 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7106 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7107 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7108 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7109 .klen = 32,
7110 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7111 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7112 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7113 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7114 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7115 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7116 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007117 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7118 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7119 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7120 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7121 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7122 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7123 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7124 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7125 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7126 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7127 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7128 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7129 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7130 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7131 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7132 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7133 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7134 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7135 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7136 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7137 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7138 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7139 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7140 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7141 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7142 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7143 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7144 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7145 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7146 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7147 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7148 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7149 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7150 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7151 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7152 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7153 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7154 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7155 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7156 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7157 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7158 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7159 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7160 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7161 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7162 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7163 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7164 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7165 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7166 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7167 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7168 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7169 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7170 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7171 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7172 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007173 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7174 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7175 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7176 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7177 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7178 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7179 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007180 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7181 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7182 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7183 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7184 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7185 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7186 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7187 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7188 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7189 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7190 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7191 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7192 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7193 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7194 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7195 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7196 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7197 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7198 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7199 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7200 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7201 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7202 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7203 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7204 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7205 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7206 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7207 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7208 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7209 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7210 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7211 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7212 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7213 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7214 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7215 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7216 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7217 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7218 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7219 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7220 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7221 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7222 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7223 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7224 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7225 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7226 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7227 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7228 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7229 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7230 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7231 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7232 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7233 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7234 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7235 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007236 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007237 .np = 3,
7238 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007239 },
7240};
7241
7242static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7243 { /* Generated with Nettle */
7244 .key = zeroed_string,
7245 .klen = 16,
7246 .iv = zeroed_string,
7247 .input = zeroed_string,
7248 .ilen = 16,
7249 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7250 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7251 .rlen = 16,
7252 }, {
7253 .key = zeroed_string,
7254 .klen = 16,
7255 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7256 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7257 .input = zeroed_string,
7258 .ilen = 16,
7259 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7260 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7261 .rlen = 16,
7262 }, {
7263 .key = zeroed_string,
7264 .klen = 16,
7265 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7266 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7267 .input = zeroed_string,
7268 .ilen = 16,
7269 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7270 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7271 .rlen = 16,
7272 }, {
7273 .key = zeroed_string,
7274 .klen = 16,
7275 .iv = zeroed_string,
7276 .input = zeroed_string,
7277 .ilen = 48,
7278 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7279 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7280 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7281 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7282 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7283 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7284 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007285 }, { /* Generated with Crypto++ */
7286 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7287 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7288 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7289 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7290 .klen = 32,
7291 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7292 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7293 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7294 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7295 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7296 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7297 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7298 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7299 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007300 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7301 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7302 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7303 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7304 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7305 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7306 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7307 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7308 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7309 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7310 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7311 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7312 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7313 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7314 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7315 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7316 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7317 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7318 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7319 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7320 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7321 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7322 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7323 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7324 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7325 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7326 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7327 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7328 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7329 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7330 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7331 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7332 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7333 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7334 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7335 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7336 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7337 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7338 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7339 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7340 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7341 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7342 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7343 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7344 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7345 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7346 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7347 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7348 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7349 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7350 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7351 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7352 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7353 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7354 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7355 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007356 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7357 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7358 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7359 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7360 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7361 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7362 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007363 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7364 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7365 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7366 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7367 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7368 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7369 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7370 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7371 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7372 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7373 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7374 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7375 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7376 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7377 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7378 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7379 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7380 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7381 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7382 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7383 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7384 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7385 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7386 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7387 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7388 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7389 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7390 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7391 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7392 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7393 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7394 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7395 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7396 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7397 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7398 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7399 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7400 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7401 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7402 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7403 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7404 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7405 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7406 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7407 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7408 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7409 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7410 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7411 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7412 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7413 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7414 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7415 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7416 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7417 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7418 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007419 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007420 .np = 3,
7421 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007422 },
7423};
7424
7425static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7426 { /* Reverse of the first four above */
7427 .key = zeroed_string,
7428 .klen = 16,
7429 .iv = zeroed_string,
7430 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7431 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7432 .ilen = 16,
7433 .result = zeroed_string,
7434 .rlen = 16,
7435 }, {
7436 .key = zeroed_string,
7437 .klen = 16,
7438 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7439 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7440 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7441 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7442 .ilen = 16,
7443 .result = zeroed_string,
7444 .rlen = 16,
7445 }, {
7446 .key = zeroed_string,
7447 .klen = 16,
7448 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7449 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7450 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7451 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7452 .ilen = 16,
7453 .result = zeroed_string,
7454 .rlen = 16,
7455 }, {
7456 .key = zeroed_string,
7457 .klen = 16,
7458 .iv = zeroed_string,
7459 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7460 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7461 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7462 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7463 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7464 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7465 .ilen = 48,
7466 .result = zeroed_string,
7467 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007468 }, { /* Generated with Crypto++ */
7469 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7470 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7471 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7472 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7473 .klen = 32,
7474 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7475 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7476 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7477 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7478 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7479 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7480 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7481 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7482 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007483 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7484 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7485 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7486 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7487 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7488 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7489 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7490 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7491 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7492 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7493 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7494 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7495 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7496 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7497 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7498 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7499 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7500 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7501 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7502 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7503 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7504 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7505 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7506 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7507 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7508 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7509 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7510 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7511 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7512 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7513 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7514 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7515 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7516 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7517 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7518 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7519 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7520 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7521 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7522 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7523 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7524 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7525 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7526 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7527 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7528 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7529 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7530 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7531 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7532 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7533 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7534 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7535 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7536 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7537 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7538 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007539 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7540 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7541 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7542 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7543 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7544 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7545 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007546 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7547 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7548 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7549 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7550 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7551 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7552 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7553 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7554 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7555 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7556 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7557 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7558 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7559 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7560 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7561 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7562 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7563 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7564 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7565 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7566 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7567 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7568 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7569 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7570 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7571 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7572 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7573 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7574 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7575 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7576 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7577 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7578 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7579 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7580 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7581 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7582 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7583 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7584 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7585 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7586 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7587 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7588 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7589 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7590 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7591 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7592 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7593 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7594 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7595 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7596 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7597 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7598 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7599 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7600 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7601 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007602 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007603 .np = 3,
7604 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007605 },
7606};
7607
7608static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7609 { /* Generated with Crypto++ */
7610 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7611 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7612 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7613 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7614 .klen = 32,
7615 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7616 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7617 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7618 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7619 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7620 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7621 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7622 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7623 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007624 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7625 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7626 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7627 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7628 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7629 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7630 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7631 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7632 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7633 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7634 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7635 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7636 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7637 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7638 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7639 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7640 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7641 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7642 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7643 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7644 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7645 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7646 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7647 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7648 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7649 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7650 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7651 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7652 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7653 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7654 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7655 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7656 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7657 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7658 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7659 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7660 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7661 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7662 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7663 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7664 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7665 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7666 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7667 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7668 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7669 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7670 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7671 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7672 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7673 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7674 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7675 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7676 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7677 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7678 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7679 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007680 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7681 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7682 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7683 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7684 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7685 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7686 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007687 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7688 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7689 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7690 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7691 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7692 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7693 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7694 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7695 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7696 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7697 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7698 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7699 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7700 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7701 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7702 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7703 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7704 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7705 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7706 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7707 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7708 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7709 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7710 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7711 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7712 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7713 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7714 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7715 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7716 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7717 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7718 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7719 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7720 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7721 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7722 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7723 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7724 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7725 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7726 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7727 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7728 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7729 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7730 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7731 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7732 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7733 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7734 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7735 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7736 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7737 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7738 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7739 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7740 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7741 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7742 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007743 }, { /* Generated with Crypto++ */
7744 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7745 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7746 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7747 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7748 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007749 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7750 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7751 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7752 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7753 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7754 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7755 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7756 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7757 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7758 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7759 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7760 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7761 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7762 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7763 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7764 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7765 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7766 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7767 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7768 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7769 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7770 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7771 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7772 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7773 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7774 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7775 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7776 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7777 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7778 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7779 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7780 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7781 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7782 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7783 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7784 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7785 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7786 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7787 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7788 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7789 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7790 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7791 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7792 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7793 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7794 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7795 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7796 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7797 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7798 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7799 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7800 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7801 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7802 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7803 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7804 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7805 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7806 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7807 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7808 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7809 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7810 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7811 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7812 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7813 .ilen = 496,
7814 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
7815 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
7816 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
7817 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
7818 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
7819 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
7820 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
7821 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
7822 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
7823 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
7824 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
7825 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
7826 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
7827 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
7828 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
7829 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
7830 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
7831 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
7832 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
7833 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
7834 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
7835 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
7836 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
7837 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
7838 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
7839 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
7840 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
7841 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
7842 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
7843 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
7844 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
7845 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
7846 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
7847 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
7848 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
7849 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
7850 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
7851 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
7852 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
7853 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
7854 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
7855 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
7856 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
7857 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
7858 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
7859 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
7860 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
7861 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
7862 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
7863 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
7864 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
7865 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
7866 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
7867 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
7868 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
7869 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
7870 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
7871 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
7872 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
7873 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
7874 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
7875 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
7876 .rlen = 496,
7877 }, { /* Generated with Crypto++ */
7878 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7879 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7880 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7881 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7882 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007883 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7884 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7885 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7886 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7887 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7888 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7889 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7890 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7891 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7892 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007893 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7894 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7895 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7896 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7897 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7898 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7899 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7900 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7901 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7902 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7903 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7904 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7905 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7906 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7907 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7908 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7909 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7910 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7911 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7912 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7913 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7914 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7915 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7916 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7917 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7918 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7919 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7920 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7921 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7922 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7923 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7924 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7925 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7926 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7927 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7928 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7929 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7930 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7931 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7932 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7933 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7934 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7935 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7936 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7937 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7938 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7939 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7940 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7941 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7942 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7943 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7944 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7945 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7946 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7947 "\x2B\xC2\x59",
7948 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007949 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7950 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7951 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7952 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7953 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7954 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7955 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7956 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007957 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7958 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7959 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7960 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7961 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7962 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7963 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7964 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7965 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7966 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7967 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7968 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7969 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7970 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7971 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7972 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7973 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7974 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7975 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7976 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7977 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7978 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7979 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7980 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7981 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7982 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7983 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7984 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7985 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7986 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7987 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7988 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7989 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7990 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7991 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7992 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7993 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7994 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7995 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7996 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7997 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7998 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7999 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8000 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8001 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8002 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8003 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8004 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8005 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8006 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8007 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8008 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8009 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8010 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8011 "\x6C\x82\x9D",
8012 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008013 .also_non_np = 1,
8014 .np = 2,
8015 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008016 },
8017};
8018
8019static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8020 { /* Generated with Crypto++ */
8021 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8022 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8023 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8024 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8025 .klen = 32,
8026 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8027 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8028 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8029 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8030 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8031 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8032 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8033 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8034 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008035 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8036 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8037 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8038 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8039 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8040 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8041 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8042 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8043 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8044 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8045 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8046 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8047 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8048 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8049 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8050 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8051 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8052 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8053 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8054 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8055 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8056 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8057 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8058 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8059 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8060 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8061 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8062 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8063 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8064 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8065 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8066 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8067 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8068 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8069 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8070 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8071 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8072 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8073 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8074 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8075 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8076 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8077 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8078 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8079 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8080 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8081 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8082 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8083 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8084 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8085 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8086 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8087 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8088 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8089 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8090 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008091 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8092 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8093 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8094 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8095 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8096 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8097 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008098 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8099 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8100 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8101 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8102 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8103 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8104 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8105 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8106 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8107 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8108 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8109 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8110 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8111 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8112 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8113 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8114 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8115 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8116 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8117 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8118 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8119 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8120 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8121 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8122 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8123 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8124 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8125 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8126 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8127 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8128 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8129 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8130 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8131 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8132 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8133 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8134 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8135 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8136 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8137 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8138 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8139 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8140 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8141 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8142 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8143 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8144 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8145 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8146 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8147 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8148 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8149 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8150 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8151 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8152 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8153 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008154 }, { /* Generated with Crypto++ */
8155 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8156 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8157 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8158 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8159 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008160 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8161 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8162 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8163 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8164 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8165 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8166 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8167 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8168 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8169 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8170 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8171 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8172 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8173 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8174 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8175 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8176 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8177 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8178 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8179 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8180 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8181 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8182 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8183 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8184 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8185 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8186 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8187 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8188 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8189 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8190 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8191 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8192 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8193 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8194 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8195 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8196 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8197 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8198 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8199 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8200 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8201 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8202 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8203 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8204 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8205 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8206 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8207 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8208 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8209 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8210 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8211 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8212 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8213 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8214 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8215 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8216 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8217 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8218 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8219 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8220 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8221 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8222 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8223 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8224 .ilen = 496,
8225 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8226 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8227 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8228 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8229 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8230 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8231 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8232 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8233 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8234 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8235 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8236 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8237 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8238 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8239 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8240 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8241 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8242 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8243 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8244 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8245 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8246 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8247 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8248 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8249 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8250 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8251 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8252 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8253 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8254 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8255 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8256 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8257 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8258 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8259 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8260 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8261 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8262 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8263 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8264 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8265 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8266 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8267 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8268 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8269 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8270 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8271 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8272 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8273 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8274 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8275 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8276 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8277 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8278 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8279 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8280 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8281 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8282 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8283 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8284 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8285 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8286 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8287 .rlen = 496,
8288 }, { /* Generated with Crypto++ */
8289 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8290 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8291 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8292 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8293 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008294 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8295 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8296 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8297 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8298 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8299 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8300 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8301 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8302 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8303 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008304 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8305 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8306 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8307 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8308 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8309 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8310 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8311 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8312 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8313 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8314 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8315 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8316 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8317 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8318 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8319 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8320 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8321 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8322 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8323 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8324 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8325 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8326 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8327 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8328 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8329 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8330 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8331 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8332 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8333 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8334 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8335 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8336 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8337 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8338 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8339 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8340 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8341 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8342 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8343 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8344 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8345 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8346 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8347 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8348 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8349 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8350 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8351 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8352 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8353 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8354 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8355 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8356 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8357 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8358 "\x6C\x82\x9D",
8359 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008360 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8361 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8362 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8363 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8364 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8365 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8366 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8367 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008368 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8369 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8370 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8371 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8372 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8373 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8374 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8375 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8376 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8377 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8378 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8379 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8380 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8381 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8382 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8383 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8384 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8385 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8386 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8387 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8388 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8389 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8390 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8391 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8392 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8393 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8394 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8395 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8396 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8397 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8398 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8399 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8400 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8401 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8402 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8403 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8404 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8405 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8406 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8407 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8408 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8409 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8410 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8411 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8412 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8413 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8414 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8415 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8416 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8417 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8418 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8419 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8420 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8421 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8422 "\x2B\xC2\x59",
8423 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008424 .also_non_np = 1,
8425 .np = 2,
8426 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008427 },
8428};
8429
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008430static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8431 /* Generated from AES-LRW test vectors */
8432 {
8433 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8434 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8435 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8436 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8437 .klen = 32,
8438 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8439 "\x00\x00\x00\x00\x00\x00\x00\x01",
8440 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8441 "\x38\x39\x41\x42\x43\x44\x45\x46",
8442 .ilen = 16,
8443 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8444 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8445 .rlen = 16,
8446 }, {
8447 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8448 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8449 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8450 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8451 .klen = 32,
8452 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8453 "\x00\x00\x00\x00\x00\x00\x00\x02",
8454 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8455 "\x38\x39\x41\x42\x43\x44\x45\x46",
8456 .ilen = 16,
8457 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8458 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8459 .rlen = 16,
8460 }, {
8461 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8462 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8463 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8464 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8465 .klen = 32,
8466 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8467 "\x00\x00\x00\x02\x00\x00\x00\x00",
8468 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8469 "\x38\x39\x41\x42\x43\x44\x45\x46",
8470 .ilen = 16,
8471 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8472 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8473 .rlen = 16,
8474 }, {
8475 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8476 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8477 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8478 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8479 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8480 .klen = 40,
8481 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8482 "\x00\x00\x00\x00\x00\x00\x00\x01",
8483 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8484 "\x38\x39\x41\x42\x43\x44\x45\x46",
8485 .ilen = 16,
8486 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8487 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8488 .rlen = 16,
8489 }, {
8490 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8491 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8492 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8493 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8494 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8495 .klen = 40,
8496 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8497 "\x00\x00\x00\x02\x00\x00\x00\x00",
8498 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8499 "\x38\x39\x41\x42\x43\x44\x45\x46",
8500 .ilen = 16,
8501 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8502 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8503 .rlen = 16,
8504 }, {
8505 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8506 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8507 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8508 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8509 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8510 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8511 .klen = 48,
8512 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8513 "\x00\x00\x00\x00\x00\x00\x00\x01",
8514 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8515 "\x38\x39\x41\x42\x43\x44\x45\x46",
8516 .ilen = 16,
8517 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8518 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8519 .rlen = 16,
8520 }, {
8521 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8522 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8523 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8524 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8525 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8526 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8527 .klen = 48,
8528 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8529 "\x00\x00\x00\x02\x00\x00\x00\x00",
8530 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8531 "\x38\x39\x41\x42\x43\x44\x45\x46",
8532 .ilen = 16,
8533 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8534 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8535 .rlen = 16,
8536 }, {
8537 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8538 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8539 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8540 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8541 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8542 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8543 .klen = 48,
8544 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8545 "\x00\x00\x00\x00\x00\x00\x00\x01",
8546 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8547 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8548 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8549 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8550 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8551 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8552 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8553 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8554 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8555 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8556 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8557 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8558 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8559 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8560 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8561 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8562 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8563 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8564 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8565 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8566 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8567 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8568 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8569 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8570 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8571 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8572 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8573 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8574 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8575 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8576 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8577 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8578 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8579 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8580 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8581 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8582 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8583 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8584 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8585 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8586 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8587 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8588 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8589 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8590 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8591 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8592 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8593 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8594 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8595 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8596 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8597 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8598 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8599 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8600 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8601 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8602 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8603 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8604 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8605 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8606 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8607 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8608 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8609 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8610 .ilen = 512,
8611 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8612 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8613 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8614 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8615 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8616 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8617 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8618 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8619 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8620 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8621 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8622 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8623 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8624 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8625 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8626 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8627 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8628 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8629 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8630 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8631 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8632 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8633 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8634 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8635 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8636 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8637 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8638 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8639 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8640 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8641 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8642 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8643 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8644 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8645 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8646 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8647 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8648 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8649 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8650 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8651 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8652 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8653 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8654 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8655 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8656 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8657 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8658 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8659 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8660 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8661 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8662 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8663 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8664 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8665 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8666 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8667 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8668 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8669 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8670 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8671 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8672 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8673 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8674 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8675 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008676 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008677 .np = 3,
8678 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008679 },
8680};
8681
8682static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8683 /* Generated from AES-LRW test vectors */
8684 /* same as enc vectors with input and result reversed */
8685 {
8686 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8687 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8688 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8689 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8690 .klen = 32,
8691 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8692 "\x00\x00\x00\x00\x00\x00\x00\x01",
8693 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8694 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8695 .ilen = 16,
8696 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8697 "\x38\x39\x41\x42\x43\x44\x45\x46",
8698 .rlen = 16,
8699 }, {
8700 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8701 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8702 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8703 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8704 .klen = 32,
8705 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8706 "\x00\x00\x00\x00\x00\x00\x00\x02",
8707 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8708 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8709 .ilen = 16,
8710 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8711 "\x38\x39\x41\x42\x43\x44\x45\x46",
8712 .rlen = 16,
8713 }, {
8714 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8715 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8716 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8717 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8718 .klen = 32,
8719 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8720 "\x00\x00\x00\x02\x00\x00\x00\x00",
8721 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8722 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8723 .ilen = 16,
8724 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8725 "\x38\x39\x41\x42\x43\x44\x45\x46",
8726 .rlen = 16,
8727 }, {
8728 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8729 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8730 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8731 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8732 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8733 .klen = 40,
8734 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8735 "\x00\x00\x00\x00\x00\x00\x00\x01",
8736 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8737 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8738 .ilen = 16,
8739 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8740 "\x38\x39\x41\x42\x43\x44\x45\x46",
8741 .rlen = 16,
8742 }, {
8743 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8744 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8745 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8746 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8747 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8748 .klen = 40,
8749 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8750 "\x00\x00\x00\x02\x00\x00\x00\x00",
8751 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8752 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8753 .ilen = 16,
8754 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8755 "\x38\x39\x41\x42\x43\x44\x45\x46",
8756 .rlen = 16,
8757 }, {
8758 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8759 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8760 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8761 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8762 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8763 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8764 .klen = 48,
8765 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8766 "\x00\x00\x00\x00\x00\x00\x00\x01",
8767 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8768 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8769 .ilen = 16,
8770 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8771 "\x38\x39\x41\x42\x43\x44\x45\x46",
8772 .rlen = 16,
8773 }, {
8774 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8775 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8776 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8777 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8778 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8779 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8780 .klen = 48,
8781 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8782 "\x00\x00\x00\x02\x00\x00\x00\x00",
8783 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8784 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8785 .ilen = 16,
8786 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8787 "\x38\x39\x41\x42\x43\x44\x45\x46",
8788 .rlen = 16,
8789 }, {
8790 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8791 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8792 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8793 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8794 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8795 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8796 .klen = 48,
8797 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8798 "\x00\x00\x00\x00\x00\x00\x00\x01",
8799 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8800 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8801 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8802 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8803 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8804 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8805 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8806 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8807 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8808 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8809 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8810 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8811 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8812 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8813 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8814 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8815 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8816 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8817 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8818 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8819 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8820 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8821 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8822 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8823 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8824 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8825 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8826 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8827 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8828 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8829 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8830 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8831 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8832 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8833 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8834 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8835 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8836 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8837 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8838 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8839 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8840 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8841 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8842 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8843 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8844 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8845 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8846 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8847 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8848 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8849 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8850 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8851 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8852 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8853 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8854 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8855 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8856 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8857 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8858 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8859 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8860 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8861 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8862 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8863 .ilen = 512,
8864 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8865 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8866 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8867 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8868 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8869 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8870 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8871 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8872 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8873 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8874 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8875 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8876 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8877 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8878 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8879 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8880 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8881 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8882 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8883 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8884 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8885 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8886 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8887 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8888 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8889 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8890 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8891 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8892 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8893 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8894 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8895 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8896 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8897 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8898 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8899 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8900 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8901 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8902 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8903 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8904 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8905 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8906 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8907 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8908 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8909 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8910 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8911 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8912 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8913 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8914 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8915 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8916 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8917 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8918 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8919 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8920 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8921 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8922 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8923 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8924 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8925 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8926 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8927 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8928 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008929 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008930 .np = 3,
8931 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008932 },
8933};
8934
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008935static struct cipher_testvec tf_xts_enc_tv_template[] = {
8936 /* Generated from AES-XTS test vectors */
8937{
8938 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8939 "\x00\x00\x00\x00\x00\x00\x00\x00"
8940 "\x00\x00\x00\x00\x00\x00\x00\x00"
8941 "\x00\x00\x00\x00\x00\x00\x00\x00",
8942 .klen = 32,
8943 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8944 "\x00\x00\x00\x00\x00\x00\x00\x00",
8945 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8946 "\x00\x00\x00\x00\x00\x00\x00\x00"
8947 "\x00\x00\x00\x00\x00\x00\x00\x00"
8948 "\x00\x00\x00\x00\x00\x00\x00\x00",
8949 .ilen = 32,
8950 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
8951 "\x30\x74\xe4\x44\x52\x77\x97\x43"
8952 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
8953 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
8954 .rlen = 32,
8955 }, {
8956 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8957 "\x11\x11\x11\x11\x11\x11\x11\x11"
8958 "\x22\x22\x22\x22\x22\x22\x22\x22"
8959 "\x22\x22\x22\x22\x22\x22\x22\x22",
8960 .klen = 32,
8961 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8962 "\x00\x00\x00\x00\x00\x00\x00\x00",
8963 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8964 "\x44\x44\x44\x44\x44\x44\x44\x44"
8965 "\x44\x44\x44\x44\x44\x44\x44\x44"
8966 "\x44\x44\x44\x44\x44\x44\x44\x44",
8967 .ilen = 32,
8968 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
8969 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
8970 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
8971 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
8972 .rlen = 32,
8973 }, {
8974 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8975 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8976 "\x22\x22\x22\x22\x22\x22\x22\x22"
8977 "\x22\x22\x22\x22\x22\x22\x22\x22",
8978 .klen = 32,
8979 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8980 "\x00\x00\x00\x00\x00\x00\x00\x00",
8981 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8982 "\x44\x44\x44\x44\x44\x44\x44\x44"
8983 "\x44\x44\x44\x44\x44\x44\x44\x44"
8984 "\x44\x44\x44\x44\x44\x44\x44\x44",
8985 .ilen = 32,
8986 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
8987 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
8988 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
8989 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
8990 .rlen = 32,
8991 }, {
8992 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8993 "\x23\x53\x60\x28\x74\x71\x35\x26"
8994 "\x31\x41\x59\x26\x53\x58\x97\x93"
8995 "\x23\x84\x62\x64\x33\x83\x27\x95",
8996 .klen = 32,
8997 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8998 "\x00\x00\x00\x00\x00\x00\x00\x00",
8999 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9000 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9001 "\x10\x11\x12\x13\x14\x15\x16\x17"
9002 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9003 "\x20\x21\x22\x23\x24\x25\x26\x27"
9004 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9005 "\x30\x31\x32\x33\x34\x35\x36\x37"
9006 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9007 "\x40\x41\x42\x43\x44\x45\x46\x47"
9008 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9009 "\x50\x51\x52\x53\x54\x55\x56\x57"
9010 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9011 "\x60\x61\x62\x63\x64\x65\x66\x67"
9012 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9013 "\x70\x71\x72\x73\x74\x75\x76\x77"
9014 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9015 "\x80\x81\x82\x83\x84\x85\x86\x87"
9016 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9017 "\x90\x91\x92\x93\x94\x95\x96\x97"
9018 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9019 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9020 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9021 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9022 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9023 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9024 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9025 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9026 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9027 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9028 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9029 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9030 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9031 "\x00\x01\x02\x03\x04\x05\x06\x07"
9032 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9033 "\x10\x11\x12\x13\x14\x15\x16\x17"
9034 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9035 "\x20\x21\x22\x23\x24\x25\x26\x27"
9036 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9037 "\x30\x31\x32\x33\x34\x35\x36\x37"
9038 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9039 "\x40\x41\x42\x43\x44\x45\x46\x47"
9040 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9041 "\x50\x51\x52\x53\x54\x55\x56\x57"
9042 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9043 "\x60\x61\x62\x63\x64\x65\x66\x67"
9044 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9045 "\x70\x71\x72\x73\x74\x75\x76\x77"
9046 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9047 "\x80\x81\x82\x83\x84\x85\x86\x87"
9048 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9049 "\x90\x91\x92\x93\x94\x95\x96\x97"
9050 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9051 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9052 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9053 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9054 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9055 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9056 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9057 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9058 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9059 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9060 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9061 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9062 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9063 .ilen = 512,
9064 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9065 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9066 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9067 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9068 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9069 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9070 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9071 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9072 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9073 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9074 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9075 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9076 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9077 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9078 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9079 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9080 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9081 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9082 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9083 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9084 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9085 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9086 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9087 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9088 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9089 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9090 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9091 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9092 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9093 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9094 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9095 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9096 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9097 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9098 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9099 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9100 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9101 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9102 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9103 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9104 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9105 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9106 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9107 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9108 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9109 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9110 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9111 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9112 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9113 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9114 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9115 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9116 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9117 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9118 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9119 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9120 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9121 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9122 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9123 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9124 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9125 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9126 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9127 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9128 .rlen = 512,
9129 }, {
9130 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9131 "\x23\x53\x60\x28\x74\x71\x35\x26"
9132 "\x62\x49\x77\x57\x24\x70\x93\x69"
9133 "\x99\x59\x57\x49\x66\x96\x76\x27"
9134 "\x31\x41\x59\x26\x53\x58\x97\x93"
9135 "\x23\x84\x62\x64\x33\x83\x27\x95"
9136 "\x02\x88\x41\x97\x16\x93\x99\x37"
9137 "\x51\x05\x82\x09\x74\x94\x45\x92",
9138 .klen = 64,
9139 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9140 "\x00\x00\x00\x00\x00\x00\x00\x00",
9141 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9142 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9143 "\x10\x11\x12\x13\x14\x15\x16\x17"
9144 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9145 "\x20\x21\x22\x23\x24\x25\x26\x27"
9146 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9147 "\x30\x31\x32\x33\x34\x35\x36\x37"
9148 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9149 "\x40\x41\x42\x43\x44\x45\x46\x47"
9150 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9151 "\x50\x51\x52\x53\x54\x55\x56\x57"
9152 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9153 "\x60\x61\x62\x63\x64\x65\x66\x67"
9154 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9155 "\x70\x71\x72\x73\x74\x75\x76\x77"
9156 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9157 "\x80\x81\x82\x83\x84\x85\x86\x87"
9158 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9159 "\x90\x91\x92\x93\x94\x95\x96\x97"
9160 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9161 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9162 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9163 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9164 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9165 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9166 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9167 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9168 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9169 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9170 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9171 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9172 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9173 "\x00\x01\x02\x03\x04\x05\x06\x07"
9174 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9175 "\x10\x11\x12\x13\x14\x15\x16\x17"
9176 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9177 "\x20\x21\x22\x23\x24\x25\x26\x27"
9178 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9179 "\x30\x31\x32\x33\x34\x35\x36\x37"
9180 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9181 "\x40\x41\x42\x43\x44\x45\x46\x47"
9182 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9183 "\x50\x51\x52\x53\x54\x55\x56\x57"
9184 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9185 "\x60\x61\x62\x63\x64\x65\x66\x67"
9186 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9187 "\x70\x71\x72\x73\x74\x75\x76\x77"
9188 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9189 "\x80\x81\x82\x83\x84\x85\x86\x87"
9190 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9191 "\x90\x91\x92\x93\x94\x95\x96\x97"
9192 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9193 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9194 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9195 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9196 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9197 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9198 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9199 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9200 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9201 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9202 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9203 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9204 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9205 .ilen = 512,
9206 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9207 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9208 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9209 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9210 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9211 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9212 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9213 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9214 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9215 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9216 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9217 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9218 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9219 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9220 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9221 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9222 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9223 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9224 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9225 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9226 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9227 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9228 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9229 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9230 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9231 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9232 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9233 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9234 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9235 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9236 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9237 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9238 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9239 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9240 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9241 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9242 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9243 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9244 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9245 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9246 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9247 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9248 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9249 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9250 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9251 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9252 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9253 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9254 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9255 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9256 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9257 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9258 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9259 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9260 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9261 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9262 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9263 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9264 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9265 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9266 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9267 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9268 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9269 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9270 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009271 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009272 .np = 3,
9273 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009274 },
9275};
9276
9277static struct cipher_testvec tf_xts_dec_tv_template[] = {
9278 /* Generated from AES-XTS test vectors */
9279 /* same as enc vectors with input and result reversed */
9280 {
9281 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9282 "\x00\x00\x00\x00\x00\x00\x00\x00"
9283 "\x00\x00\x00\x00\x00\x00\x00\x00"
9284 "\x00\x00\x00\x00\x00\x00\x00\x00",
9285 .klen = 32,
9286 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9287 "\x00\x00\x00\x00\x00\x00\x00\x00",
9288 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9289 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9290 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9291 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9292 .ilen = 32,
9293 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9294 "\x00\x00\x00\x00\x00\x00\x00\x00"
9295 "\x00\x00\x00\x00\x00\x00\x00\x00"
9296 "\x00\x00\x00\x00\x00\x00\x00\x00",
9297 .rlen = 32,
9298 }, {
9299 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9300 "\x11\x11\x11\x11\x11\x11\x11\x11"
9301 "\x22\x22\x22\x22\x22\x22\x22\x22"
9302 "\x22\x22\x22\x22\x22\x22\x22\x22",
9303 .klen = 32,
9304 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9305 "\x00\x00\x00\x00\x00\x00\x00\x00",
9306 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9307 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9308 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9309 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9310 .ilen = 32,
9311 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9312 "\x44\x44\x44\x44\x44\x44\x44\x44"
9313 "\x44\x44\x44\x44\x44\x44\x44\x44"
9314 "\x44\x44\x44\x44\x44\x44\x44\x44",
9315 .rlen = 32,
9316 }, {
9317 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9318 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9319 "\x22\x22\x22\x22\x22\x22\x22\x22"
9320 "\x22\x22\x22\x22\x22\x22\x22\x22",
9321 .klen = 32,
9322 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9323 "\x00\x00\x00\x00\x00\x00\x00\x00",
9324 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9325 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9326 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9327 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9328 .ilen = 32,
9329 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9330 "\x44\x44\x44\x44\x44\x44\x44\x44"
9331 "\x44\x44\x44\x44\x44\x44\x44\x44"
9332 "\x44\x44\x44\x44\x44\x44\x44\x44",
9333 .rlen = 32,
9334 }, {
9335 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9336 "\x23\x53\x60\x28\x74\x71\x35\x26"
9337 "\x31\x41\x59\x26\x53\x58\x97\x93"
9338 "\x23\x84\x62\x64\x33\x83\x27\x95",
9339 .klen = 32,
9340 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9341 "\x00\x00\x00\x00\x00\x00\x00\x00",
9342 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9343 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9344 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9345 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9346 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9347 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9348 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9349 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9350 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9351 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9352 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9353 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9354 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9355 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9356 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9357 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9358 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9359 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9360 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9361 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9362 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9363 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9364 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9365 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9366 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9367 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9368 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9369 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9370 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9371 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9372 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9373 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9374 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9375 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9376 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9377 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9378 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9379 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9380 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9381 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9382 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9383 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9384 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9385 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9386 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9387 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9388 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9389 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9390 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9391 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9392 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9393 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9394 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9395 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9396 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9397 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9398 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9399 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9400 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9401 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9402 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9403 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9404 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9405 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9406 .ilen = 512,
9407 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9408 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9409 "\x10\x11\x12\x13\x14\x15\x16\x17"
9410 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9411 "\x20\x21\x22\x23\x24\x25\x26\x27"
9412 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9413 "\x30\x31\x32\x33\x34\x35\x36\x37"
9414 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9415 "\x40\x41\x42\x43\x44\x45\x46\x47"
9416 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9417 "\x50\x51\x52\x53\x54\x55\x56\x57"
9418 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9419 "\x60\x61\x62\x63\x64\x65\x66\x67"
9420 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9421 "\x70\x71\x72\x73\x74\x75\x76\x77"
9422 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9423 "\x80\x81\x82\x83\x84\x85\x86\x87"
9424 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9425 "\x90\x91\x92\x93\x94\x95\x96\x97"
9426 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9427 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9428 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9429 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9430 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9431 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9432 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9433 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9434 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9435 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9436 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9437 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9438 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9439 "\x00\x01\x02\x03\x04\x05\x06\x07"
9440 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9441 "\x10\x11\x12\x13\x14\x15\x16\x17"
9442 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9443 "\x20\x21\x22\x23\x24\x25\x26\x27"
9444 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9445 "\x30\x31\x32\x33\x34\x35\x36\x37"
9446 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9447 "\x40\x41\x42\x43\x44\x45\x46\x47"
9448 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9449 "\x50\x51\x52\x53\x54\x55\x56\x57"
9450 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9451 "\x60\x61\x62\x63\x64\x65\x66\x67"
9452 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9453 "\x70\x71\x72\x73\x74\x75\x76\x77"
9454 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9455 "\x80\x81\x82\x83\x84\x85\x86\x87"
9456 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9457 "\x90\x91\x92\x93\x94\x95\x96\x97"
9458 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9459 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9460 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9461 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9462 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9463 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9464 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9465 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9466 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9467 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9468 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9469 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9470 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9471 .rlen = 512,
9472 }, {
9473 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9474 "\x23\x53\x60\x28\x74\x71\x35\x26"
9475 "\x62\x49\x77\x57\x24\x70\x93\x69"
9476 "\x99\x59\x57\x49\x66\x96\x76\x27"
9477 "\x31\x41\x59\x26\x53\x58\x97\x93"
9478 "\x23\x84\x62\x64\x33\x83\x27\x95"
9479 "\x02\x88\x41\x97\x16\x93\x99\x37"
9480 "\x51\x05\x82\x09\x74\x94\x45\x92",
9481 .klen = 64,
9482 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9483 "\x00\x00\x00\x00\x00\x00\x00\x00",
9484 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9485 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9486 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9487 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9488 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9489 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9490 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9491 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9492 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9493 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9494 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9495 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9496 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9497 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9498 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9499 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9500 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9501 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9502 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9503 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9504 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9505 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9506 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9507 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9508 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9509 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9510 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9511 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9512 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9513 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9514 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9515 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9516 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9517 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9518 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9519 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9520 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9521 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9522 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9523 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9524 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9525 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9526 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9527 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9528 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9529 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9530 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9531 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9532 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9533 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9534 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9535 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9536 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9537 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9538 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9539 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9540 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9541 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9542 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9543 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9544 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9545 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9546 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9547 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9548 .ilen = 512,
9549 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9550 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9551 "\x10\x11\x12\x13\x14\x15\x16\x17"
9552 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9553 "\x20\x21\x22\x23\x24\x25\x26\x27"
9554 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9555 "\x30\x31\x32\x33\x34\x35\x36\x37"
9556 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9557 "\x40\x41\x42\x43\x44\x45\x46\x47"
9558 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9559 "\x50\x51\x52\x53\x54\x55\x56\x57"
9560 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9561 "\x60\x61\x62\x63\x64\x65\x66\x67"
9562 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9563 "\x70\x71\x72\x73\x74\x75\x76\x77"
9564 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9565 "\x80\x81\x82\x83\x84\x85\x86\x87"
9566 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9567 "\x90\x91\x92\x93\x94\x95\x96\x97"
9568 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9569 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9570 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9571 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9572 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9573 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9574 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9575 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9576 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9577 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9578 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9579 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9580 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9581 "\x00\x01\x02\x03\x04\x05\x06\x07"
9582 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9583 "\x10\x11\x12\x13\x14\x15\x16\x17"
9584 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9585 "\x20\x21\x22\x23\x24\x25\x26\x27"
9586 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9587 "\x30\x31\x32\x33\x34\x35\x36\x37"
9588 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9589 "\x40\x41\x42\x43\x44\x45\x46\x47"
9590 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9591 "\x50\x51\x52\x53\x54\x55\x56\x57"
9592 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9593 "\x60\x61\x62\x63\x64\x65\x66\x67"
9594 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9595 "\x70\x71\x72\x73\x74\x75\x76\x77"
9596 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9597 "\x80\x81\x82\x83\x84\x85\x86\x87"
9598 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9599 "\x90\x91\x92\x93\x94\x95\x96\x97"
9600 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9601 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9602 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9603 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9604 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9605 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9606 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9607 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9608 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9609 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9610 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9611 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9612 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9613 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009614 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009615 .np = 3,
9616 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009617 },
9618};
9619
Herbert Xuda7f0332008-07-31 17:08:25 +08009620/*
9621 * Serpent test vectors. These are backwards because Serpent writes
9622 * octet sequences in right-to-left mode.
9623 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009624#define SERPENT_ENC_TEST_VECTORS 5
9625#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009626
9627#define TNEPRES_ENC_TEST_VECTORS 4
9628#define TNEPRES_DEC_TEST_VECTORS 4
9629
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009630#define SERPENT_CBC_ENC_TEST_VECTORS 1
9631#define SERPENT_CBC_DEC_TEST_VECTORS 1
9632
9633#define SERPENT_CTR_ENC_TEST_VECTORS 2
9634#define SERPENT_CTR_DEC_TEST_VECTORS 2
9635
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009636#define SERPENT_LRW_ENC_TEST_VECTORS 8
9637#define SERPENT_LRW_DEC_TEST_VECTORS 8
9638
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03009639#define SERPENT_XTS_ENC_TEST_VECTORS 5
9640#define SERPENT_XTS_DEC_TEST_VECTORS 5
9641
Herbert Xuda7f0332008-07-31 17:08:25 +08009642static struct cipher_testvec serpent_enc_tv_template[] = {
9643 {
9644 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9645 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9646 .ilen = 16,
9647 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9648 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9649 .rlen = 16,
9650 }, {
9651 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9652 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9653 .klen = 16,
9654 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9655 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9656 .ilen = 16,
9657 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9658 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9659 .rlen = 16,
9660 }, {
9661 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9663 "\x10\x11\x12\x13\x14\x15\x16\x17"
9664 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9665 .klen = 32,
9666 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9667 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9668 .ilen = 16,
9669 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9670 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9671 .rlen = 16,
9672 }, {
9673 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9674 .klen = 16,
9675 .input = zeroed_string,
9676 .ilen = 16,
9677 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9678 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9679 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009680 }, { /* Generated with Crypto++ */
9681 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9682 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9683 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9684 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9685 .klen = 32,
9686 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9687 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9688 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9689 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9690 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9691 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9692 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9693 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9694 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9695 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9696 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9697 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9698 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9699 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9700 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9701 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9702 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009703 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9704 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9705 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9706 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9707 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9708 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9709 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9710 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9711 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9712 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9713 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9714 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9715 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9716 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9717 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9718 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9719 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9720 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9721 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9722 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9723 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9724 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9725 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9726 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9727 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9728 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9729 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9730 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9731 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9732 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9733 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9734 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9735 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9736 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9737 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9738 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9739 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9740 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9741 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9742 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9743 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9744 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9745 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9746 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9747 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9748 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009749 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9750 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9751 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9752 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9753 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9754 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9755 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9756 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9757 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9758 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9759 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9760 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9761 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9762 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9763 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9764 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9765 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009766 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9767 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9768 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9769 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9770 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9771 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9772 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9773 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9774 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9775 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9776 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9777 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9778 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9779 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9780 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9781 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9782 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9783 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9784 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9785 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9786 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9787 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9788 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9789 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9790 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9791 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9792 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9793 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9794 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9795 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9796 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9797 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9798 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9799 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9800 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9801 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9802 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9803 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9804 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9805 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9806 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9807 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9808 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9809 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9810 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9811 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009812 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009813 .np = 3,
9814 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08009815 },
9816};
9817
9818static struct cipher_testvec tnepres_enc_tv_template[] = {
9819 { /* KeySize=128, PT=0, I=1 */
9820 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9821 "\x00\x00\x00\x00\x00\x00\x00\x00",
9822 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9823 "\x00\x00\x00\x00\x00\x00\x00\x00",
9824 .klen = 16,
9825 .ilen = 16,
9826 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
9827 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
9828 .rlen = 16,
9829 }, { /* KeySize=192, PT=0, I=1 */
9830 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9831 "\x00\x00\x00\x00\x00\x00\x00\x00"
9832 "\x00\x00\x00\x00\x00\x00\x00\x00",
9833 .klen = 24,
9834 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9835 "\x00\x00\x00\x00\x00\x00\x00\x00",
9836 .ilen = 16,
9837 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
9838 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
9839 .rlen = 16,
9840 }, { /* KeySize=256, PT=0, I=1 */
9841 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9842 "\x00\x00\x00\x00\x00\x00\x00\x00"
9843 "\x00\x00\x00\x00\x00\x00\x00\x00"
9844 "\x00\x00\x00\x00\x00\x00\x00\x00",
9845 .klen = 32,
9846 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9847 "\x00\x00\x00\x00\x00\x00\x00\x00",
9848 .ilen = 16,
9849 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
9850 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
9851 .rlen = 16,
9852 }, { /* KeySize=256, I=257 */
9853 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
9854 "\x17\x16\x15\x14\x13\x12\x11\x10"
9855 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9856 "\x07\x06\x05\x04\x03\x02\x01\x00",
9857 .klen = 32,
9858 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9859 "\x07\x06\x05\x04\x03\x02\x01\x00",
9860 .ilen = 16,
9861 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
9862 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
9863 .rlen = 16,
9864 },
9865};
9866
9867
9868static struct cipher_testvec serpent_dec_tv_template[] = {
9869 {
9870 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9871 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9872 .ilen = 16,
9873 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9874 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9875 .rlen = 16,
9876 }, {
9877 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9878 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9879 .klen = 16,
9880 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9881 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9882 .ilen = 16,
9883 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9884 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9885 .rlen = 16,
9886 }, {
9887 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9888 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9889 "\x10\x11\x12\x13\x14\x15\x16\x17"
9890 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9891 .klen = 32,
9892 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9893 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9894 .ilen = 16,
9895 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9896 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9897 .rlen = 16,
9898 }, {
9899 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9900 .klen = 16,
9901 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9902 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9903 .ilen = 16,
9904 .result = zeroed_string,
9905 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009906 }, { /* Generated with Crypto++ */
9907 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9908 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9909 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9910 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9911 .klen = 32,
9912 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9913 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9914 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9915 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9916 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9917 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9918 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9919 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9920 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9921 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9922 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9923 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9924 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9925 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9926 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9927 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9928 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009929 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9930 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9931 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9932 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9933 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9934 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9935 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9936 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9937 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9938 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9939 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9940 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9941 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9942 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9943 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9944 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9945 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9946 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9947 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9948 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9949 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9950 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9951 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9952 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9953 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9954 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9955 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9956 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9957 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9958 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9959 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9960 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9961 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9962 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9963 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9964 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9965 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9966 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9967 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9968 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9969 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9970 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9971 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9972 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9973 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9974 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009975 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9976 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9977 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9978 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9979 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9980 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9981 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9982 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9983 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9984 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9985 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9986 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9987 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9988 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9989 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9990 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9991 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009992 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9993 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9994 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9995 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9996 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9997 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9998 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9999 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10000 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10001 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10002 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10003 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10004 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10005 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10006 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10007 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10008 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10009 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10010 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10011 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10012 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10013 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10014 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10015 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10016 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10017 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10018 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10019 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10020 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10021 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10022 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10023 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10024 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10025 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10026 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10027 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10028 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10029 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10030 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10031 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10032 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10033 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10034 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10035 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10036 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10037 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010038 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010039 .np = 3,
10040 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010041 },
10042};
10043
10044static struct cipher_testvec tnepres_dec_tv_template[] = {
10045 {
10046 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10047 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10048 .ilen = 16,
10049 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10050 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10051 .rlen = 16,
10052 }, {
10053 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10054 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10055 .klen = 16,
10056 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10057 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10058 .ilen = 16,
10059 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10060 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10061 .rlen = 16,
10062 }, {
10063 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10064 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10065 "\x10\x11\x12\x13\x14\x15\x16\x17"
10066 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10067 .klen = 32,
10068 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10069 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10070 .ilen = 16,
10071 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10072 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10073 .rlen = 16,
10074 }, { /* KeySize=128, I=121 */
10075 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10076 .klen = 16,
10077 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10078 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10079 .ilen = 16,
10080 .result = zeroed_string,
10081 .rlen = 16,
10082 },
10083};
10084
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010085static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10086 { /* Generated with Crypto++ */
10087 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10088 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10089 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10090 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10091 .klen = 32,
10092 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10093 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10094 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10095 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10096 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10097 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10098 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10099 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10100 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10101 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10102 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10103 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10104 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10105 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10106 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10107 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10108 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10109 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10110 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010111 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10112 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10113 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10114 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10115 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10116 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10117 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10118 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10119 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10120 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10121 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10122 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10123 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10124 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10125 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10126 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10127 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10128 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10129 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10130 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10131 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10132 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10133 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10134 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10135 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10136 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10137 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10138 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10139 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10140 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10141 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10142 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10143 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10144 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10145 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10146 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10147 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10148 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10149 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10150 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10151 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10152 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10153 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10154 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10155 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10156 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010157 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10158 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10159 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10160 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10161 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10162 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10163 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10164 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10165 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10166 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10167 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10168 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10169 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10170 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10171 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10172 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10173 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010174 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10175 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10176 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10177 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10178 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10179 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10180 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10181 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10182 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10183 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10184 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10185 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10186 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10187 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10188 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10189 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10190 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10191 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10192 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10193 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10194 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10195 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10196 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10197 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10198 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10199 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10200 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10201 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10202 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10203 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10204 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10205 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10206 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10207 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10208 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10209 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10210 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10211 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10212 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10213 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10214 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10215 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10216 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10217 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10218 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10219 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010220 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010221 .np = 3,
10222 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010223 },
10224};
10225
10226static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10227 { /* Generated with Crypto++ */
10228 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10229 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10230 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10231 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10232 .klen = 32,
10233 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10234 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10235 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10236 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10237 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10238 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10239 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10240 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10241 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10242 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10243 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10244 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10245 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10246 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10247 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10248 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10249 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10250 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10251 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010252 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10253 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10254 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10255 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10256 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10257 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10258 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10259 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10260 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10261 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10262 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10263 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10264 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10265 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10266 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10267 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10268 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10269 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10270 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10271 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10272 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10273 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10274 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10275 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10276 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10277 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10278 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10279 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10280 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10281 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10282 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10283 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10284 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10285 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10286 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10287 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10288 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10289 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10290 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10291 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10292 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10293 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10294 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10295 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10296 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10297 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010298 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10299 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10300 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10301 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10302 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10303 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10304 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10305 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10306 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10307 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10308 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10309 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10310 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10311 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10312 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10313 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10314 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010315 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10316 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10317 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10318 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10319 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10320 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10321 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10322 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10323 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10324 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10325 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10326 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10327 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10328 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10329 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10330 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10331 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10332 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10333 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10334 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10335 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10336 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10337 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10338 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10339 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10340 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10341 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10342 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10343 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10344 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10345 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10346 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10347 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10348 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10349 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10350 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10351 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10352 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10353 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10354 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10355 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10356 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10357 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10358 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10359 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10360 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010361 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010362 .np = 3,
10363 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010364 },
10365};
10366
10367static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10368 { /* Generated with Crypto++ */
10369 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10370 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10371 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10372 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10373 .klen = 32,
10374 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10375 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10376 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10377 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10378 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10379 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10380 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10381 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10382 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10383 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10384 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10385 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10386 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10387 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10388 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10389 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10390 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10391 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10392 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010393 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10394 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10395 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10396 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10397 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10398 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10399 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10400 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10401 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10402 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10403 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10404 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10405 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10406 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10407 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10408 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10409 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10410 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10411 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10412 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10413 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10414 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10415 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10416 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10417 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10418 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10419 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10420 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10421 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10422 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10423 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10424 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10425 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10426 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10427 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10428 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10429 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10430 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10431 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10432 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10433 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10434 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10435 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10436 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10437 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10438 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010439 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10440 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10441 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10442 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10443 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10444 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10445 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10446 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10447 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10448 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10449 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10450 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10451 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10452 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10453 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10454 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10455 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010456 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10457 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10458 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10459 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10460 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10461 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10462 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10463 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10464 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10465 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10466 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10467 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10468 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10469 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10470 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10471 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10472 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10473 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10474 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10475 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10476 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10477 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10478 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10479 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10480 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10481 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10482 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10483 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10484 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10485 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10486 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10487 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10488 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10489 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10490 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10491 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10492 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10493 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10494 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10495 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10496 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10497 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10498 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10499 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10500 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10501 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010502 }, { /* Generated with Crypto++ */
10503 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10504 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10505 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10506 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10507 .klen = 32,
10508 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10509 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10510 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10511 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10512 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10513 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10514 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10515 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10516 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10517 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10518 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10519 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10520 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10521 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10522 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10523 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10524 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10525 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10526 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10527 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010528 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10529 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10530 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10531 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10532 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10533 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10534 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10535 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10536 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10537 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10538 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10539 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10540 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10541 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10542 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10543 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10544 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10545 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10546 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10547 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10548 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10549 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10550 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10551 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10552 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10553 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10554 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10555 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10556 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10557 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10558 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10559 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10560 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10561 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10562 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10563 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10564 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10565 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10566 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10567 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10568 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10569 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10570 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10571 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10572 "\x2B\xC2\x59",
10573 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010574 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10575 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10576 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10577 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10578 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10579 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10580 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10581 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10582 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10583 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10584 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10585 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10586 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10587 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10588 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10589 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10590 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10591 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010592 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10593 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10594 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10595 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10596 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10597 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10598 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10599 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10600 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10601 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10602 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10603 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10604 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10605 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10606 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10607 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10608 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10609 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10610 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10611 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10612 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10613 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10614 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10615 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10616 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10617 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10618 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10619 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10620 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10621 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10622 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10623 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10624 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10625 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10626 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10627 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10628 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10629 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10630 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10631 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10632 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10633 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10634 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10635 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10636 "\x38\xE2\xE5",
10637 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010638 .also_non_np = 1,
10639 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010640 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010641 }, { /* Generated with Crypto++ */
10642 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10643 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10644 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10645 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10646 .klen = 32,
10647 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10648 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10649 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10650 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10651 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10652 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10653 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10654 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10655 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10656 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10657 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10658 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10659 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10660 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10661 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10662 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10663 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10664 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10665 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10666 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10667 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10668 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10669 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10670 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10671 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10672 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10673 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10674 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10675 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10676 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10677 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10678 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10679 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10680 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10681 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10682 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10683 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10684 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10685 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10686 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10687 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10688 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10689 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10690 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10691 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10692 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10693 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10694 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10695 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10696 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10697 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10698 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10699 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10700 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10701 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10702 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10703 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10704 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10705 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10706 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10707 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10708 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10709 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10710 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10711 .ilen = 496,
10712 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10713 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10714 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10715 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10716 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10717 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10718 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10719 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10720 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10721 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10722 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10723 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10724 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10725 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10726 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10727 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10728 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10729 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10730 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10731 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10732 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10733 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10734 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10735 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10736 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10737 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10738 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10739 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10740 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10741 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10742 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10743 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10744 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10745 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10746 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10747 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10748 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10749 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10750 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10751 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10752 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10753 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10754 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10755 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10756 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10757 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10758 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10759 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10760 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10761 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10762 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10763 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10764 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10765 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10766 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10767 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10768 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10769 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10770 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10771 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10772 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10773 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10774 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010775 },
10776};
10777
10778static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10779 { /* Generated with Crypto++ */
10780 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10781 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10782 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10783 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10784 .klen = 32,
10785 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10786 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10787 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10788 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10789 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10790 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10791 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10792 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10793 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10794 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10795 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10796 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10797 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10798 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10799 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10800 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10801 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10802 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10803 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010804 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10805 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10806 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10807 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10808 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10809 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10810 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10811 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10812 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10813 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10814 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10815 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10816 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10817 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10818 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10819 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10820 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10821 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10822 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10823 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10824 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10825 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10826 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10827 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10828 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10829 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10830 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10831 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10832 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10833 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10834 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10835 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10836 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10837 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10838 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10839 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10840 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10841 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10842 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10843 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10844 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10845 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10846 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10847 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10848 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10849 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010850 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10851 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10852 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10853 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10854 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10855 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10856 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10857 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10858 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10859 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10860 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10861 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10862 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10863 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10864 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10865 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10866 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010867 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10868 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10869 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10870 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10871 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10872 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10873 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10874 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10875 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10876 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10877 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10878 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10879 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10880 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10881 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10882 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10883 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10884 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10885 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10886 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10887 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10888 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10889 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10890 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10891 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10892 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10893 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10894 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10895 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10896 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10897 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10898 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10899 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10900 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10901 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10902 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10903 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10904 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10905 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10906 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10907 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10908 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10909 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10910 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10911 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10912 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010913 }, { /* Generated with Crypto++ */
10914 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10915 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10916 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10917 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10918 .klen = 32,
10919 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10920 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10921 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10922 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10923 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10924 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10925 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10926 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10927 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10928 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10929 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10930 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10931 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10932 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10933 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10934 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10935 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10936 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10937 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10938 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010939 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10940 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10941 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10942 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10943 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10944 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10945 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10946 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10947 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10948 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10949 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10950 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10951 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10952 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10953 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10954 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10955 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10956 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10957 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10958 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10959 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10960 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10961 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10962 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10963 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10964 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10965 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10966 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10967 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10968 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10969 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10970 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10971 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10972 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10973 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10974 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10975 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10976 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10977 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10978 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10979 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10980 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10981 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10982 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10983 "\x38\xE2\xE5",
10984 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010985 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10986 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10987 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10988 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10989 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10990 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10991 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10992 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10993 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10994 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10995 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10996 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10997 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10998 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10999 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11000 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11001 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11002 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011003 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11004 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11005 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11006 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11007 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11008 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11009 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11010 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11011 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11012 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11013 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11014 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11015 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11016 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11017 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11018 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11019 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11020 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11021 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11022 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11023 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11024 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11025 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11026 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11027 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11028 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11029 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11030 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11031 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11032 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11033 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11034 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11035 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11036 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11037 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11038 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11039 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11040 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11041 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11042 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11043 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11044 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11045 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11046 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11047 "\x2B\xC2\x59",
11048 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011049 .also_non_np = 1,
11050 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011051 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011052 }, { /* Generated with Crypto++ */
11053 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11054 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11055 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11056 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11057 .klen = 32,
11058 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11059 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11060 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11061 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11062 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11063 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11064 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11065 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11066 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11067 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11068 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11069 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11070 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11071 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11072 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11073 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11074 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11075 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11076 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11077 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11078 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11079 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11080 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11081 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11082 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11083 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11084 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11085 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11086 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11087 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11088 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11089 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11090 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11091 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11092 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11093 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11094 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11095 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11096 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11097 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11098 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11099 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11100 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11101 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11102 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11103 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11104 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11105 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11106 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11107 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11108 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11109 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11110 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11111 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11112 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11113 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11114 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11115 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11116 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11117 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11118 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11119 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11120 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11121 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11122 .ilen = 496,
11123 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11124 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11125 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11126 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11127 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11128 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11129 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11130 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11131 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11132 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11133 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11134 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11135 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11136 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11137 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11138 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11139 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11140 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11141 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11142 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11143 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11144 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11145 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11146 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11147 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11148 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11149 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11150 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11151 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11152 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11153 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11154 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11155 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11156 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11157 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11158 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11159 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11160 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11161 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11162 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11163 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11164 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11165 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11166 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11167 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11168 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11169 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11170 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11171 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11172 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11173 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11174 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11175 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11176 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11177 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11178 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11179 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11180 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11181 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11182 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11183 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11184 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11185 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011186 },
11187};
Herbert Xuda7f0332008-07-31 17:08:25 +080011188
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011189static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11190 /* Generated from AES-LRW test vectors */
11191 {
11192 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11193 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11194 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11195 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11196 .klen = 32,
11197 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11198 "\x00\x00\x00\x00\x00\x00\x00\x01",
11199 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11200 "\x38\x39\x41\x42\x43\x44\x45\x46",
11201 .ilen = 16,
11202 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11203 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11204 .rlen = 16,
11205 }, {
11206 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11207 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11208 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11209 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11210 .klen = 32,
11211 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11212 "\x00\x00\x00\x00\x00\x00\x00\x02",
11213 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11214 "\x38\x39\x41\x42\x43\x44\x45\x46",
11215 .ilen = 16,
11216 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11217 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11218 .rlen = 16,
11219 }, {
11220 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11221 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11222 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11223 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11224 .klen = 32,
11225 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11226 "\x00\x00\x00\x02\x00\x00\x00\x00",
11227 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11228 "\x38\x39\x41\x42\x43\x44\x45\x46",
11229 .ilen = 16,
11230 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11231 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11232 .rlen = 16,
11233 }, {
11234 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11235 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11236 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11237 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11238 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11239 .klen = 40,
11240 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11241 "\x00\x00\x00\x00\x00\x00\x00\x01",
11242 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11243 "\x38\x39\x41\x42\x43\x44\x45\x46",
11244 .ilen = 16,
11245 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11246 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11247 .rlen = 16,
11248 }, {
11249 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11250 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11251 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11252 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11253 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11254 .klen = 40,
11255 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11256 "\x00\x00\x00\x02\x00\x00\x00\x00",
11257 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11258 "\x38\x39\x41\x42\x43\x44\x45\x46",
11259 .ilen = 16,
11260 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11261 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11262 .rlen = 16,
11263 }, {
11264 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11265 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11266 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11267 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11268 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11269 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11270 .klen = 48,
11271 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11272 "\x00\x00\x00\x00\x00\x00\x00\x01",
11273 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11274 "\x38\x39\x41\x42\x43\x44\x45\x46",
11275 .ilen = 16,
11276 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11277 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11278 .rlen = 16,
11279 }, {
11280 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11281 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11282 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11283 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11284 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11285 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11286 .klen = 48,
11287 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11288 "\x00\x00\x00\x02\x00\x00\x00\x00",
11289 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11290 "\x38\x39\x41\x42\x43\x44\x45\x46",
11291 .ilen = 16,
11292 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11293 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11294 .rlen = 16,
11295 }, {
11296 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11297 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11298 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11299 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11300 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11301 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11302 .klen = 48,
11303 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11304 "\x00\x00\x00\x00\x00\x00\x00\x01",
11305 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11306 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11307 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11308 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11309 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11310 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11311 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11312 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11313 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11314 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11315 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11316 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11317 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11318 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11319 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11320 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11321 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11322 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11323 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11324 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11325 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11326 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11327 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11328 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11329 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11330 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11331 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11332 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11333 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11334 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11335 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11336 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11337 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11338 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11339 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11340 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11341 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11342 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11343 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11344 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11345 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11346 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11347 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11348 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11349 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11350 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11351 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11352 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11353 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11354 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11355 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11356 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11357 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11358 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11359 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11360 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11361 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11362 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11363 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11364 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11365 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11366 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11367 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11368 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11369 .ilen = 512,
11370 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11371 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11372 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11373 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11374 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11375 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11376 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11377 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11378 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11379 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11380 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11381 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11382 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11383 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11384 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11385 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11386 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11387 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11388 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11389 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11390 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11391 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11392 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11393 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11394 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11395 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11396 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11397 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11398 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11399 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11400 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11401 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11402 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11403 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11404 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11405 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11406 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11407 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11408 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11409 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11410 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11411 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11412 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11413 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11414 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11415 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11416 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11417 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11418 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11419 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11420 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11421 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11422 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11423 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11424 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11425 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11426 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11427 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11428 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11429 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11430 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11431 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11432 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11433 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11434 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011435 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011436 .np = 3,
11437 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011438 },
11439};
11440
11441static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11442 /* Generated from AES-LRW test vectors */
11443 /* same as enc vectors with input and result reversed */
11444 {
11445 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11446 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11447 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11448 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11449 .klen = 32,
11450 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11451 "\x00\x00\x00\x00\x00\x00\x00\x01",
11452 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11453 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11454 .ilen = 16,
11455 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11456 "\x38\x39\x41\x42\x43\x44\x45\x46",
11457 .rlen = 16,
11458 }, {
11459 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11460 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11461 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11462 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11463 .klen = 32,
11464 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11465 "\x00\x00\x00\x00\x00\x00\x00\x02",
11466 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11467 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11468 .ilen = 16,
11469 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11470 "\x38\x39\x41\x42\x43\x44\x45\x46",
11471 .rlen = 16,
11472 }, {
11473 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11474 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11475 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11476 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11477 .klen = 32,
11478 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11479 "\x00\x00\x00\x02\x00\x00\x00\x00",
11480 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11481 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11482 .ilen = 16,
11483 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11484 "\x38\x39\x41\x42\x43\x44\x45\x46",
11485 .rlen = 16,
11486 }, {
11487 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11488 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11489 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11490 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11491 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11492 .klen = 40,
11493 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11494 "\x00\x00\x00\x00\x00\x00\x00\x01",
11495 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11496 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11497 .ilen = 16,
11498 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11499 "\x38\x39\x41\x42\x43\x44\x45\x46",
11500 .rlen = 16,
11501 }, {
11502 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11503 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11504 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11505 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11506 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11507 .klen = 40,
11508 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11509 "\x00\x00\x00\x02\x00\x00\x00\x00",
11510 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11511 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11512 .ilen = 16,
11513 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11514 "\x38\x39\x41\x42\x43\x44\x45\x46",
11515 .rlen = 16,
11516 }, {
11517 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11518 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11519 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11520 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11521 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11522 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11523 .klen = 48,
11524 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11525 "\x00\x00\x00\x00\x00\x00\x00\x01",
11526 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11527 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11528 .ilen = 16,
11529 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11530 "\x38\x39\x41\x42\x43\x44\x45\x46",
11531 .rlen = 16,
11532 }, {
11533 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11534 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11535 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11536 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11537 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11538 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11539 .klen = 48,
11540 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11541 "\x00\x00\x00\x02\x00\x00\x00\x00",
11542 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11543 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11544 .ilen = 16,
11545 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11546 "\x38\x39\x41\x42\x43\x44\x45\x46",
11547 .rlen = 16,
11548 }, {
11549 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11550 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11551 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11552 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11553 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11554 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11555 .klen = 48,
11556 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11557 "\x00\x00\x00\x00\x00\x00\x00\x01",
11558 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11559 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11560 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11561 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11562 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11563 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11564 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11565 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11566 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11567 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11568 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11569 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11570 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11571 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11572 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11573 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11574 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11575 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11576 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11577 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11578 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11579 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11580 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11581 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11582 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11583 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11584 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11585 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11586 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11587 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11588 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11589 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11590 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11591 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11592 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11593 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11594 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11595 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11596 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11597 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11598 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11599 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11600 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11601 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11602 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11603 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11604 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11605 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11606 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11607 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11608 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11609 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11610 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11611 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11612 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11613 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11614 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11615 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11616 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11617 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11618 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11619 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11620 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11621 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11622 .ilen = 512,
11623 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11624 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11625 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11626 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11627 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11628 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11629 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11630 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11631 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11632 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11633 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11634 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11635 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11636 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11637 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11638 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11639 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11640 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11641 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11642 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11643 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11644 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11645 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11646 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11647 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11648 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11649 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11650 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11651 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11652 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11653 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11654 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11655 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11656 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11657 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11658 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11659 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11660 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11661 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11662 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11663 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11664 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11665 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11666 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11667 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11668 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11669 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11670 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11671 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11672 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11673 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11674 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11675 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11676 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11677 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11678 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11679 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11680 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11681 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11682 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11683 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11684 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11685 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11686 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11687 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011688 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011689 .np = 3,
11690 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011691 },
11692};
11693
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030011694static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11695 /* Generated from AES-XTS test vectors */
11696 {
11697 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11698 "\x00\x00\x00\x00\x00\x00\x00\x00"
11699 "\x00\x00\x00\x00\x00\x00\x00\x00"
11700 "\x00\x00\x00\x00\x00\x00\x00\x00",
11701 .klen = 32,
11702 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11703 "\x00\x00\x00\x00\x00\x00\x00\x00",
11704 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11705 "\x00\x00\x00\x00\x00\x00\x00\x00"
11706 "\x00\x00\x00\x00\x00\x00\x00\x00"
11707 "\x00\x00\x00\x00\x00\x00\x00\x00",
11708 .ilen = 32,
11709 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11710 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11711 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11712 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11713 .rlen = 32,
11714 }, {
11715 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11716 "\x11\x11\x11\x11\x11\x11\x11\x11"
11717 "\x22\x22\x22\x22\x22\x22\x22\x22"
11718 "\x22\x22\x22\x22\x22\x22\x22\x22",
11719 .klen = 32,
11720 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11721 "\x00\x00\x00\x00\x00\x00\x00\x00",
11722 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11723 "\x44\x44\x44\x44\x44\x44\x44\x44"
11724 "\x44\x44\x44\x44\x44\x44\x44\x44"
11725 "\x44\x44\x44\x44\x44\x44\x44\x44",
11726 .ilen = 32,
11727 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11728 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11729 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11730 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11731 .rlen = 32,
11732 }, {
11733 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11734 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11735 "\x22\x22\x22\x22\x22\x22\x22\x22"
11736 "\x22\x22\x22\x22\x22\x22\x22\x22",
11737 .klen = 32,
11738 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11739 "\x00\x00\x00\x00\x00\x00\x00\x00",
11740 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11741 "\x44\x44\x44\x44\x44\x44\x44\x44"
11742 "\x44\x44\x44\x44\x44\x44\x44\x44"
11743 "\x44\x44\x44\x44\x44\x44\x44\x44",
11744 .ilen = 32,
11745 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11746 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11747 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11748 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11749 .rlen = 32,
11750 }, {
11751 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11752 "\x23\x53\x60\x28\x74\x71\x35\x26"
11753 "\x31\x41\x59\x26\x53\x58\x97\x93"
11754 "\x23\x84\x62\x64\x33\x83\x27\x95",
11755 .klen = 32,
11756 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11757 "\x00\x00\x00\x00\x00\x00\x00\x00",
11758 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11759 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11760 "\x10\x11\x12\x13\x14\x15\x16\x17"
11761 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11762 "\x20\x21\x22\x23\x24\x25\x26\x27"
11763 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11764 "\x30\x31\x32\x33\x34\x35\x36\x37"
11765 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11766 "\x40\x41\x42\x43\x44\x45\x46\x47"
11767 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11768 "\x50\x51\x52\x53\x54\x55\x56\x57"
11769 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11770 "\x60\x61\x62\x63\x64\x65\x66\x67"
11771 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11772 "\x70\x71\x72\x73\x74\x75\x76\x77"
11773 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11774 "\x80\x81\x82\x83\x84\x85\x86\x87"
11775 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11776 "\x90\x91\x92\x93\x94\x95\x96\x97"
11777 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11778 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11779 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11780 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11781 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11782 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11783 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11784 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11785 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11786 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11787 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11788 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11789 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11790 "\x00\x01\x02\x03\x04\x05\x06\x07"
11791 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11792 "\x10\x11\x12\x13\x14\x15\x16\x17"
11793 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11794 "\x20\x21\x22\x23\x24\x25\x26\x27"
11795 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11796 "\x30\x31\x32\x33\x34\x35\x36\x37"
11797 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11798 "\x40\x41\x42\x43\x44\x45\x46\x47"
11799 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11800 "\x50\x51\x52\x53\x54\x55\x56\x57"
11801 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11802 "\x60\x61\x62\x63\x64\x65\x66\x67"
11803 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11804 "\x70\x71\x72\x73\x74\x75\x76\x77"
11805 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11806 "\x80\x81\x82\x83\x84\x85\x86\x87"
11807 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11808 "\x90\x91\x92\x93\x94\x95\x96\x97"
11809 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11810 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11811 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11812 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11813 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11814 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11815 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11816 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11817 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11818 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11819 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11820 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11821 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11822 .ilen = 512,
11823 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
11824 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
11825 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
11826 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
11827 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
11828 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
11829 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
11830 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
11831 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
11832 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
11833 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
11834 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
11835 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
11836 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
11837 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
11838 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
11839 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
11840 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
11841 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
11842 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
11843 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
11844 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
11845 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
11846 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
11847 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
11848 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
11849 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
11850 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
11851 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
11852 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
11853 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
11854 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
11855 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
11856 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
11857 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
11858 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
11859 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
11860 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
11861 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
11862 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
11863 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
11864 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
11865 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
11866 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
11867 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
11868 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
11869 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
11870 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
11871 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
11872 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
11873 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
11874 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
11875 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
11876 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
11877 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
11878 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
11879 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
11880 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
11881 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
11882 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
11883 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
11884 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
11885 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
11886 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
11887 .rlen = 512,
11888 }, {
11889 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11890 "\x23\x53\x60\x28\x74\x71\x35\x26"
11891 "\x62\x49\x77\x57\x24\x70\x93\x69"
11892 "\x99\x59\x57\x49\x66\x96\x76\x27"
11893 "\x31\x41\x59\x26\x53\x58\x97\x93"
11894 "\x23\x84\x62\x64\x33\x83\x27\x95"
11895 "\x02\x88\x41\x97\x16\x93\x99\x37"
11896 "\x51\x05\x82\x09\x74\x94\x45\x92",
11897 .klen = 64,
11898 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11899 "\x00\x00\x00\x00\x00\x00\x00\x00",
11900 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11901 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11902 "\x10\x11\x12\x13\x14\x15\x16\x17"
11903 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11904 "\x20\x21\x22\x23\x24\x25\x26\x27"
11905 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11906 "\x30\x31\x32\x33\x34\x35\x36\x37"
11907 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11908 "\x40\x41\x42\x43\x44\x45\x46\x47"
11909 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11910 "\x50\x51\x52\x53\x54\x55\x56\x57"
11911 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11912 "\x60\x61\x62\x63\x64\x65\x66\x67"
11913 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11914 "\x70\x71\x72\x73\x74\x75\x76\x77"
11915 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11916 "\x80\x81\x82\x83\x84\x85\x86\x87"
11917 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11918 "\x90\x91\x92\x93\x94\x95\x96\x97"
11919 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11920 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11921 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11922 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11923 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11924 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11925 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11926 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11927 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11928 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11929 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11930 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11931 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11932 "\x00\x01\x02\x03\x04\x05\x06\x07"
11933 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11934 "\x10\x11\x12\x13\x14\x15\x16\x17"
11935 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11936 "\x20\x21\x22\x23\x24\x25\x26\x27"
11937 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11938 "\x30\x31\x32\x33\x34\x35\x36\x37"
11939 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11940 "\x40\x41\x42\x43\x44\x45\x46\x47"
11941 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11942 "\x50\x51\x52\x53\x54\x55\x56\x57"
11943 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11944 "\x60\x61\x62\x63\x64\x65\x66\x67"
11945 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11946 "\x70\x71\x72\x73\x74\x75\x76\x77"
11947 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11948 "\x80\x81\x82\x83\x84\x85\x86\x87"
11949 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11950 "\x90\x91\x92\x93\x94\x95\x96\x97"
11951 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11952 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11953 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11954 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11955 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11956 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11957 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11958 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11959 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11960 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11961 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11962 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11963 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11964 .ilen = 512,
11965 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
11966 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
11967 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
11968 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
11969 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
11970 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
11971 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
11972 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
11973 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
11974 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
11975 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
11976 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
11977 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
11978 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
11979 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
11980 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
11981 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
11982 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
11983 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
11984 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
11985 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
11986 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
11987 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
11988 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
11989 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
11990 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
11991 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
11992 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
11993 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
11994 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
11995 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
11996 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
11997 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
11998 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
11999 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12000 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12001 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12002 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12003 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12004 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12005 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12006 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12007 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12008 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12009 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12010 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12011 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12012 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12013 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12014 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12015 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12016 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12017 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12018 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12019 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12020 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12021 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12022 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12023 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12024 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12025 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12026 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12027 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12028 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12029 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012030 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012031 .np = 3,
12032 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012033 },
12034};
12035
12036static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12037 /* Generated from AES-XTS test vectors */
12038 /* same as enc vectors with input and result reversed */
12039 {
12040 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12041 "\x00\x00\x00\x00\x00\x00\x00\x00"
12042 "\x00\x00\x00\x00\x00\x00\x00\x00"
12043 "\x00\x00\x00\x00\x00\x00\x00\x00",
12044 .klen = 32,
12045 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12046 "\x00\x00\x00\x00\x00\x00\x00\x00",
12047 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12048 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12049 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12050 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12051 .ilen = 32,
12052 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12053 "\x00\x00\x00\x00\x00\x00\x00\x00"
12054 "\x00\x00\x00\x00\x00\x00\x00\x00"
12055 "\x00\x00\x00\x00\x00\x00\x00\x00",
12056 .rlen = 32,
12057 }, {
12058 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12059 "\x11\x11\x11\x11\x11\x11\x11\x11"
12060 "\x22\x22\x22\x22\x22\x22\x22\x22"
12061 "\x22\x22\x22\x22\x22\x22\x22\x22",
12062 .klen = 32,
12063 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12064 "\x00\x00\x00\x00\x00\x00\x00\x00",
12065 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12066 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12067 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12068 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12069 .ilen = 32,
12070 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12071 "\x44\x44\x44\x44\x44\x44\x44\x44"
12072 "\x44\x44\x44\x44\x44\x44\x44\x44"
12073 "\x44\x44\x44\x44\x44\x44\x44\x44",
12074 .rlen = 32,
12075 }, {
12076 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12077 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12078 "\x22\x22\x22\x22\x22\x22\x22\x22"
12079 "\x22\x22\x22\x22\x22\x22\x22\x22",
12080 .klen = 32,
12081 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12082 "\x00\x00\x00\x00\x00\x00\x00\x00",
12083 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12084 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12085 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12086 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12087 .ilen = 32,
12088 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12089 "\x44\x44\x44\x44\x44\x44\x44\x44"
12090 "\x44\x44\x44\x44\x44\x44\x44\x44"
12091 "\x44\x44\x44\x44\x44\x44\x44\x44",
12092 .rlen = 32,
12093 }, {
12094 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12095 "\x23\x53\x60\x28\x74\x71\x35\x26"
12096 "\x31\x41\x59\x26\x53\x58\x97\x93"
12097 "\x23\x84\x62\x64\x33\x83\x27\x95",
12098 .klen = 32,
12099 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12100 "\x00\x00\x00\x00\x00\x00\x00\x00",
12101 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12102 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12103 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12104 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12105 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12106 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12107 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12108 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12109 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12110 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12111 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12112 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12113 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12114 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12115 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12116 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12117 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12118 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12119 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12120 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12121 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12122 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12123 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12124 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12125 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12126 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12127 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12128 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12129 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12130 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12131 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12132 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12133 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12134 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12135 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12136 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12137 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12138 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12139 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12140 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12141 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12142 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12143 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12144 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12145 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12146 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12147 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12148 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12149 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12150 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12151 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12152 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12153 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12154 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12155 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12156 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12157 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12158 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12159 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12160 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12161 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12162 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12163 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12164 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12165 .ilen = 512,
12166 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12167 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12168 "\x10\x11\x12\x13\x14\x15\x16\x17"
12169 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12170 "\x20\x21\x22\x23\x24\x25\x26\x27"
12171 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12172 "\x30\x31\x32\x33\x34\x35\x36\x37"
12173 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12174 "\x40\x41\x42\x43\x44\x45\x46\x47"
12175 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12176 "\x50\x51\x52\x53\x54\x55\x56\x57"
12177 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12178 "\x60\x61\x62\x63\x64\x65\x66\x67"
12179 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12180 "\x70\x71\x72\x73\x74\x75\x76\x77"
12181 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12182 "\x80\x81\x82\x83\x84\x85\x86\x87"
12183 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12184 "\x90\x91\x92\x93\x94\x95\x96\x97"
12185 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12186 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12187 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12188 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12189 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12190 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12191 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12192 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12193 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12194 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12195 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12196 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12197 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12198 "\x00\x01\x02\x03\x04\x05\x06\x07"
12199 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12200 "\x10\x11\x12\x13\x14\x15\x16\x17"
12201 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12202 "\x20\x21\x22\x23\x24\x25\x26\x27"
12203 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12204 "\x30\x31\x32\x33\x34\x35\x36\x37"
12205 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12206 "\x40\x41\x42\x43\x44\x45\x46\x47"
12207 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12208 "\x50\x51\x52\x53\x54\x55\x56\x57"
12209 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12210 "\x60\x61\x62\x63\x64\x65\x66\x67"
12211 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12212 "\x70\x71\x72\x73\x74\x75\x76\x77"
12213 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12214 "\x80\x81\x82\x83\x84\x85\x86\x87"
12215 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12216 "\x90\x91\x92\x93\x94\x95\x96\x97"
12217 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12218 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12219 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12220 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12221 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12222 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12223 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12224 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12225 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12226 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12227 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12228 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12229 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12230 .rlen = 512,
12231 }, {
12232 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12233 "\x23\x53\x60\x28\x74\x71\x35\x26"
12234 "\x62\x49\x77\x57\x24\x70\x93\x69"
12235 "\x99\x59\x57\x49\x66\x96\x76\x27"
12236 "\x31\x41\x59\x26\x53\x58\x97\x93"
12237 "\x23\x84\x62\x64\x33\x83\x27\x95"
12238 "\x02\x88\x41\x97\x16\x93\x99\x37"
12239 "\x51\x05\x82\x09\x74\x94\x45\x92",
12240 .klen = 64,
12241 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12242 "\x00\x00\x00\x00\x00\x00\x00\x00",
12243 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12244 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12245 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12246 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12247 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12248 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12249 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12250 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12251 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12252 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12253 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12254 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12255 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12256 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12257 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12258 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12259 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12260 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12261 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12262 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12263 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12264 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12265 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12266 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12267 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12268 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12269 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12270 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12271 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12272 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12273 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12274 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12275 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12276 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12277 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12278 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12279 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12280 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12281 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12282 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12283 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12284 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12285 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12286 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12287 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12288 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12289 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12290 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12291 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12292 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12293 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12294 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12295 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12296 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12297 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12298 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12299 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12300 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12301 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12302 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12303 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12304 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12305 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12306 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12307 .ilen = 512,
12308 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12309 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12310 "\x10\x11\x12\x13\x14\x15\x16\x17"
12311 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12312 "\x20\x21\x22\x23\x24\x25\x26\x27"
12313 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12314 "\x30\x31\x32\x33\x34\x35\x36\x37"
12315 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12316 "\x40\x41\x42\x43\x44\x45\x46\x47"
12317 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12318 "\x50\x51\x52\x53\x54\x55\x56\x57"
12319 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12320 "\x60\x61\x62\x63\x64\x65\x66\x67"
12321 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12322 "\x70\x71\x72\x73\x74\x75\x76\x77"
12323 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12324 "\x80\x81\x82\x83\x84\x85\x86\x87"
12325 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12326 "\x90\x91\x92\x93\x94\x95\x96\x97"
12327 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12328 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12329 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12330 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12331 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12332 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12333 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12334 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12335 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12336 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12337 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12338 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12339 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12340 "\x00\x01\x02\x03\x04\x05\x06\x07"
12341 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12342 "\x10\x11\x12\x13\x14\x15\x16\x17"
12343 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12344 "\x20\x21\x22\x23\x24\x25\x26\x27"
12345 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12346 "\x30\x31\x32\x33\x34\x35\x36\x37"
12347 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12348 "\x40\x41\x42\x43\x44\x45\x46\x47"
12349 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12350 "\x50\x51\x52\x53\x54\x55\x56\x57"
12351 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12352 "\x60\x61\x62\x63\x64\x65\x66\x67"
12353 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12354 "\x70\x71\x72\x73\x74\x75\x76\x77"
12355 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12356 "\x80\x81\x82\x83\x84\x85\x86\x87"
12357 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12358 "\x90\x91\x92\x93\x94\x95\x96\x97"
12359 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12360 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12361 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12362 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12363 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12364 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12365 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12366 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12367 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12368 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12369 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12370 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12371 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12372 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012373 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012374 .np = 3,
12375 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012376 },
12377};
12378
Herbert Xuda7f0332008-07-31 17:08:25 +080012379/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012380#define CAST6_ENC_TEST_VECTORS 4
12381#define CAST6_DEC_TEST_VECTORS 4
12382#define CAST6_CBC_ENC_TEST_VECTORS 1
12383#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012384#define CAST6_CTR_ENC_TEST_VECTORS 2
12385#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012386#define CAST6_LRW_ENC_TEST_VECTORS 1
12387#define CAST6_LRW_DEC_TEST_VECTORS 1
12388#define CAST6_XTS_ENC_TEST_VECTORS 1
12389#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012390
12391static struct cipher_testvec cast6_enc_tv_template[] = {
12392 {
12393 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12394 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12395 .klen = 16,
12396 .input = zeroed_string,
12397 .ilen = 16,
12398 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12399 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12400 .rlen = 16,
12401 }, {
12402 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12403 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12404 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12405 .klen = 24,
12406 .input = zeroed_string,
12407 .ilen = 16,
12408 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12409 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12410 .rlen = 16,
12411 }, {
12412 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12413 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12414 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12415 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12416 .klen = 32,
12417 .input = zeroed_string,
12418 .ilen = 16,
12419 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12420 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12421 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012422 }, { /* Generated from TF test vectors */
12423 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12424 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12425 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12426 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12427 .klen = 32,
12428 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12429 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12430 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12431 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12432 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12433 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12434 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12435 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12436 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12437 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12438 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12439 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12440 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12441 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12442 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12443 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12444 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12445 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12446 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12447 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12448 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12449 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12450 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12451 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12452 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12453 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12454 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12455 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12456 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12457 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12458 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12459 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12460 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12461 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12462 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12463 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12464 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12465 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12466 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12467 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12468 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12469 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12470 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12471 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12472 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12473 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12474 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12475 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12476 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12477 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12478 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12479 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12480 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12481 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12482 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12483 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12484 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12485 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12486 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12487 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12488 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12489 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12490 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12491 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12492 .ilen = 496,
12493 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12494 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12495 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12496 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12497 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12498 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12499 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12500 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12501 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12502 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12503 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12504 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12505 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12506 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12507 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12508 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12509 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12510 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12511 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12512 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12513 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12514 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12515 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12516 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12517 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12518 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12519 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12520 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12521 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12522 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12523 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12524 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12525 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12526 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12527 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12528 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12529 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12530 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12531 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12532 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12533 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12534 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12535 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12536 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12537 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12538 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12539 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12540 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12541 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12542 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12543 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12544 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12545 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12546 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12547 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12548 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12549 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12550 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12551 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12552 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12553 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12554 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12555 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012556 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012557 .np = 3,
12558 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012559 },
12560};
12561
12562static struct cipher_testvec cast6_dec_tv_template[] = {
12563 {
12564 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12565 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12566 .klen = 16,
12567 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12568 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12569 .ilen = 16,
12570 .result = zeroed_string,
12571 .rlen = 16,
12572 }, {
12573 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12574 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12575 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12576 .klen = 24,
12577 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12578 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12579 .ilen = 16,
12580 .result = zeroed_string,
12581 .rlen = 16,
12582 }, {
12583 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12584 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12585 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12586 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12587 .klen = 32,
12588 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12589 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12590 .ilen = 16,
12591 .result = zeroed_string,
12592 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012593 }, { /* Generated from TF test vectors */
12594 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12595 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12596 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12597 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12598 .klen = 32,
12599 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12600 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12601 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12602 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12603 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12604 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12605 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12606 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12607 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12608 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12609 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12610 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12611 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12612 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12613 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12614 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12615 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12616 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12617 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12618 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12619 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12620 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12621 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12622 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12623 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12624 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12625 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12626 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12627 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12628 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12629 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12630 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12631 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12632 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12633 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12634 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12635 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12636 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12637 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12638 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12639 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12640 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12641 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12642 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12643 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12644 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12645 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12646 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12647 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12648 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12649 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12650 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12651 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12652 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12653 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12654 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12655 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12656 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12657 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12658 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12659 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12660 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12661 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12662 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12663 .ilen = 496,
12664 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12665 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12666 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12667 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12668 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12669 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12670 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12671 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12672 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12673 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12674 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12675 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12676 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12677 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12678 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12679 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12680 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12681 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12682 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12683 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12684 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12685 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12686 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12687 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12688 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12689 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12690 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12691 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12692 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12693 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12694 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12695 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12696 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12697 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12698 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12699 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12700 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12701 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12702 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12703 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12704 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12705 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12706 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12707 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12708 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12709 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12710 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12711 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12712 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12713 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12714 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12715 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12716 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12717 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12718 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12719 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12720 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12721 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12722 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12723 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12724 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12725 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12726 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012727 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012728 .np = 3,
12729 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012730 },
12731};
12732
12733static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12734 { /* Generated from TF test vectors */
12735 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12736 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12737 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12738 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12739 .klen = 32,
12740 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12741 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12742 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12743 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12744 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12745 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12746 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12747 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12748 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12749 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12750 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12751 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12752 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12753 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12754 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12755 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12756 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12757 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12758 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12759 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12760 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12761 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12762 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12763 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12764 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12765 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12766 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12767 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12768 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12769 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12770 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12771 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12772 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12773 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12774 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12775 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12776 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12777 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12778 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12779 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12780 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12781 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12782 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12783 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12784 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12785 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12786 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12787 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12788 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12789 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12790 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12791 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12792 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12793 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12794 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12795 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12796 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12797 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12798 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12799 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12800 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12801 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12802 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12803 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12804 .ilen = 496,
12805 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12806 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12807 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12808 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12809 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12810 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12811 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12812 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12813 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12814 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12815 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12816 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12817 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12818 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12819 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12820 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12821 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12822 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12823 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12824 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12825 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12826 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12827 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12828 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12829 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12830 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12831 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12832 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12833 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12834 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12835 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12836 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12837 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12838 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12839 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12840 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12841 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12842 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12843 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12844 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12845 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12846 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12847 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12848 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12849 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12850 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12851 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12852 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12853 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12854 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12855 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12856 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12857 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12858 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12859 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12860 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12861 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12862 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12863 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12864 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12865 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12866 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12867 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012868 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012869 .np = 3,
12870 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012871 },
12872};
12873
12874static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
12875 { /* Generated from TF test vectors */
12876 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12877 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12878 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12879 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12880 .klen = 32,
12881 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12882 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12883 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12884 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12885 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12886 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12887 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12888 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12889 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12890 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12891 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12892 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12893 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12894 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12895 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12896 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12897 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12898 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12899 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12900 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12901 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12902 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12903 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12904 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12905 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12906 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12907 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12908 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12909 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12910 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12911 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12912 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12913 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12914 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12915 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12916 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12917 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12918 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12919 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12920 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12921 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12922 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12923 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12924 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12925 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12926 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12927 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12928 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12929 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12930 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12931 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12932 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12933 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12934 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12935 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12936 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12937 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12938 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12939 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12940 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12941 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12942 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12943 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12944 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12945 .ilen = 496,
12946 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12947 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12948 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12949 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12950 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12951 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12952 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12953 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12954 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12955 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12956 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12957 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12958 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12959 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12960 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12961 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12962 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12963 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12964 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12965 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12966 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12967 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12968 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12969 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12970 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12971 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12972 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12973 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12974 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12975 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12976 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12977 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12978 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12979 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12980 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12981 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12982 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12983 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12984 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12985 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12986 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12987 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12988 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12989 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12990 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12991 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12992 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12993 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12994 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12995 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12996 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12997 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12998 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12999 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13000 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13001 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13002 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13003 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13004 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13005 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13006 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13007 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13008 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013009 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013010 .np = 3,
13011 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013012 },
13013};
13014
13015static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13016 { /* Generated from TF test vectors */
13017 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13018 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13019 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13020 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13021 .klen = 32,
13022 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13023 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13024 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13025 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013026 "\x3A",
13027 .ilen = 17,
13028 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13029 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13030 "\x57",
13031 .rlen = 17,
13032 }, { /* Generated from TF test vectors */
13033 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13034 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13035 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13036 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13037 .klen = 32,
13038 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13039 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13040 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13041 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013042 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13043 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13044 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13045 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13046 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13047 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13048 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13049 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13050 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13051 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13052 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13053 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13054 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13055 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13056 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13057 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13058 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13059 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13060 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13061 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13062 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13063 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13064 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13065 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13066 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13067 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13068 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13069 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13070 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13071 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13072 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13073 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13074 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13075 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13076 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13077 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13078 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13079 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13080 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13081 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13082 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13083 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13084 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13085 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13086 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13087 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13088 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13089 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13090 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13091 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13092 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13093 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13094 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13095 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13096 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13097 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13098 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13099 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13100 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13101 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13102 .ilen = 496,
13103 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13104 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13105 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13106 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13107 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13108 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13109 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13110 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13111 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13112 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13113 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13114 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13115 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13116 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13117 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13118 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13119 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13120 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13121 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13122 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13123 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13124 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13125 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13126 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13127 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13128 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13129 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13130 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13131 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13132 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13133 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13134 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13135 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13136 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13137 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13138 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13139 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13140 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13141 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13142 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13143 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13144 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13145 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13146 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13147 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13148 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13149 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13150 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13151 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13152 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13153 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13154 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13155 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13156 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13157 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13158 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13159 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13160 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13161 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13162 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13163 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13164 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13165 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013166 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013167 .np = 3,
13168 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013169 },
13170};
13171
13172static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13173 { /* Generated from TF test vectors */
13174 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13175 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13176 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13177 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13178 .klen = 32,
13179 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13180 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13181 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13182 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013183 "\x57",
13184 .ilen = 17,
13185 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13186 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13187 "\x3A",
13188 .rlen = 17,
13189 }, { /* Generated from TF test vectors */
13190 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13191 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13192 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13193 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13194 .klen = 32,
13195 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13196 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13197 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13198 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013199 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13200 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13201 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13202 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13203 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13204 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13205 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13206 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13207 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13208 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13209 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13210 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13211 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13212 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13213 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13214 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13215 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13216 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13217 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13218 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13219 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13220 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13221 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13222 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13223 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13224 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13225 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13226 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13227 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13228 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13229 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13230 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13231 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13232 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13233 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13234 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13235 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13236 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13237 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13238 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13239 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13240 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13241 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13242 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13243 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13244 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13245 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13246 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13247 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13248 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13249 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13250 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13251 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13252 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13253 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13254 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13255 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13256 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13257 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13258 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13259 .ilen = 496,
13260 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13261 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13262 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13263 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13264 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13265 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13266 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13267 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13268 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13269 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13270 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13271 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13272 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13273 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13274 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13275 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13276 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13277 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13278 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13279 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13280 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13281 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13282 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13283 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13284 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13285 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13286 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13287 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13288 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13289 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13290 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13291 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13292 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13293 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13294 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13295 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13296 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13297 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13298 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13299 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13300 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13301 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13302 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13303 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13304 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13305 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13306 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13307 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13308 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13309 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13310 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13311 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13312 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13313 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13314 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13315 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13316 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13317 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13318 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13319 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13320 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13321 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13322 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013323 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013324 .np = 3,
13325 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013326 },
13327};
13328
13329static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13330 { /* Generated from TF test vectors */
13331 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13332 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13333 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13334 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13335 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13336 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13337 .klen = 48,
13338 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13339 "\x00\x00\x00\x00\x00\x00\x00\x01",
13340 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13341 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13342 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13343 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13344 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13345 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13346 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13347 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13348 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13349 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13350 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13351 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13352 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13353 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13354 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13355 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13356 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13357 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13358 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13359 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13360 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13361 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13362 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13363 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13364 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13365 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13366 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13367 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13368 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13369 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13370 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13371 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13372 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13373 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13374 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13375 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13376 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13377 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13378 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13379 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13380 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13381 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13382 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13383 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13384 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13385 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13386 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13387 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13388 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13389 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13390 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13391 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13392 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13393 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13394 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13395 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13396 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13397 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13398 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13399 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13400 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13401 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13402 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13403 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13404 .ilen = 512,
13405 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13406 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13407 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13408 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13409 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13410 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13411 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13412 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13413 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13414 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13415 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13416 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13417 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13418 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13419 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13420 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13421 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13422 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13423 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13424 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13425 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13426 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13427 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13428 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13429 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13430 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13431 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13432 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13433 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13434 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13435 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13436 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13437 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13438 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13439 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13440 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13441 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13442 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13443 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13444 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13445 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13446 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13447 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13448 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13449 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13450 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13451 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13452 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13453 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13454 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13455 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13456 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13457 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13458 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13459 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13460 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13461 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13462 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13463 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13464 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13465 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13466 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13467 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13468 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13469 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013470 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013471 .np = 3,
13472 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013473 },
13474};
13475
13476static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13477 { /* Generated from TF test vectors */
13478 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13479 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13480 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13481 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13482 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13483 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13484 .klen = 48,
13485 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13486 "\x00\x00\x00\x00\x00\x00\x00\x01",
13487 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13488 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13489 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13490 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13491 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13492 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13493 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13494 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13495 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13496 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13497 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13498 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13499 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13500 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13501 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13502 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13503 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13504 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13505 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13506 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13507 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13508 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13509 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13510 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13511 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13512 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13513 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13514 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13515 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13516 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13517 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13518 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13519 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13520 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13521 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13522 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13523 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13524 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13525 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13526 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13527 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13528 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13529 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13530 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13531 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13532 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13533 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13534 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13535 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13536 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13537 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13538 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13539 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13540 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13541 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13542 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13543 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13544 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13545 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13546 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13547 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13548 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13549 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13550 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13551 .ilen = 512,
13552 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13553 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13554 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13555 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13556 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13557 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13558 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13559 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13560 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13561 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13562 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13563 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13564 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13565 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13566 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13567 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13568 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13569 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13570 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13571 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13572 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13573 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13574 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13575 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13576 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13577 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13578 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13579 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13580 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13581 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13582 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13583 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13584 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13585 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13586 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13587 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13588 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13589 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13590 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13591 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13592 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13593 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13594 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13595 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13596 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13597 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13598 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13599 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13600 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13601 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13602 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13603 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13604 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13605 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13606 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13607 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13608 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13609 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13610 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13611 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13612 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13613 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13614 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13615 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13616 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013617 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013618 .np = 3,
13619 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013620 },
13621};
13622
13623static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13624 { /* Generated from TF test vectors */
13625 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13626 "\x23\x53\x60\x28\x74\x71\x35\x26"
13627 "\x62\x49\x77\x57\x24\x70\x93\x69"
13628 "\x99\x59\x57\x49\x66\x96\x76\x27"
13629 "\x31\x41\x59\x26\x53\x58\x97\x93"
13630 "\x23\x84\x62\x64\x33\x83\x27\x95"
13631 "\x02\x88\x41\x97\x16\x93\x99\x37"
13632 "\x51\x05\x82\x09\x74\x94\x45\x92",
13633 .klen = 64,
13634 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13635 "\x00\x00\x00\x00\x00\x00\x00\x00",
13636 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13637 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13638 "\x10\x11\x12\x13\x14\x15\x16\x17"
13639 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13640 "\x20\x21\x22\x23\x24\x25\x26\x27"
13641 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13642 "\x30\x31\x32\x33\x34\x35\x36\x37"
13643 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13644 "\x40\x41\x42\x43\x44\x45\x46\x47"
13645 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13646 "\x50\x51\x52\x53\x54\x55\x56\x57"
13647 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13648 "\x60\x61\x62\x63\x64\x65\x66\x67"
13649 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13650 "\x70\x71\x72\x73\x74\x75\x76\x77"
13651 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13652 "\x80\x81\x82\x83\x84\x85\x86\x87"
13653 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13654 "\x90\x91\x92\x93\x94\x95\x96\x97"
13655 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13656 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13657 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13658 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13659 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13660 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13661 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13662 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13663 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13664 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13665 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13666 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13667 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13668 "\x00\x01\x02\x03\x04\x05\x06\x07"
13669 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13670 "\x10\x11\x12\x13\x14\x15\x16\x17"
13671 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13672 "\x20\x21\x22\x23\x24\x25\x26\x27"
13673 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13674 "\x30\x31\x32\x33\x34\x35\x36\x37"
13675 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13676 "\x40\x41\x42\x43\x44\x45\x46\x47"
13677 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13678 "\x50\x51\x52\x53\x54\x55\x56\x57"
13679 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13680 "\x60\x61\x62\x63\x64\x65\x66\x67"
13681 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13682 "\x70\x71\x72\x73\x74\x75\x76\x77"
13683 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13684 "\x80\x81\x82\x83\x84\x85\x86\x87"
13685 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13686 "\x90\x91\x92\x93\x94\x95\x96\x97"
13687 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13688 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13689 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13690 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13691 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13692 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13693 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13694 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13695 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13696 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13697 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13698 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13699 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13700 .ilen = 512,
13701 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13702 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13703 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13704 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13705 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13706 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13707 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13708 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13709 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13710 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13711 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13712 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13713 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13714 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13715 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13716 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13717 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13718 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13719 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13720 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13721 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13722 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13723 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13724 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13725 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13726 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13727 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13728 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13729 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13730 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13731 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13732 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13733 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13734 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13735 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13736 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13737 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13738 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13739 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13740 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13741 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13742 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13743 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13744 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13745 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13746 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13747 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13748 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13749 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13750 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13751 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13752 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13753 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13754 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13755 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13756 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13757 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13758 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13759 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13760 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13761 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13762 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13763 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13764 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13765 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013766 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013767 .np = 3,
13768 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013769 },
13770};
13771
13772static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13773 { /* Generated from TF test vectors */
13774 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13775 "\x23\x53\x60\x28\x74\x71\x35\x26"
13776 "\x62\x49\x77\x57\x24\x70\x93\x69"
13777 "\x99\x59\x57\x49\x66\x96\x76\x27"
13778 "\x31\x41\x59\x26\x53\x58\x97\x93"
13779 "\x23\x84\x62\x64\x33\x83\x27\x95"
13780 "\x02\x88\x41\x97\x16\x93\x99\x37"
13781 "\x51\x05\x82\x09\x74\x94\x45\x92",
13782 .klen = 64,
13783 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13784 "\x00\x00\x00\x00\x00\x00\x00\x00",
13785 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13786 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13787 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13788 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13789 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13790 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13791 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13792 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13793 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13794 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13795 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13796 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13797 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13798 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13799 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13800 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13801 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13802 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13803 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13804 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13805 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13806 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13807 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13808 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13809 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13810 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13811 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13812 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13813 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13814 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13815 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13816 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13817 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13818 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13819 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13820 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13821 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13822 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13823 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13824 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13825 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13826 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13827 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13828 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13829 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13830 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13831 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13832 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13833 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13834 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13835 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13836 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13837 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13838 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13839 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13840 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13841 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13842 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13843 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13844 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13845 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13846 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13847 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13848 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13849 .ilen = 512,
13850 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13851 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13852 "\x10\x11\x12\x13\x14\x15\x16\x17"
13853 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13854 "\x20\x21\x22\x23\x24\x25\x26\x27"
13855 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13856 "\x30\x31\x32\x33\x34\x35\x36\x37"
13857 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13858 "\x40\x41\x42\x43\x44\x45\x46\x47"
13859 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13860 "\x50\x51\x52\x53\x54\x55\x56\x57"
13861 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13862 "\x60\x61\x62\x63\x64\x65\x66\x67"
13863 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13864 "\x70\x71\x72\x73\x74\x75\x76\x77"
13865 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13866 "\x80\x81\x82\x83\x84\x85\x86\x87"
13867 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13868 "\x90\x91\x92\x93\x94\x95\x96\x97"
13869 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13870 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13871 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13872 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13873 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13874 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13875 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13876 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13877 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13878 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13879 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13880 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13881 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13882 "\x00\x01\x02\x03\x04\x05\x06\x07"
13883 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13884 "\x10\x11\x12\x13\x14\x15\x16\x17"
13885 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13886 "\x20\x21\x22\x23\x24\x25\x26\x27"
13887 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13888 "\x30\x31\x32\x33\x34\x35\x36\x37"
13889 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13890 "\x40\x41\x42\x43\x44\x45\x46\x47"
13891 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13892 "\x50\x51\x52\x53\x54\x55\x56\x57"
13893 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13894 "\x60\x61\x62\x63\x64\x65\x66\x67"
13895 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13896 "\x70\x71\x72\x73\x74\x75\x76\x77"
13897 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13898 "\x80\x81\x82\x83\x84\x85\x86\x87"
13899 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13900 "\x90\x91\x92\x93\x94\x95\x96\x97"
13901 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13902 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13903 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13904 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13905 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13906 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13907 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13908 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13909 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13910 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13911 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13912 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13913 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13914 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013915 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013916 .np = 3,
13917 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013918 },
13919};
13920
13921
13922/*
13923 * AES test vectors.
13924 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013925#define AES_ENC_TEST_VECTORS 4
13926#define AES_DEC_TEST_VECTORS 4
13927#define AES_CBC_ENC_TEST_VECTORS 5
13928#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020013929#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
13930#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053013931#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
13932#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
13933#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
13934#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
13935#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080013936#define AES_LRW_ENC_TEST_VECTORS 8
13937#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100013938#define AES_XTS_ENC_TEST_VECTORS 5
13939#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013940#define AES_CTR_ENC_TEST_VECTORS 5
13941#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100013942#define AES_OFB_ENC_TEST_VECTORS 1
13943#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080013944#define AES_CTR_3686_ENC_TEST_VECTORS 7
13945#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080013946#define AES_GCM_ENC_TEST_VECTORS 9
13947#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -040013948#define AES_GCM_4106_ENC_TEST_VECTORS 7
13949#define AES_GCM_4106_DEC_TEST_VECTORS 7
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030013950#define AES_GCM_4543_ENC_TEST_VECTORS 1
13951#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080013952#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080013953#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080013954#define AES_CCM_4309_ENC_TEST_VECTORS 7
13955#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080013956
13957static struct cipher_testvec aes_enc_tv_template[] = {
13958 { /* From FIPS-197 */
13959 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13960 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13961 .klen = 16,
13962 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13963 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13964 .ilen = 16,
13965 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
13966 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
13967 .rlen = 16,
13968 }, {
13969 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13970 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13971 "\x10\x11\x12\x13\x14\x15\x16\x17",
13972 .klen = 24,
13973 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13974 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13975 .ilen = 16,
13976 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
13977 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
13978 .rlen = 16,
13979 }, {
13980 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13981 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13982 "\x10\x11\x12\x13\x14\x15\x16\x17"
13983 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13984 .klen = 32,
13985 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13986 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13987 .ilen = 16,
13988 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
13989 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
13990 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013991 }, { /* Generated with Crypto++ */
13992 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
13993 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
13994 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
13995 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
13996 .klen = 32,
13997 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13998 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13999 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14000 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14001 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14002 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14003 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14004 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14005 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14006 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14007 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14008 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14009 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14010 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14011 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14012 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14013 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14014 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14015 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14016 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14017 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14018 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14019 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14020 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14021 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14022 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14023 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14024 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14025 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14026 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14027 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14028 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14029 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14030 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14031 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14032 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14033 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14034 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14035 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14036 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14037 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14038 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14039 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14040 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14041 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14042 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14043 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14044 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14045 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14046 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14047 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14048 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14049 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14050 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14051 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14052 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14053 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14054 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14055 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14056 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14057 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14058 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14059 .ilen = 496,
14060 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14061 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14062 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14063 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14064 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14065 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14066 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14067 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14068 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14069 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14070 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14071 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14072 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14073 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14074 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14075 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14076 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14077 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14078 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14079 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14080 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14081 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14082 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14083 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14084 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14085 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14086 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14087 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14088 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14089 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14090 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14091 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14092 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14093 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14094 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14095 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14096 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14097 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14098 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14099 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14100 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14101 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14102 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14103 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14104 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14105 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14106 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14107 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14108 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14109 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14110 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14111 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14112 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14113 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14114 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14115 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14116 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14117 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14118 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14119 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14120 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14121 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14122 .rlen = 496,
14123 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014124 .np = 3,
14125 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014126 },
14127};
14128
14129static struct cipher_testvec aes_dec_tv_template[] = {
14130 { /* From FIPS-197 */
14131 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14132 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14133 .klen = 16,
14134 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14135 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14136 .ilen = 16,
14137 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14138 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14139 .rlen = 16,
14140 }, {
14141 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14142 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14143 "\x10\x11\x12\x13\x14\x15\x16\x17",
14144 .klen = 24,
14145 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14146 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14147 .ilen = 16,
14148 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14149 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14150 .rlen = 16,
14151 }, {
14152 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14153 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14154 "\x10\x11\x12\x13\x14\x15\x16\x17"
14155 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14156 .klen = 32,
14157 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14158 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14159 .ilen = 16,
14160 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14161 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14162 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014163 }, { /* Generated with Crypto++ */
14164 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14165 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14166 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14167 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14168 .klen = 32,
14169 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14170 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14171 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14172 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14173 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14174 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14175 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14176 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14177 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14178 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14179 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14180 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14181 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14182 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14183 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14184 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14185 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14186 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14187 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14188 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14189 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14190 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14191 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14192 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14193 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14194 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14195 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14196 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14197 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14198 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14199 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14200 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14201 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14202 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14203 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14204 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14205 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14206 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14207 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14208 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14209 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14210 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14211 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14212 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14213 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14214 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14215 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14216 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14217 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14218 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14219 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14220 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14221 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14222 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14223 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14224 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14225 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14226 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14227 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14228 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14229 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14230 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14231 .ilen = 496,
14232 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14233 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14234 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14235 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14236 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14237 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14238 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14239 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14240 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14241 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14242 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14243 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14244 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14245 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14246 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14247 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14248 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14249 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14250 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14251 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14252 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14253 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14254 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14255 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14256 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14257 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14258 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14259 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14260 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14261 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14262 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14263 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14264 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14265 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14266 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14267 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14268 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14269 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14270 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14271 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14272 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14273 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14274 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14275 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14276 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14277 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14278 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14279 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14280 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14281 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14282 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14283 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14284 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14285 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14286 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14287 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14288 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14289 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14290 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14291 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14292 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14293 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14294 .rlen = 496,
14295 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014296 .np = 3,
14297 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014298 },
14299};
14300
14301static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14302 { /* From RFC 3602 */
14303 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14304 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14305 .klen = 16,
14306 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14307 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14308 .input = "Single block msg",
14309 .ilen = 16,
14310 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14311 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14312 .rlen = 16,
14313 }, {
14314 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14315 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14316 .klen = 16,
14317 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14318 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14319 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14320 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14321 "\x10\x11\x12\x13\x14\x15\x16\x17"
14322 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14323 .ilen = 32,
14324 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14325 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14326 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14327 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14328 .rlen = 32,
14329 }, { /* From NIST SP800-38A */
14330 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14331 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14332 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14333 .klen = 24,
14334 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14336 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14337 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14338 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14339 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14340 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14341 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14342 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14343 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14344 .ilen = 64,
14345 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14346 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14347 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14348 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14349 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14350 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14351 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14352 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14353 .rlen = 64,
14354 }, {
14355 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14356 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14357 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14358 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14359 .klen = 32,
14360 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14361 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14362 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14363 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14364 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14365 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14366 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14367 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14368 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14369 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14370 .ilen = 64,
14371 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14372 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14373 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14374 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14375 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14376 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14377 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14378 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14379 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014380 }, { /* Generated with Crypto++ */
14381 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14382 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14383 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14384 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14385 .klen = 32,
14386 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14387 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14388 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14389 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14390 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14391 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14392 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14393 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14394 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14395 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14396 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14397 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14398 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14399 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14400 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14401 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14402 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14403 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14404 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14405 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14406 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14407 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14408 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14409 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14410 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14411 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14412 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14413 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14414 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14415 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14416 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14417 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14418 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14419 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14420 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14421 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14422 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14423 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14424 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14425 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14426 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14427 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14428 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14429 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14430 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14431 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14432 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14433 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14434 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14435 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14436 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14437 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14438 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14439 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14440 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14441 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14442 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14443 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14444 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14445 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14446 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14447 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14448 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14449 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14450 .ilen = 496,
14451 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14452 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14453 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14454 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14455 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14456 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14457 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14458 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14459 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14460 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14461 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14462 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14463 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14464 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14465 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14466 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14467 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14468 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14469 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14470 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14471 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14472 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14473 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14474 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14475 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14476 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14477 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14478 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14479 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14480 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14481 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14482 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14483 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14484 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14485 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14486 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14487 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14488 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14489 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14490 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14491 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14492 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14493 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14494 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14495 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14496 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14497 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14498 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14499 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14500 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14501 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14502 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14503 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14504 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14505 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14506 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14507 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14508 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14509 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14510 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14511 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14512 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14513 .rlen = 496,
14514 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014515 .np = 3,
14516 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014517 },
14518};
14519
14520static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14521 { /* From RFC 3602 */
14522 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14523 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14524 .klen = 16,
14525 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14526 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14527 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14528 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14529 .ilen = 16,
14530 .result = "Single block msg",
14531 .rlen = 16,
14532 }, {
14533 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14534 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14535 .klen = 16,
14536 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14537 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14538 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14539 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14540 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14541 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14542 .ilen = 32,
14543 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14544 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14545 "\x10\x11\x12\x13\x14\x15\x16\x17"
14546 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14547 .rlen = 32,
14548 }, { /* From NIST SP800-38A */
14549 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14550 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14551 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14552 .klen = 24,
14553 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14554 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14555 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14556 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14557 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14558 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14559 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14560 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14561 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14562 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14563 .ilen = 64,
14564 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14565 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14566 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14567 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14568 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14569 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14570 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14571 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14572 .rlen = 64,
14573 }, {
14574 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14575 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14576 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14577 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14578 .klen = 32,
14579 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14580 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14581 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14582 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14583 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14584 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14585 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14586 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14587 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14588 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14589 .ilen = 64,
14590 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14591 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14592 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14593 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14594 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14595 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14596 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14597 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14598 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014599 }, { /* Generated with Crypto++ */
14600 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14601 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14602 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14603 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14604 .klen = 32,
14605 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14606 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14607 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14608 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14609 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14610 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14611 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14612 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14613 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14614 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14615 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14616 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14617 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14618 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14619 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14620 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14621 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14622 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14623 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14624 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14625 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14626 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14627 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14628 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14629 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14630 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14631 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14632 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14633 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14634 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14635 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14636 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14637 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14638 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14639 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14640 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14641 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14642 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14643 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14644 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14645 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14646 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14647 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14648 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14649 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14650 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14651 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14652 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14653 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14654 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14655 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14656 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14657 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14658 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14659 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14660 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14661 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14662 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14663 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14664 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14665 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14666 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14667 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14668 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14669 .ilen = 496,
14670 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14671 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14672 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14673 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14674 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14675 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14676 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14677 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14678 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14679 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14680 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14681 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14682 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14683 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14684 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14685 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14686 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14687 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14688 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14689 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14690 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14691 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14692 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14693 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14694 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14695 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14696 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14697 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14698 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14699 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14700 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14701 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14702 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14703 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14704 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14705 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14706 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14707 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14708 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14709 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14710 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14711 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14712 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14713 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14714 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14715 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14716 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14717 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14718 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14719 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14720 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14721 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14722 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14723 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14724 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14725 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14726 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14727 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14728 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14729 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14730 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14731 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14732 .rlen = 496,
14733 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014734 .np = 3,
14735 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014736 },
14737};
14738
Horia Geantabca4feb2014-03-14 17:46:51 +020014739static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14740 { /* Input data from RFC 2410 Case 1 */
14741#ifdef __LITTLE_ENDIAN
14742 .key = "\x08\x00" /* rta length */
14743 "\x01\x00" /* rta type */
14744#else
14745 .key = "\x00\x08" /* rta length */
14746 "\x00\x01" /* rta type */
14747#endif
14748 "\x00\x00\x00\x00" /* enc key length */
14749 "\x00\x00\x00\x00\x00\x00\x00\x00"
14750 "\x00\x00\x00\x00\x00\x00\x00\x00",
14751 .klen = 8 + 16 + 0,
14752 .iv = "",
14753 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14754 .ilen = 8,
14755 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14756 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14757 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14758 .rlen = 8 + 16,
14759 }, { /* Input data from RFC 2410 Case 2 */
14760#ifdef __LITTLE_ENDIAN
14761 .key = "\x08\x00" /* rta length */
14762 "\x01\x00" /* rta type */
14763#else
14764 .key = "\x00\x08" /* rta length */
14765 "\x00\x01" /* rta type */
14766#endif
14767 "\x00\x00\x00\x00" /* enc key length */
14768 "\x00\x00\x00\x00\x00\x00\x00\x00"
14769 "\x00\x00\x00\x00\x00\x00\x00\x00",
14770 .klen = 8 + 16 + 0,
14771 .iv = "",
14772 .input = "Network Security People Have A Strange Sense Of Humor",
14773 .ilen = 53,
14774 .result = "Network Security People Have A Strange Sense Of Humor"
14775 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14776 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14777 .rlen = 53 + 16,
14778 },
14779};
14780
14781static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14782 {
14783#ifdef __LITTLE_ENDIAN
14784 .key = "\x08\x00" /* rta length */
14785 "\x01\x00" /* rta type */
14786#else
14787 .key = "\x00\x08" /* rta length */
14788 "\x00\x01" /* rta type */
14789#endif
14790 "\x00\x00\x00\x00" /* enc key length */
14791 "\x00\x00\x00\x00\x00\x00\x00\x00"
14792 "\x00\x00\x00\x00\x00\x00\x00\x00",
14793 .klen = 8 + 16 + 0,
14794 .iv = "",
14795 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14796 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14797 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14798 .ilen = 8 + 16,
14799 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14800 .rlen = 8,
14801 }, {
14802#ifdef __LITTLE_ENDIAN
14803 .key = "\x08\x00" /* rta length */
14804 "\x01\x00" /* rta type */
14805#else
14806 .key = "\x00\x08" /* rta length */
14807 "\x00\x01" /* rta type */
14808#endif
14809 "\x00\x00\x00\x00" /* enc key length */
14810 "\x00\x00\x00\x00\x00\x00\x00\x00"
14811 "\x00\x00\x00\x00\x00\x00\x00\x00",
14812 .klen = 8 + 16 + 0,
14813 .iv = "",
14814 .input = "Network Security People Have A Strange Sense Of Humor"
14815 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14816 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14817 .ilen = 53 + 16,
14818 .result = "Network Security People Have A Strange Sense Of Humor",
14819 .rlen = 53,
14820 },
14821};
14822
Nitesh Lal5208ed22014-05-21 17:09:08 +053014823static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030014824 { /* RFC 3602 Case 1 */
14825#ifdef __LITTLE_ENDIAN
14826 .key = "\x08\x00" /* rta length */
14827 "\x01\x00" /* rta type */
14828#else
14829 .key = "\x00\x08" /* rta length */
14830 "\x00\x01" /* rta type */
14831#endif
14832 "\x00\x00\x00\x10" /* enc key length */
14833 "\x00\x00\x00\x00\x00\x00\x00\x00"
14834 "\x00\x00\x00\x00\x00\x00\x00\x00"
14835 "\x00\x00\x00\x00"
14836 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14837 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14838 .klen = 8 + 20 + 16,
14839 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14840 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14841 .input = "Single block msg",
14842 .ilen = 16,
14843 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14844 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14845 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
14846 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
14847 "\x03\x71\xa2\x06",
14848 .rlen = 16 + 20,
14849 }, { /* RFC 3602 Case 2 */
14850#ifdef __LITTLE_ENDIAN
14851 .key = "\x08\x00" /* rta length */
14852 "\x01\x00" /* rta type */
14853#else
14854 .key = "\x00\x08" /* rta length */
14855 "\x00\x01" /* rta type */
14856#endif
14857 "\x00\x00\x00\x10" /* enc key length */
14858 "\x20\x21\x22\x23\x24\x25\x26\x27"
14859 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14860 "\x30\x31\x32\x33"
14861 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14862 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14863 .klen = 8 + 20 + 16,
14864 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14865 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14866 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14867 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14868 "\x10\x11\x12\x13\x14\x15\x16\x17"
14869 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14870 .ilen = 32,
14871 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14872 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14873 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14874 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14875 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
14876 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
14877 "\x65\x39\xf8\xde",
14878 .rlen = 32 + 20,
14879 }, { /* RFC 3602 Case 3 */
14880#ifdef __LITTLE_ENDIAN
14881 .key = "\x08\x00" /* rta length */
14882 "\x01\x00" /* rta type */
14883#else
14884 .key = "\x00\x08" /* rta length */
14885 "\x00\x01" /* rta type */
14886#endif
14887 "\x00\x00\x00\x10" /* enc key length */
14888 "\x11\x22\x33\x44\x55\x66\x77\x88"
14889 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14890 "\x22\x33\x44\x55"
14891 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14892 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14893 .klen = 8 + 20 + 16,
14894 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14895 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14896 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14897 .ilen = 48,
14898 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14899 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14900 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14901 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14902 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14903 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14904 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
14905 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
14906 "\x8d\x62\xf2\x1e",
14907 .rlen = 48 + 20,
14908 }, { /* RFC 3602 Case 4 */
14909#ifdef __LITTLE_ENDIAN
14910 .key = "\x08\x00" /* rta length */
14911 "\x01\x00" /* rta type */
14912#else
14913 .key = "\x00\x08" /* rta length */
14914 "\x00\x01" /* rta type */
14915#endif
14916 "\x00\x00\x00\x10" /* enc key length */
14917 "\x11\x22\x33\x44\x55\x66\x77\x88"
14918 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14919 "\x22\x33\x44\x55"
14920 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14921 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14922 .klen = 8 + 20 + 16,
14923 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14924 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14925 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14926 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14927 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14928 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14929 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14930 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14931 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14932 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14933 .ilen = 64,
14934 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14935 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14936 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14937 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14938 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14939 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14940 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14941 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14942 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
14943 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
14944 "\x1d\xbe\xc6\xe9",
14945 .rlen = 64 + 20,
14946 }, { /* RFC 3602 Case 5 */
14947#ifdef __LITTLE_ENDIAN
14948 .key = "\x08\x00" /* rta length */
14949 "\x01\x00" /* rta type */
14950#else
14951 .key = "\x00\x08" /* rta length */
14952 "\x00\x01" /* rta type */
14953#endif
14954 "\x00\x00\x00\x10" /* enc key length */
14955 "\x11\x22\x33\x44\x55\x66\x77\x88"
14956 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14957 "\x22\x33\x44\x55"
14958 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14959 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14960 .klen = 8 + 20 + 16,
14961 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14962 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14963 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14964 .alen = 8,
14965 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14966 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14968 "\x10\x11\x12\x13\x14\x15\x16\x17"
14969 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14970 "\x20\x21\x22\x23\x24\x25\x26\x27"
14971 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14972 "\x30\x31\x32\x33\x34\x35\x36\x37"
14973 "\x01\x02\x03\x04\x05\x06\x07\x08"
14974 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14975 .ilen = 80,
14976 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14977 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14978 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14979 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14980 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14981 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
14982 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
14983 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
14984 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
14985 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
14986 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
14987 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
14988 "\x85\xe1\x59\xf7",
14989 .rlen = 80 + 20,
14990 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
14991#ifdef __LITTLE_ENDIAN
14992 .key = "\x08\x00" /* rta length */
14993 "\x01\x00" /* rta type */
14994#else
14995 .key = "\x00\x08" /* rta length */
14996 "\x00\x01" /* rta type */
14997#endif
14998 "\x00\x00\x00\x18" /* enc key length */
14999 "\x11\x22\x33\x44\x55\x66\x77\x88"
15000 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15001 "\x22\x33\x44\x55"
15002 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15003 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15004 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15005 .klen = 8 + 20 + 24,
15006 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15007 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15008 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15009 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15010 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15011 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15012 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15013 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15014 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15015 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15016 .ilen = 64,
15017 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15018 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15019 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15020 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15021 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15022 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15023 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15024 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15025 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15026 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15027 "\x47\x4c\xfc\x36",
15028 .rlen = 64 + 20,
15029 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15030#ifdef __LITTLE_ENDIAN
15031 .key = "\x08\x00" /* rta length */
15032 "\x01\x00" /* rta type */
15033#else
15034 .key = "\x00\x08" /* rta length */
15035 "\x00\x01" /* rta type */
15036#endif
15037 "\x00\x00\x00\x20" /* enc key length */
15038 "\x11\x22\x33\x44\x55\x66\x77\x88"
15039 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15040 "\x22\x33\x44\x55"
15041 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15042 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15043 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15044 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15045 .klen = 8 + 20 + 32,
15046 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15047 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15048 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15049 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15050 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15051 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15052 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15053 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15054 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15055 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15056 .ilen = 64,
15057 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15058 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15059 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15060 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15061 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15062 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15063 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15064 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15065 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15066 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15067 "\x51\xee\xd6\x4e",
15068 .rlen = 64 + 20,
15069 },
15070};
15071
Nitesh Lal5208ed22014-05-21 17:09:08 +053015072static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015073 { /* Input data from RFC 2410 Case 1 */
15074#ifdef __LITTLE_ENDIAN
15075 .key = "\x08\x00" /* rta length */
15076 "\x01\x00" /* rta type */
15077#else
15078 .key = "\x00\x08" /* rta length */
15079 "\x00\x01" /* rta type */
15080#endif
15081 "\x00\x00\x00\x00" /* enc key length */
15082 "\x00\x00\x00\x00\x00\x00\x00\x00"
15083 "\x00\x00\x00\x00\x00\x00\x00\x00"
15084 "\x00\x00\x00\x00",
15085 .klen = 8 + 20 + 0,
15086 .iv = "",
15087 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15088 .ilen = 8,
15089 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15090 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15091 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15092 "\x8c\x5e\xe4\x08",
15093 .rlen = 8 + 20,
15094 }, { /* Input data from RFC 2410 Case 2 */
15095#ifdef __LITTLE_ENDIAN
15096 .key = "\x08\x00" /* rta length */
15097 "\x01\x00" /* rta type */
15098#else
15099 .key = "\x00\x08" /* rta length */
15100 "\x00\x01" /* rta type */
15101#endif
15102 "\x00\x00\x00\x00" /* enc key length */
15103 "\x00\x00\x00\x00\x00\x00\x00\x00"
15104 "\x00\x00\x00\x00\x00\x00\x00\x00"
15105 "\x00\x00\x00\x00",
15106 .klen = 8 + 20 + 0,
15107 .iv = "",
15108 .input = "Network Security People Have A Strange Sense Of Humor",
15109 .ilen = 53,
15110 .result = "Network Security People Have A Strange Sense Of Humor"
15111 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15112 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15113 "\x91\x56\xe4\xd6",
15114 .rlen = 53 + 20,
15115 },
15116};
15117
Nitesh Lal5208ed22014-05-21 17:09:08 +053015118static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015119 {
15120#ifdef __LITTLE_ENDIAN
15121 .key = "\x08\x00" /* rta length */
15122 "\x01\x00" /* rta type */
15123#else
15124 .key = "\x00\x08" /* rta length */
15125 "\x00\x01" /* rta type */
15126#endif
15127 "\x00\x00\x00\x00" /* enc key length */
15128 "\x00\x00\x00\x00\x00\x00\x00\x00"
15129 "\x00\x00\x00\x00\x00\x00\x00\x00"
15130 "\x00\x00\x00\x00",
15131 .klen = 8 + 20 + 0,
15132 .iv = "",
15133 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15134 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15135 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15136 "\x8c\x5e\xe4\x08",
15137 .ilen = 8 + 20,
15138 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15139 .rlen = 8,
15140 }, {
15141#ifdef __LITTLE_ENDIAN
15142 .key = "\x08\x00" /* rta length */
15143 "\x01\x00" /* rta type */
15144#else
15145 .key = "\x00\x08" /* rta length */
15146 "\x00\x01" /* rta type */
15147#endif
15148 "\x00\x00\x00\x00" /* enc key length */
15149 "\x00\x00\x00\x00\x00\x00\x00\x00"
15150 "\x00\x00\x00\x00\x00\x00\x00\x00"
15151 "\x00\x00\x00\x00",
15152 .klen = 8 + 20 + 0,
15153 .iv = "",
15154 .input = "Network Security People Have A Strange Sense Of Humor"
15155 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15156 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15157 "\x91\x56\xe4\xd6",
15158 .ilen = 53 + 20,
15159 .result = "Network Security People Have A Strange Sense Of Humor",
15160 .rlen = 53,
15161 },
15162};
15163
Nitesh Lal5208ed22014-05-21 17:09:08 +053015164static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015165 { /* RFC 3602 Case 1 */
15166#ifdef __LITTLE_ENDIAN
15167 .key = "\x08\x00" /* rta length */
15168 "\x01\x00" /* rta type */
15169#else
15170 .key = "\x00\x08" /* rta length */
15171 "\x00\x01" /* rta type */
15172#endif
15173 "\x00\x00\x00\x10" /* enc key length */
15174 "\x00\x00\x00\x00\x00\x00\x00\x00"
15175 "\x00\x00\x00\x00\x00\x00\x00\x00"
15176 "\x00\x00\x00\x00\x00\x00\x00\x00"
15177 "\x00\x00\x00\x00\x00\x00\x00\x00"
15178 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15179 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15180 .klen = 8 + 32 + 16,
15181 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15182 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15183 .input = "Single block msg",
15184 .ilen = 16,
15185 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15186 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15187 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15188 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15189 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15190 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15191 .rlen = 16 + 32,
15192 }, { /* RFC 3602 Case 2 */
15193#ifdef __LITTLE_ENDIAN
15194 .key = "\x08\x00" /* rta length */
15195 "\x01\x00" /* rta type */
15196#else
15197 .key = "\x00\x08" /* rta length */
15198 "\x00\x01" /* rta type */
15199#endif
15200 "\x00\x00\x00\x10" /* enc key length */
15201 "\x20\x21\x22\x23\x24\x25\x26\x27"
15202 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15203 "\x30\x31\x32\x33\x34\x35\x36\x37"
15204 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15205 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15206 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15207 .klen = 8 + 32 + 16,
15208 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15209 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15210 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15211 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15212 "\x10\x11\x12\x13\x14\x15\x16\x17"
15213 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15214 .ilen = 32,
15215 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15216 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15217 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15218 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15219 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15220 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15221 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15222 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15223 .rlen = 32 + 32,
15224 }, { /* RFC 3602 Case 3 */
15225#ifdef __LITTLE_ENDIAN
15226 .key = "\x08\x00" /* rta length */
15227 "\x01\x00" /* rta type */
15228#else
15229 .key = "\x00\x08" /* rta length */
15230 "\x00\x01" /* rta type */
15231#endif
15232 "\x00\x00\x00\x10" /* enc key length */
15233 "\x11\x22\x33\x44\x55\x66\x77\x88"
15234 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15235 "\x22\x33\x44\x55\x66\x77\x88\x99"
15236 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15237 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15238 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15239 .klen = 8 + 32 + 16,
15240 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15241 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15242 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15243 .ilen = 48,
15244 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15245 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15246 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15247 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15248 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15249 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15250 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15251 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15252 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15253 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15254 .rlen = 48 + 32,
15255 }, { /* RFC 3602 Case 4 */
15256#ifdef __LITTLE_ENDIAN
15257 .key = "\x08\x00" /* rta length */
15258 "\x01\x00" /* rta type */
15259#else
15260 .key = "\x00\x08" /* rta length */
15261 "\x00\x01" /* rta type */
15262#endif
15263 "\x00\x00\x00\x10" /* enc key length */
15264 "\x11\x22\x33\x44\x55\x66\x77\x88"
15265 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15266 "\x22\x33\x44\x55\x66\x77\x88\x99"
15267 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15268 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15269 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15270 .klen = 8 + 32 + 16,
15271 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15272 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15273 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15274 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15275 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15276 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15277 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15278 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15279 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15280 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15281 .ilen = 64,
15282 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15283 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15284 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15285 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15286 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15287 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15288 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15289 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15290 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15291 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15292 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15293 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15294 .rlen = 64 + 32,
15295 }, { /* RFC 3602 Case 5 */
15296#ifdef __LITTLE_ENDIAN
15297 .key = "\x08\x00" /* rta length */
15298 "\x01\x00" /* rta type */
15299#else
15300 .key = "\x00\x08" /* rta length */
15301 "\x00\x01" /* rta type */
15302#endif
15303 "\x00\x00\x00\x10" /* enc key length */
15304 "\x11\x22\x33\x44\x55\x66\x77\x88"
15305 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15306 "\x22\x33\x44\x55\x66\x77\x88\x99"
15307 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15308 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15309 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15310 .klen = 8 + 32 + 16,
15311 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15312 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15313 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15314 .alen = 8,
15315 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15316 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15317 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15318 "\x10\x11\x12\x13\x14\x15\x16\x17"
15319 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15320 "\x20\x21\x22\x23\x24\x25\x26\x27"
15321 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15322 "\x30\x31\x32\x33\x34\x35\x36\x37"
15323 "\x01\x02\x03\x04\x05\x06\x07\x08"
15324 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15325 .ilen = 80,
15326 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15327 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15328 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15329 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15330 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15331 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15332 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15333 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15334 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15335 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15336 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15337 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15338 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15339 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15340 .rlen = 80 + 32,
15341 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15342#ifdef __LITTLE_ENDIAN
15343 .key = "\x08\x00" /* rta length */
15344 "\x01\x00" /* rta type */
15345#else
15346 .key = "\x00\x08" /* rta length */
15347 "\x00\x01" /* rta type */
15348#endif
15349 "\x00\x00\x00\x18" /* enc key length */
15350 "\x11\x22\x33\x44\x55\x66\x77\x88"
15351 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15352 "\x22\x33\x44\x55\x66\x77\x88\x99"
15353 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15354 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15355 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15356 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15357 .klen = 8 + 32 + 24,
15358 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15359 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15360 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15361 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15362 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15363 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15364 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15365 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15366 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15367 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15368 .ilen = 64,
15369 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15370 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15371 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15372 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15373 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15374 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15375 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15376 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15377 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15378 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15379 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15380 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15381 .rlen = 64 + 32,
15382 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15383#ifdef __LITTLE_ENDIAN
15384 .key = "\x08\x00" /* rta length */
15385 "\x01\x00" /* rta type */
15386#else
15387 .key = "\x00\x08" /* rta length */
15388 "\x00\x01" /* rta type */
15389#endif
15390 "\x00\x00\x00\x20" /* enc key length */
15391 "\x11\x22\x33\x44\x55\x66\x77\x88"
15392 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15393 "\x22\x33\x44\x55\x66\x77\x88\x99"
15394 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15395 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15396 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15397 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15398 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15399 .klen = 8 + 32 + 32,
15400 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15401 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15402 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15403 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15404 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15405 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15406 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15407 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15408 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15409 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15410 .ilen = 64,
15411 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15412 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15413 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15414 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15415 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15416 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15417 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15418 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15419 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15420 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15421 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15422 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15423 .rlen = 64 + 32,
15424 },
15425};
15426
Nitesh Lal5208ed22014-05-21 17:09:08 +053015427static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015428 { /* RFC 3602 Case 1 */
15429#ifdef __LITTLE_ENDIAN
15430 .key = "\x08\x00" /* rta length */
15431 "\x01\x00" /* rta type */
15432#else
15433 .key = "\x00\x08" /* rta length */
15434 "\x00\x01" /* rta type */
15435#endif
15436 "\x00\x00\x00\x10" /* enc key length */
15437 "\x00\x00\x00\x00\x00\x00\x00\x00"
15438 "\x00\x00\x00\x00\x00\x00\x00\x00"
15439 "\x00\x00\x00\x00\x00\x00\x00\x00"
15440 "\x00\x00\x00\x00\x00\x00\x00\x00"
15441 "\x00\x00\x00\x00\x00\x00\x00\x00"
15442 "\x00\x00\x00\x00\x00\x00\x00\x00"
15443 "\x00\x00\x00\x00\x00\x00\x00\x00"
15444 "\x00\x00\x00\x00\x00\x00\x00\x00"
15445 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15446 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15447 .klen = 8 + 64 + 16,
15448 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15449 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15450 .input = "Single block msg",
15451 .ilen = 16,
15452 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15453 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15454 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15455 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15456 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15457 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15458 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15459 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15460 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15461 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15462 .rlen = 16 + 64,
15463 }, { /* RFC 3602 Case 2 */
15464#ifdef __LITTLE_ENDIAN
15465 .key = "\x08\x00" /* rta length */
15466 "\x01\x00" /* rta type */
15467#else
15468 .key = "\x00\x08" /* rta length */
15469 "\x00\x01" /* rta type */
15470#endif
15471 "\x00\x00\x00\x10" /* enc key length */
15472 "\x20\x21\x22\x23\x24\x25\x26\x27"
15473 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15474 "\x30\x31\x32\x33\x34\x35\x36\x37"
15475 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15476 "\x40\x41\x42\x43\x44\x45\x46\x47"
15477 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15478 "\x50\x51\x52\x53\x54\x55\x56\x57"
15479 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15480 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15481 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15482 .klen = 8 + 64 + 16,
15483 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15484 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15485 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15486 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15487 "\x10\x11\x12\x13\x14\x15\x16\x17"
15488 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15489 .ilen = 32,
15490 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15491 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15492 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15493 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15494 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15495 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15496 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15497 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15498 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15499 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15500 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15501 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15502 .rlen = 32 + 64,
15503 }, { /* RFC 3602 Case 3 */
15504#ifdef __LITTLE_ENDIAN
15505 .key = "\x08\x00" /* rta length */
15506 "\x01\x00" /* rta type */
15507#else
15508 .key = "\x00\x08" /* rta length */
15509 "\x00\x01" /* rta type */
15510#endif
15511 "\x00\x00\x00\x10" /* enc key length */
15512 "\x11\x22\x33\x44\x55\x66\x77\x88"
15513 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15514 "\x22\x33\x44\x55\x66\x77\x88\x99"
15515 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15516 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15517 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15518 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15519 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15520 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15521 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15522 .klen = 8 + 64 + 16,
15523 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15524 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15525 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15526 .ilen = 48,
15527 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15528 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15529 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15530 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15531 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15532 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15533 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15534 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15535 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15536 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15537 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15538 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15539 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15540 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15541 .rlen = 48 + 64,
15542 }, { /* RFC 3602 Case 4 */
15543#ifdef __LITTLE_ENDIAN
15544 .key = "\x08\x00" /* rta length */
15545 "\x01\x00" /* rta type */
15546#else
15547 .key = "\x00\x08" /* rta length */
15548 "\x00\x01" /* rta type */
15549#endif
15550 "\x00\x00\x00\x10" /* enc key length */
15551 "\x11\x22\x33\x44\x55\x66\x77\x88"
15552 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15553 "\x22\x33\x44\x55\x66\x77\x88\x99"
15554 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15555 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15556 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15557 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15558 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15559 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15560 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15561 .klen = 8 + 64 + 16,
15562 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15563 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15564 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15565 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15566 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15567 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15568 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15569 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15570 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15571 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15572 .ilen = 64,
15573 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15574 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15575 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15576 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15577 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15578 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15579 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15580 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15581 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15582 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15583 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15584 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15585 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15586 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15587 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15588 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15589 .rlen = 64 + 64,
15590 }, { /* RFC 3602 Case 5 */
15591#ifdef __LITTLE_ENDIAN
15592 .key = "\x08\x00" /* rta length */
15593 "\x01\x00" /* rta type */
15594#else
15595 .key = "\x00\x08" /* rta length */
15596 "\x00\x01" /* rta type */
15597#endif
15598 "\x00\x00\x00\x10" /* enc key length */
15599 "\x11\x22\x33\x44\x55\x66\x77\x88"
15600 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15601 "\x22\x33\x44\x55\x66\x77\x88\x99"
15602 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15603 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15604 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15605 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15606 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15607 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15608 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15609 .klen = 8 + 64 + 16,
15610 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15611 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15612 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15613 .alen = 8,
15614 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15615 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15616 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15617 "\x10\x11\x12\x13\x14\x15\x16\x17"
15618 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15619 "\x20\x21\x22\x23\x24\x25\x26\x27"
15620 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15621 "\x30\x31\x32\x33\x34\x35\x36\x37"
15622 "\x01\x02\x03\x04\x05\x06\x07\x08"
15623 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15624 .ilen = 80,
15625 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15626 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15627 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15628 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15629 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15630 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15631 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15632 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15633 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15634 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15635 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15636 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15637 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15638 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15639 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15640 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15641 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15642 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15643 .rlen = 80 + 64,
15644 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15645#ifdef __LITTLE_ENDIAN
15646 .key = "\x08\x00" /* rta length */
15647 "\x01\x00" /* rta type */
15648#else
15649 .key = "\x00\x08" /* rta length */
15650 "\x00\x01" /* rta type */
15651#endif
15652 "\x00\x00\x00\x18" /* enc key length */
15653 "\x11\x22\x33\x44\x55\x66\x77\x88"
15654 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15655 "\x22\x33\x44\x55\x66\x77\x88\x99"
15656 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15657 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15658 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15659 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15660 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15661 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15662 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15663 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15664 .klen = 8 + 64 + 24,
15665 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15666 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15667 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15668 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15669 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15670 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15671 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15672 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15673 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15674 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15675 .ilen = 64,
15676 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15677 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15678 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15679 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15680 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15681 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15682 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15683 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15684 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15685 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15686 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15687 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15688 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15689 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15690 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15691 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15692 .rlen = 64 + 64,
15693 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15694#ifdef __LITTLE_ENDIAN
15695 .key = "\x08\x00" /* rta length */
15696 "\x01\x00" /* rta type */
15697#else
15698 .key = "\x00\x08" /* rta length */
15699 "\x00\x01" /* rta type */
15700#endif
15701 "\x00\x00\x00\x20" /* enc key length */
15702 "\x11\x22\x33\x44\x55\x66\x77\x88"
15703 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15704 "\x22\x33\x44\x55\x66\x77\x88\x99"
15705 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15706 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15707 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15708 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15709 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15710 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15711 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15712 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15713 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15714 .klen = 8 + 64 + 32,
15715 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15716 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15717 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15718 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15719 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15720 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15721 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15722 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15723 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15724 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15725 .ilen = 64,
15726 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15727 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15728 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15729 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15730 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15731 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15732 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15733 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15734 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15735 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15736 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15737 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15738 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15739 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
15740 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
15741 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
15742 .rlen = 64 + 64,
15743 },
15744};
15745
Nitesh Lal5208ed22014-05-21 17:09:08 +053015746#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
15747
15748static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
15749 { /*Generated with cryptopp*/
15750#ifdef __LITTLE_ENDIAN
15751 .key = "\x08\x00" /* rta length */
15752 "\x01\x00" /* rta type */
15753#else
15754 .key = "\x00\x08" /* rta length */
15755 "\x00\x01" /* rta type */
15756#endif
15757 "\x00\x00\x00\x08" /* enc key length */
15758 "\x11\x22\x33\x44\x55\x66\x77\x88"
15759 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15760 "\x22\x33\x44\x55"
15761 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15762 .klen = 8 + 20 + 8,
15763 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15764 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15765 .alen = 8,
15766 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15767 "\x53\x20\x63\x65\x65\x72\x73\x74"
15768 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15769 "\x20\x79\x65\x53\x72\x63\x74\x65"
15770 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15771 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15772 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15773 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15774 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15775 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15776 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15777 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15778 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15779 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15780 "\x63\x65\x65\x72\x73\x74\x54\x20"
15781 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15782 .ilen = 128,
15783 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15784 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15785 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15786 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15787 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15788 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15789 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15790 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15791 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15792 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15793 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15794 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15795 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15796 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15797 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15798 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15799 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
15800 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
15801 "\x5c\x44\xa9\x37",
15802 .rlen = 128 + 20,
15803 },
15804};
15805
15806#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
15807
15808static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
15809 { /*Generated with cryptopp*/
15810#ifdef __LITTLE_ENDIAN
15811 .key = "\x08\x00" /* rta length */
15812 "\x01\x00" /* rta type */
15813#else
15814 .key = "\x00\x08" /* rta length */
15815 "\x00\x01" /* rta type */
15816#endif
15817 "\x00\x00\x00\x08" /* enc key length */
15818 "\x11\x22\x33\x44\x55\x66\x77\x88"
15819 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15820 "\x22\x33\x44\x55\x66\x77\x88\x99"
15821 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15822 .klen = 8 + 24 + 8,
15823 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15824 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15825 .alen = 8,
15826 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15827 "\x53\x20\x63\x65\x65\x72\x73\x74"
15828 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15829 "\x20\x79\x65\x53\x72\x63\x74\x65"
15830 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15831 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15832 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15833 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15834 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15835 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15836 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15837 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15838 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15839 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15840 "\x63\x65\x65\x72\x73\x74\x54\x20"
15841 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15842 .ilen = 128,
15843 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15844 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15845 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15846 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15847 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15848 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15849 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15850 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15851 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15852 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15853 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15854 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15855 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15856 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15857 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15858 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15859 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
15860 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
15861 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
15862 .rlen = 128 + 24,
15863 },
15864};
15865
15866#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
15867
15868static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
15869 { /*Generated with cryptopp*/
15870#ifdef __LITTLE_ENDIAN
15871 .key = "\x08\x00" /* rta length */
15872 "\x01\x00" /* rta type */
15873#else
15874 .key = "\x00\x08" /* rta length */
15875 "\x00\x01" /* rta type */
15876#endif
15877 "\x00\x00\x00\x08" /* enc key length */
15878 "\x11\x22\x33\x44\x55\x66\x77\x88"
15879 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15880 "\x22\x33\x44\x55\x66\x77\x88\x99"
15881 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15882 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15883 .klen = 8 + 32 + 8,
15884 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15885 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15886 .alen = 8,
15887 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15888 "\x53\x20\x63\x65\x65\x72\x73\x74"
15889 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15890 "\x20\x79\x65\x53\x72\x63\x74\x65"
15891 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15892 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15893 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15894 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15895 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15896 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15897 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15898 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15899 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15900 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15901 "\x63\x65\x65\x72\x73\x74\x54\x20"
15902 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15903 .ilen = 128,
15904 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15905 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15906 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15907 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15908 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15909 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15910 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15911 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15912 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15913 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15914 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15915 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15916 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15917 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15918 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15919 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15920 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
15921 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
15922 "\xde\x63\xde\x76\x52\xde\x9f\xba"
15923 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
15924 .rlen = 128 + 32,
15925 },
15926};
15927
15928#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
15929
15930static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
15931 { /*Generated with cryptopp*/
15932#ifdef __LITTLE_ENDIAN
15933 .key = "\x08\x00" /* rta length */
15934 "\x01\x00" /* rta type */
15935#else
15936 .key = "\x00\x08" /* rta length */
15937 "\x00\x01" /* rta type */
15938#endif
15939 "\x00\x00\x00\x08" /* enc key length */
15940 "\x11\x22\x33\x44\x55\x66\x77\x88"
15941 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15942 "\x22\x33\x44\x55\x66\x77\x88\x99"
15943 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15944 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15945 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15946 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15947 .klen = 8 + 48 + 8,
15948 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15949 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15950 .alen = 8,
15951 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15952 "\x53\x20\x63\x65\x65\x72\x73\x74"
15953 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15954 "\x20\x79\x65\x53\x72\x63\x74\x65"
15955 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15956 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15957 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15958 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15959 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15960 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15961 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15962 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15963 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15964 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15965 "\x63\x65\x65\x72\x73\x74\x54\x20"
15966 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15967 .ilen = 128,
15968 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15969 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15970 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15971 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15972 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15973 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15974 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15975 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15976 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15977 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15978 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15979 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15980 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15981 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15982 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15983 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15984 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
15985 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
15986 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
15987 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
15988 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
15989 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
15990 .rlen = 128 + 48,
15991 },
15992};
15993
15994#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
15995
15996static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
15997 { /*Generated with cryptopp*/
15998#ifdef __LITTLE_ENDIAN
15999 .key = "\x08\x00" /* rta length */
16000 "\x01\x00" /* rta type */
16001#else
16002 .key = "\x00\x08" /* rta length */
16003 "\x00\x01" /* rta type */
16004#endif
16005 "\x00\x00\x00\x08" /* enc key length */
16006 "\x11\x22\x33\x44\x55\x66\x77\x88"
16007 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16008 "\x22\x33\x44\x55\x66\x77\x88\x99"
16009 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16010 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16011 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16012 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16013 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16014 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16015 .klen = 8 + 64 + 8,
16016 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16017 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16018 .alen = 8,
16019 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16020 "\x53\x20\x63\x65\x65\x72\x73\x74"
16021 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16022 "\x20\x79\x65\x53\x72\x63\x74\x65"
16023 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16024 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16025 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16026 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16027 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16028 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16029 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16030 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16031 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16032 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16033 "\x63\x65\x65\x72\x73\x74\x54\x20"
16034 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16035 .ilen = 128,
16036 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16037 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16038 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16039 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16040 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16041 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16042 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16043 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16044 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16045 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16046 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16047 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16048 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16049 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16050 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16051 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16052 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16053 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16054 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16055 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16056 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16057 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16058 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16059 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16060 .rlen = 128 + 64,
16061 },
16062};
16063
16064#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16065
16066static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16067 { /*Generated with cryptopp*/
16068#ifdef __LITTLE_ENDIAN
16069 .key = "\x08\x00" /* rta length */
16070 "\x01\x00" /* rta type */
16071#else
16072 .key = "\x00\x08" /* rta length */
16073 "\x00\x01" /* rta type */
16074#endif
16075 "\x00\x00\x00\x18" /* enc key length */
16076 "\x11\x22\x33\x44\x55\x66\x77\x88"
16077 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16078 "\x22\x33\x44\x55"
16079 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16080 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16081 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16082 .klen = 8 + 20 + 24,
16083 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16084 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16085 .alen = 8,
16086 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16087 "\x53\x20\x63\x65\x65\x72\x73\x74"
16088 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16089 "\x20\x79\x65\x53\x72\x63\x74\x65"
16090 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16091 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16092 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16093 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16094 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16095 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16096 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16097 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16098 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16099 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16100 "\x63\x65\x65\x72\x73\x74\x54\x20"
16101 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16102 .ilen = 128,
16103 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16104 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16105 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16106 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16107 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16108 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16109 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16110 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16111 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16112 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16113 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16114 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16115 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16116 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16117 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16118 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16119 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16120 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16121 "\xd1\x60\x91\xb3",
16122 .rlen = 128 + 20,
16123 },
16124};
16125
16126#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16127
16128static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16129 { /*Generated with cryptopp*/
16130#ifdef __LITTLE_ENDIAN
16131 .key = "\x08\x00" /* rta length */
16132 "\x01\x00" /* rta type */
16133#else
16134 .key = "\x00\x08" /* rta length */
16135 "\x00\x01" /* rta type */
16136#endif
16137 "\x00\x00\x00\x18" /* enc key length */
16138 "\x11\x22\x33\x44\x55\x66\x77\x88"
16139 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16140 "\x22\x33\x44\x55\x66\x77\x88\x99"
16141 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16142 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16143 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16144 .klen = 8 + 24 + 24,
16145 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16146 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16147 .alen = 8,
16148 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16149 "\x53\x20\x63\x65\x65\x72\x73\x74"
16150 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16151 "\x20\x79\x65\x53\x72\x63\x74\x65"
16152 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16153 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16154 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16155 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16156 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16157 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16158 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16159 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16160 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16161 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16162 "\x63\x65\x65\x72\x73\x74\x54\x20"
16163 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16164 .ilen = 128,
16165 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16166 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16167 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16168 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16169 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16170 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16171 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16172 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16173 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16174 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16175 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16176 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16177 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16178 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16179 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16180 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16181 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16182 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16183 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16184 .rlen = 128 + 24,
16185 },
16186};
16187
16188#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16189
16190static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16191 { /*Generated with cryptopp*/
16192#ifdef __LITTLE_ENDIAN
16193 .key = "\x08\x00" /* rta length */
16194 "\x01\x00" /* rta type */
16195#else
16196 .key = "\x00\x08" /* rta length */
16197 "\x00\x01" /* rta type */
16198#endif
16199 "\x00\x00\x00\x18" /* enc key length */
16200 "\x11\x22\x33\x44\x55\x66\x77\x88"
16201 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16202 "\x22\x33\x44\x55\x66\x77\x88\x99"
16203 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16204 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16205 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16206 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16207 .klen = 8 + 32 + 24,
16208 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16209 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16210 .alen = 8,
16211 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16212 "\x53\x20\x63\x65\x65\x72\x73\x74"
16213 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16214 "\x20\x79\x65\x53\x72\x63\x74\x65"
16215 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16216 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16217 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16218 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16219 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16220 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16221 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16222 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16223 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16224 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16225 "\x63\x65\x65\x72\x73\x74\x54\x20"
16226 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16227 .ilen = 128,
16228 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16229 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16230 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16231 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16232 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16233 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16234 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16235 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16236 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16237 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16238 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16239 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16240 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16241 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16242 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16243 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16244 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16245 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16246 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16247 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16248 .rlen = 128 + 32,
16249 },
16250};
16251
16252#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16253
16254static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16255 { /*Generated with cryptopp*/
16256#ifdef __LITTLE_ENDIAN
16257 .key = "\x08\x00" /* rta length */
16258 "\x01\x00" /* rta type */
16259#else
16260 .key = "\x00\x08" /* rta length */
16261 "\x00\x01" /* rta type */
16262#endif
16263 "\x00\x00\x00\x18" /* enc key length */
16264 "\x11\x22\x33\x44\x55\x66\x77\x88"
16265 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16266 "\x22\x33\x44\x55\x66\x77\x88\x99"
16267 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16268 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16269 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16270 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16271 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16272 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16273 .klen = 8 + 48 + 24,
16274 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16275 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16276 .alen = 8,
16277 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16278 "\x53\x20\x63\x65\x65\x72\x73\x74"
16279 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16280 "\x20\x79\x65\x53\x72\x63\x74\x65"
16281 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16282 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16283 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16284 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16285 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16286 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16287 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16288 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16289 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16290 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16291 "\x63\x65\x65\x72\x73\x74\x54\x20"
16292 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16293 .ilen = 128,
16294 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16295 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16296 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16297 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16298 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16299 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16300 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16301 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16302 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16303 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16304 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16305 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16306 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16307 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16308 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16309 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16310 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16311 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16312 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16313 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16314 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16315 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16316 .rlen = 128 + 48,
16317 },
16318};
16319
16320#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16321
16322static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16323 { /*Generated with cryptopp*/
16324#ifdef __LITTLE_ENDIAN
16325 .key = "\x08\x00" /* rta length */
16326 "\x01\x00" /* rta type */
16327#else
16328 .key = "\x00\x08" /* rta length */
16329 "\x00\x01" /* rta type */
16330#endif
16331 "\x00\x00\x00\x18" /* enc key length */
16332 "\x11\x22\x33\x44\x55\x66\x77\x88"
16333 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16334 "\x22\x33\x44\x55\x66\x77\x88\x99"
16335 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16336 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16337 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16338 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16339 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16340 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16341 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16342 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16343 .klen = 8 + 64 + 24,
16344 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16345 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16346 .alen = 8,
16347 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16348 "\x53\x20\x63\x65\x65\x72\x73\x74"
16349 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16350 "\x20\x79\x65\x53\x72\x63\x74\x65"
16351 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16352 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16353 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16354 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16355 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16356 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16357 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16358 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16359 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16360 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16361 "\x63\x65\x65\x72\x73\x74\x54\x20"
16362 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16363 .ilen = 128,
16364 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16365 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16366 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16367 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16368 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16369 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16370 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16371 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16372 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16373 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16374 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16375 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16376 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16377 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16378 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16379 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16380 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16381 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16382 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16383 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16384 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16385 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16386 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16387 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16388 .rlen = 128 + 64,
16389 },
16390};
16391
Herbert Xuda7f0332008-07-31 17:08:25 +080016392static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16393 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16394 { /* LRW-32-AES 1 */
16395 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16396 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16397 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16398 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16399 .klen = 32,
16400 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16401 "\x00\x00\x00\x00\x00\x00\x00\x01",
16402 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16403 "\x38\x39\x41\x42\x43\x44\x45\x46",
16404 .ilen = 16,
16405 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16406 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16407 .rlen = 16,
16408 }, { /* LRW-32-AES 2 */
16409 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16410 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16411 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16412 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16413 .klen = 32,
16414 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16415 "\x00\x00\x00\x00\x00\x00\x00\x02",
16416 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16417 "\x38\x39\x41\x42\x43\x44\x45\x46",
16418 .ilen = 16,
16419 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16420 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16421 .rlen = 16,
16422 }, { /* LRW-32-AES 3 */
16423 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16424 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16425 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16426 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16427 .klen = 32,
16428 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16429 "\x00\x00\x00\x02\x00\x00\x00\x00",
16430 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16431 "\x38\x39\x41\x42\x43\x44\x45\x46",
16432 .ilen = 16,
16433 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16434 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16435 .rlen = 16,
16436 }, { /* LRW-32-AES 4 */
16437 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16438 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16439 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16440 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16441 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16442 .klen = 40,
16443 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16444 "\x00\x00\x00\x00\x00\x00\x00\x01",
16445 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16446 "\x38\x39\x41\x42\x43\x44\x45\x46",
16447 .ilen = 16,
16448 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16449 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16450 .rlen = 16,
16451 }, { /* LRW-32-AES 5 */
16452 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16453 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16454 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16455 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16456 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16457 .klen = 40,
16458 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16459 "\x00\x00\x00\x02\x00\x00\x00\x00",
16460 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16461 "\x38\x39\x41\x42\x43\x44\x45\x46",
16462 .ilen = 16,
16463 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16464 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16465 .rlen = 16,
16466 }, { /* LRW-32-AES 6 */
16467 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16468 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16469 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16470 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16471 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16472 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16473 .klen = 48,
16474 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16475 "\x00\x00\x00\x00\x00\x00\x00\x01",
16476 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16477 "\x38\x39\x41\x42\x43\x44\x45\x46",
16478 .ilen = 16,
16479 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16480 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16481 .rlen = 16,
16482 }, { /* LRW-32-AES 7 */
16483 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16484 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16485 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16486 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16487 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16488 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16489 .klen = 48,
16490 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16491 "\x00\x00\x00\x02\x00\x00\x00\x00",
16492 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16493 "\x38\x39\x41\x42\x43\x44\x45\x46",
16494 .ilen = 16,
16495 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16496 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16497 .rlen = 16,
16498 }, {
16499/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16500 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16501 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16502 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16503 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16504 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16505 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16506 .klen = 48,
16507 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16508 "\x00\x00\x00\x00\x00\x00\x00\x01",
16509 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16510 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16511 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16512 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16513 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16514 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16515 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16516 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16517 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16518 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16519 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16520 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16521 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16522 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16523 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16524 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16525 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16526 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16527 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16528 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16529 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16530 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16531 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16532 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16533 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16534 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16535 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16536 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16537 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16538 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16539 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16540 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16541 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16542 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16543 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16544 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16545 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16546 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16547 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16548 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16549 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16550 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16551 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16552 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16553 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16554 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16555 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16556 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16557 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16558 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16559 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16560 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16561 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16562 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16563 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16564 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16565 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16566 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16567 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16568 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16569 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16570 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16571 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16572 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16573 .ilen = 512,
16574 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16575 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16576 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16577 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16578 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16579 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16580 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16581 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16582 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16583 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16584 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16585 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16586 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16587 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16588 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16589 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16590 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16591 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16592 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16593 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16594 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16595 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16596 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16597 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16598 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16599 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16600 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16601 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16602 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16603 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16604 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16605 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16606 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16607 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16608 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16609 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16610 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16611 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16612 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16613 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16614 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16615 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16616 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16617 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16618 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16619 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16620 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16621 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16622 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16623 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16624 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16625 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16626 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16627 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16628 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16629 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16630 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16631 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16632 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16633 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16634 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16635 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16636 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16637 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16638 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016639 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016640 .np = 3,
16641 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016642 }
16643};
16644
16645static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16646 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16647 /* same as enc vectors with input and result reversed */
16648 { /* LRW-32-AES 1 */
16649 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16650 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16651 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16652 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16653 .klen = 32,
16654 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16655 "\x00\x00\x00\x00\x00\x00\x00\x01",
16656 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16657 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16658 .ilen = 16,
16659 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16660 "\x38\x39\x41\x42\x43\x44\x45\x46",
16661 .rlen = 16,
16662 }, { /* LRW-32-AES 2 */
16663 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16664 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16665 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16666 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16667 .klen = 32,
16668 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16669 "\x00\x00\x00\x00\x00\x00\x00\x02",
16670 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16671 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16672 .ilen = 16,
16673 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16674 "\x38\x39\x41\x42\x43\x44\x45\x46",
16675 .rlen = 16,
16676 }, { /* LRW-32-AES 3 */
16677 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16678 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16679 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16680 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16681 .klen = 32,
16682 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16683 "\x00\x00\x00\x02\x00\x00\x00\x00",
16684 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16685 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16686 .ilen = 16,
16687 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16688 "\x38\x39\x41\x42\x43\x44\x45\x46",
16689 .rlen = 16,
16690 }, { /* LRW-32-AES 4 */
16691 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16692 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16693 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16694 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16695 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16696 .klen = 40,
16697 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16698 "\x00\x00\x00\x00\x00\x00\x00\x01",
16699 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16700 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16701 .ilen = 16,
16702 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16703 "\x38\x39\x41\x42\x43\x44\x45\x46",
16704 .rlen = 16,
16705 }, { /* LRW-32-AES 5 */
16706 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16707 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16708 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16709 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16710 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16711 .klen = 40,
16712 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16713 "\x00\x00\x00\x02\x00\x00\x00\x00",
16714 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16715 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16716 .ilen = 16,
16717 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16718 "\x38\x39\x41\x42\x43\x44\x45\x46",
16719 .rlen = 16,
16720 }, { /* LRW-32-AES 6 */
16721 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16722 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16723 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16724 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16725 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16726 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16727 .klen = 48,
16728 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16729 "\x00\x00\x00\x00\x00\x00\x00\x01",
16730 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16731 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16732 .ilen = 16,
16733 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16734 "\x38\x39\x41\x42\x43\x44\x45\x46",
16735 .rlen = 16,
16736 }, { /* LRW-32-AES 7 */
16737 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16738 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16739 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16740 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16741 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16742 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16743 .klen = 48,
16744 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16745 "\x00\x00\x00\x02\x00\x00\x00\x00",
16746 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16747 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16748 .ilen = 16,
16749 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16750 "\x38\x39\x41\x42\x43\x44\x45\x46",
16751 .rlen = 16,
16752 }, {
16753/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16754 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16755 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16756 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16757 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16758 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16759 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16760 .klen = 48,
16761 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16762 "\x00\x00\x00\x00\x00\x00\x00\x01",
16763 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16764 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16765 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16766 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16767 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16768 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16769 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16770 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16771 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16772 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16773 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16774 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16775 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16776 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16777 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16778 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16779 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16780 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16781 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16782 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16783 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16784 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16785 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16786 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16787 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16788 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16789 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16790 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16791 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16792 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16793 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16794 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16795 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16796 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16797 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16798 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16799 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16800 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16801 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16802 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16803 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16804 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16805 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16806 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16807 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16808 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16809 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16810 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16811 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16812 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16813 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16814 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16815 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16816 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16817 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16818 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16819 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16820 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16821 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16822 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16823 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16824 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16825 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16826 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16827 .ilen = 512,
16828 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16829 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16830 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16831 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16832 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16833 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16834 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16835 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16836 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16837 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16838 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16839 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16840 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16841 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16842 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16843 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16844 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16845 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16846 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16847 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16848 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16849 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16850 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16851 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16852 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16853 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16854 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16855 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16856 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16857 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16858 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16859 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16860 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16861 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16862 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16863 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16864 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16865 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16866 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16867 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16868 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16869 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16870 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16871 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16872 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16873 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16874 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16875 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16876 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16877 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16878 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16879 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16880 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16881 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16882 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16883 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16884 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16885 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16886 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16887 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16888 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16889 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16890 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16891 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16892 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016893 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016894 .np = 3,
16895 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016896 }
16897};
16898
16899static struct cipher_testvec aes_xts_enc_tv_template[] = {
16900 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
16901 { /* XTS-AES 1 */
16902 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
16903 "\x00\x00\x00\x00\x00\x00\x00\x00"
16904 "\x00\x00\x00\x00\x00\x00\x00\x00"
16905 "\x00\x00\x00\x00\x00\x00\x00\x00",
16906 .klen = 32,
16907 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16908 "\x00\x00\x00\x00\x00\x00\x00\x00",
16909 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16910 "\x00\x00\x00\x00\x00\x00\x00\x00"
16911 "\x00\x00\x00\x00\x00\x00\x00\x00"
16912 "\x00\x00\x00\x00\x00\x00\x00\x00",
16913 .ilen = 32,
16914 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
16915 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
16916 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
16917 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
16918 .rlen = 32,
16919 }, { /* XTS-AES 2 */
16920 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
16921 "\x11\x11\x11\x11\x11\x11\x11\x11"
16922 "\x22\x22\x22\x22\x22\x22\x22\x22"
16923 "\x22\x22\x22\x22\x22\x22\x22\x22",
16924 .klen = 32,
16925 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16926 "\x00\x00\x00\x00\x00\x00\x00\x00",
16927 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16928 "\x44\x44\x44\x44\x44\x44\x44\x44"
16929 "\x44\x44\x44\x44\x44\x44\x44\x44"
16930 "\x44\x44\x44\x44\x44\x44\x44\x44",
16931 .ilen = 32,
16932 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
16933 "\x39\x33\x40\x38\xac\xef\x83\x8b"
16934 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
16935 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
16936 .rlen = 32,
16937 }, { /* XTS-AES 3 */
16938 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
16939 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
16940 "\x22\x22\x22\x22\x22\x22\x22\x22"
16941 "\x22\x22\x22\x22\x22\x22\x22\x22",
16942 .klen = 32,
16943 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16944 "\x00\x00\x00\x00\x00\x00\x00\x00",
16945 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16946 "\x44\x44\x44\x44\x44\x44\x44\x44"
16947 "\x44\x44\x44\x44\x44\x44\x44\x44"
16948 "\x44\x44\x44\x44\x44\x44\x44\x44",
16949 .ilen = 32,
16950 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
16951 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
16952 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
16953 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
16954 .rlen = 32,
16955 }, { /* XTS-AES 4 */
16956 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16957 "\x23\x53\x60\x28\x74\x71\x35\x26"
16958 "\x31\x41\x59\x26\x53\x58\x97\x93"
16959 "\x23\x84\x62\x64\x33\x83\x27\x95",
16960 .klen = 32,
16961 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16962 "\x00\x00\x00\x00\x00\x00\x00\x00",
16963 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16964 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16965 "\x10\x11\x12\x13\x14\x15\x16\x17"
16966 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16967 "\x20\x21\x22\x23\x24\x25\x26\x27"
16968 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16969 "\x30\x31\x32\x33\x34\x35\x36\x37"
16970 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16971 "\x40\x41\x42\x43\x44\x45\x46\x47"
16972 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16973 "\x50\x51\x52\x53\x54\x55\x56\x57"
16974 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16975 "\x60\x61\x62\x63\x64\x65\x66\x67"
16976 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16977 "\x70\x71\x72\x73\x74\x75\x76\x77"
16978 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16979 "\x80\x81\x82\x83\x84\x85\x86\x87"
16980 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16981 "\x90\x91\x92\x93\x94\x95\x96\x97"
16982 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16983 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16984 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16985 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16986 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16987 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16988 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16989 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16990 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16991 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16992 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16993 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16994 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16995 "\x00\x01\x02\x03\x04\x05\x06\x07"
16996 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16997 "\x10\x11\x12\x13\x14\x15\x16\x17"
16998 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16999 "\x20\x21\x22\x23\x24\x25\x26\x27"
17000 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17001 "\x30\x31\x32\x33\x34\x35\x36\x37"
17002 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17003 "\x40\x41\x42\x43\x44\x45\x46\x47"
17004 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17005 "\x50\x51\x52\x53\x54\x55\x56\x57"
17006 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17007 "\x60\x61\x62\x63\x64\x65\x66\x67"
17008 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17009 "\x70\x71\x72\x73\x74\x75\x76\x77"
17010 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17011 "\x80\x81\x82\x83\x84\x85\x86\x87"
17012 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17013 "\x90\x91\x92\x93\x94\x95\x96\x97"
17014 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17015 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17016 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17017 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17018 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17019 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17020 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17021 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17022 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17023 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17024 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17025 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17026 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17027 .ilen = 512,
17028 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17029 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17030 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17031 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17032 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17033 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17034 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17035 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17036 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17037 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17038 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17039 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17040 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17041 "\x22\x97\x61\x46\xae\x20\xce\x84"
17042 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17043 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17044 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17045 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17046 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17047 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17048 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17049 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17050 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17051 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17052 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17053 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17054 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17055 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17056 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17057 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17058 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17059 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17060 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17061 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17062 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17063 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17064 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17065 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17066 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17067 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17068 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17069 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17070 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17071 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17072 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17073 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17074 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17075 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17076 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17077 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17078 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17079 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17080 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17081 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17082 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17083 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17084 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17085 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17086 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17087 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17088 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17089 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17090 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17091 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17092 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017093 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17094 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17095 "\x23\x53\x60\x28\x74\x71\x35\x26"
17096 "\x62\x49\x77\x57\x24\x70\x93\x69"
17097 "\x99\x59\x57\x49\x66\x96\x76\x27"
17098 "\x31\x41\x59\x26\x53\x58\x97\x93"
17099 "\x23\x84\x62\x64\x33\x83\x27\x95"
17100 "\x02\x88\x41\x97\x16\x93\x99\x37"
17101 "\x51\x05\x82\x09\x74\x94\x45\x92",
17102 .klen = 64,
17103 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17104 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017105 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17106 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17107 "\x10\x11\x12\x13\x14\x15\x16\x17"
17108 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17109 "\x20\x21\x22\x23\x24\x25\x26\x27"
17110 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17111 "\x30\x31\x32\x33\x34\x35\x36\x37"
17112 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17113 "\x40\x41\x42\x43\x44\x45\x46\x47"
17114 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17115 "\x50\x51\x52\x53\x54\x55\x56\x57"
17116 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17117 "\x60\x61\x62\x63\x64\x65\x66\x67"
17118 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17119 "\x70\x71\x72\x73\x74\x75\x76\x77"
17120 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17121 "\x80\x81\x82\x83\x84\x85\x86\x87"
17122 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17123 "\x90\x91\x92\x93\x94\x95\x96\x97"
17124 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17125 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17126 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17127 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17128 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17129 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17130 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17131 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17132 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17133 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17134 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17135 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17136 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17137 "\x00\x01\x02\x03\x04\x05\x06\x07"
17138 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17139 "\x10\x11\x12\x13\x14\x15\x16\x17"
17140 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17141 "\x20\x21\x22\x23\x24\x25\x26\x27"
17142 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17143 "\x30\x31\x32\x33\x34\x35\x36\x37"
17144 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17145 "\x40\x41\x42\x43\x44\x45\x46\x47"
17146 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17147 "\x50\x51\x52\x53\x54\x55\x56\x57"
17148 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17149 "\x60\x61\x62\x63\x64\x65\x66\x67"
17150 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17151 "\x70\x71\x72\x73\x74\x75\x76\x77"
17152 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17153 "\x80\x81\x82\x83\x84\x85\x86\x87"
17154 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17155 "\x90\x91\x92\x93\x94\x95\x96\x97"
17156 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17157 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17158 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17159 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17160 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17161 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17162 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17163 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17164 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17165 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17166 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17167 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17168 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17169 .ilen = 512,
17170 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17171 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17172 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17173 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17174 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17175 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17176 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17177 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17178 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17179 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17180 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17181 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17182 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17183 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17184 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17185 "\x00\x02\x08\x87\x89\x14\x29\xca"
17186 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17187 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17188 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17189 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17190 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17191 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17192 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17193 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17194 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17195 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17196 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17197 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17198 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17199 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17200 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17201 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17202 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17203 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17204 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17205 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17206 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17207 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17208 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17209 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17210 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17211 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17212 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17213 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17214 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17215 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17216 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17217 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17218 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17219 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17220 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17221 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17222 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17223 "\x94\x30\x54\xff\x84\x01\x14\x93"
17224 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17225 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17226 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17227 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17228 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17229 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17230 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17231 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17232 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17233 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17234 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017235 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017236 .np = 3,
17237 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017238 }
17239};
17240
17241static struct cipher_testvec aes_xts_dec_tv_template[] = {
17242 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17243 { /* XTS-AES 1 */
17244 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17245 "\x00\x00\x00\x00\x00\x00\x00\x00"
17246 "\x00\x00\x00\x00\x00\x00\x00\x00"
17247 "\x00\x00\x00\x00\x00\x00\x00\x00",
17248 .klen = 32,
17249 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17250 "\x00\x00\x00\x00\x00\x00\x00\x00",
17251 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17252 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17253 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17254 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17255 .ilen = 32,
17256 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17257 "\x00\x00\x00\x00\x00\x00\x00\x00"
17258 "\x00\x00\x00\x00\x00\x00\x00\x00"
17259 "\x00\x00\x00\x00\x00\x00\x00\x00",
17260 .rlen = 32,
17261 }, { /* XTS-AES 2 */
17262 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17263 "\x11\x11\x11\x11\x11\x11\x11\x11"
17264 "\x22\x22\x22\x22\x22\x22\x22\x22"
17265 "\x22\x22\x22\x22\x22\x22\x22\x22",
17266 .klen = 32,
17267 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17268 "\x00\x00\x00\x00\x00\x00\x00\x00",
17269 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17270 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17271 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17272 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17273 .ilen = 32,
17274 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17275 "\x44\x44\x44\x44\x44\x44\x44\x44"
17276 "\x44\x44\x44\x44\x44\x44\x44\x44"
17277 "\x44\x44\x44\x44\x44\x44\x44\x44",
17278 .rlen = 32,
17279 }, { /* XTS-AES 3 */
17280 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17281 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17282 "\x22\x22\x22\x22\x22\x22\x22\x22"
17283 "\x22\x22\x22\x22\x22\x22\x22\x22",
17284 .klen = 32,
17285 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17286 "\x00\x00\x00\x00\x00\x00\x00\x00",
17287 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17288 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17289 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17290 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17291 .ilen = 32,
17292 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17293 "\x44\x44\x44\x44\x44\x44\x44\x44"
17294 "\x44\x44\x44\x44\x44\x44\x44\x44"
17295 "\x44\x44\x44\x44\x44\x44\x44\x44",
17296 .rlen = 32,
17297 }, { /* XTS-AES 4 */
17298 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17299 "\x23\x53\x60\x28\x74\x71\x35\x26"
17300 "\x31\x41\x59\x26\x53\x58\x97\x93"
17301 "\x23\x84\x62\x64\x33\x83\x27\x95",
17302 .klen = 32,
17303 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17304 "\x00\x00\x00\x00\x00\x00\x00\x00",
17305 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17306 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17307 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17308 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17309 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17310 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17311 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17312 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17313 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17314 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17315 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17316 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17317 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17318 "\x22\x97\x61\x46\xae\x20\xce\x84"
17319 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17320 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17321 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17322 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17323 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17324 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17325 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17326 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17327 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17328 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17329 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17330 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17331 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17332 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17333 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17334 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17335 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17336 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17337 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17338 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17339 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17340 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17341 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17342 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17343 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17344 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17345 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17346 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17347 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17348 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17349 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17350 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17351 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17352 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17353 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17354 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17355 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17356 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17357 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17358 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17359 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17360 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17361 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17362 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17363 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17364 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17365 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17366 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17367 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17368 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17369 .ilen = 512,
17370 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17371 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17372 "\x10\x11\x12\x13\x14\x15\x16\x17"
17373 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17374 "\x20\x21\x22\x23\x24\x25\x26\x27"
17375 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17376 "\x30\x31\x32\x33\x34\x35\x36\x37"
17377 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17378 "\x40\x41\x42\x43\x44\x45\x46\x47"
17379 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17380 "\x50\x51\x52\x53\x54\x55\x56\x57"
17381 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17382 "\x60\x61\x62\x63\x64\x65\x66\x67"
17383 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17384 "\x70\x71\x72\x73\x74\x75\x76\x77"
17385 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17386 "\x80\x81\x82\x83\x84\x85\x86\x87"
17387 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17388 "\x90\x91\x92\x93\x94\x95\x96\x97"
17389 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17390 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17391 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17392 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17393 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17394 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17395 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17396 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17397 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17398 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17399 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17400 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17401 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17402 "\x00\x01\x02\x03\x04\x05\x06\x07"
17403 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17404 "\x10\x11\x12\x13\x14\x15\x16\x17"
17405 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17406 "\x20\x21\x22\x23\x24\x25\x26\x27"
17407 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17408 "\x30\x31\x32\x33\x34\x35\x36\x37"
17409 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17410 "\x40\x41\x42\x43\x44\x45\x46\x47"
17411 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17412 "\x50\x51\x52\x53\x54\x55\x56\x57"
17413 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17414 "\x60\x61\x62\x63\x64\x65\x66\x67"
17415 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17416 "\x70\x71\x72\x73\x74\x75\x76\x77"
17417 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17418 "\x80\x81\x82\x83\x84\x85\x86\x87"
17419 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17420 "\x90\x91\x92\x93\x94\x95\x96\x97"
17421 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17422 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17423 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17424 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17425 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17426 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17427 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17428 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17429 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17430 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17431 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17432 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17433 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17434 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017435 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17436 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17437 "\x23\x53\x60\x28\x74\x71\x35\x26"
17438 "\x62\x49\x77\x57\x24\x70\x93\x69"
17439 "\x99\x59\x57\x49\x66\x96\x76\x27"
17440 "\x31\x41\x59\x26\x53\x58\x97\x93"
17441 "\x23\x84\x62\x64\x33\x83\x27\x95"
17442 "\x02\x88\x41\x97\x16\x93\x99\x37"
17443 "\x51\x05\x82\x09\x74\x94\x45\x92",
17444 .klen = 64,
17445 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17446 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017447 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17448 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17449 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17450 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17451 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17452 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17453 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17454 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17455 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17456 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17457 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17458 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17459 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17460 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17461 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17462 "\x00\x02\x08\x87\x89\x14\x29\xca"
17463 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17464 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17465 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17466 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17467 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17468 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17469 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17470 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17471 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17472 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17473 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17474 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17475 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17476 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17477 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17478 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17479 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17480 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17481 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17482 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17483 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17484 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17485 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17486 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17487 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17488 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17489 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17490 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17491 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17492 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17493 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17494 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17495 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17496 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17497 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17498 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17499 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17500 "\x94\x30\x54\xff\x84\x01\x14\x93"
17501 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17502 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17503 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17504 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17505 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17506 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17507 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17508 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17509 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17510 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17511 .ilen = 512,
17512 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17513 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17514 "\x10\x11\x12\x13\x14\x15\x16\x17"
17515 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17516 "\x20\x21\x22\x23\x24\x25\x26\x27"
17517 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17518 "\x30\x31\x32\x33\x34\x35\x36\x37"
17519 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17520 "\x40\x41\x42\x43\x44\x45\x46\x47"
17521 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17522 "\x50\x51\x52\x53\x54\x55\x56\x57"
17523 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17524 "\x60\x61\x62\x63\x64\x65\x66\x67"
17525 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17526 "\x70\x71\x72\x73\x74\x75\x76\x77"
17527 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17528 "\x80\x81\x82\x83\x84\x85\x86\x87"
17529 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17530 "\x90\x91\x92\x93\x94\x95\x96\x97"
17531 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17532 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17533 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17534 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17535 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17536 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17537 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17538 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17539 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17540 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17541 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17542 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17543 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17544 "\x00\x01\x02\x03\x04\x05\x06\x07"
17545 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17546 "\x10\x11\x12\x13\x14\x15\x16\x17"
17547 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17548 "\x20\x21\x22\x23\x24\x25\x26\x27"
17549 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17550 "\x30\x31\x32\x33\x34\x35\x36\x37"
17551 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17552 "\x40\x41\x42\x43\x44\x45\x46\x47"
17553 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17554 "\x50\x51\x52\x53\x54\x55\x56\x57"
17555 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17556 "\x60\x61\x62\x63\x64\x65\x66\x67"
17557 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17558 "\x70\x71\x72\x73\x74\x75\x76\x77"
17559 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17560 "\x80\x81\x82\x83\x84\x85\x86\x87"
17561 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17562 "\x90\x91\x92\x93\x94\x95\x96\x97"
17563 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17564 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17565 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17566 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17567 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17568 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17569 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17570 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17571 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17572 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17573 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17574 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17575 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17576 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017577 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017578 .np = 3,
17579 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017580 }
17581};
17582
17583
17584static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017585 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17586 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17587 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17588 .klen = 16,
17589 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17590 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17591 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17592 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17593 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17594 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17595 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17596 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17597 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17598 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17599 .ilen = 64,
17600 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17601 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17602 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17603 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17604 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17605 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17606 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17607 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17608 .rlen = 64,
17609 }, {
17610 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17611 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17612 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17613 .klen = 24,
17614 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17615 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17616 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17617 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17618 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17619 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17620 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17621 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17622 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17623 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17624 .ilen = 64,
17625 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17626 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17627 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17628 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17629 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17630 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17631 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17632 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17633 .rlen = 64,
17634 }, {
17635 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17636 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17637 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17638 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17639 .klen = 32,
17640 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17641 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17642 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17643 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17644 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17645 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17646 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17647 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17648 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17649 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17650 .ilen = 64,
17651 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17652 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17653 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17654 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17655 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17656 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17657 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17658 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17659 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017660 }, { /* Generated with Crypto++ */
17661 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17662 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17663 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17664 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17665 .klen = 32,
17666 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17667 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17668 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17669 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17670 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17671 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17672 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17673 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17674 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17675 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17676 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17677 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17678 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17679 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17680 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17681 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17682 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17683 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17684 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17685 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17686 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17687 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17688 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17689 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17690 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17691 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17692 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17693 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17694 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17695 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17696 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17697 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17698 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17699 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17700 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17701 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17702 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17703 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17704 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17705 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17706 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17707 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17708 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17709 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17710 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17711 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17712 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17713 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17714 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17715 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17716 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17717 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17718 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17719 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17720 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17721 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17722 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17723 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17724 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17725 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17726 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17727 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17728 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17729 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
17730 .ilen = 496,
17731 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
17732 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
17733 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
17734 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
17735 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
17736 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
17737 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
17738 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
17739 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
17740 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
17741 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
17742 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
17743 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
17744 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
17745 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
17746 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
17747 "\x34\x4B\x31\x69\x84\x66\x96\x44"
17748 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
17749 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
17750 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
17751 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
17752 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
17753 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
17754 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
17755 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
17756 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
17757 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
17758 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
17759 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
17760 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
17761 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
17762 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
17763 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
17764 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
17765 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
17766 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
17767 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
17768 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
17769 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
17770 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
17771 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
17772 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
17773 "\x85\x99\x22\xE8\x91\x38\x70\x83"
17774 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
17775 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
17776 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
17777 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
17778 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
17779 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
17780 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
17781 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
17782 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
17783 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
17784 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
17785 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
17786 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
17787 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
17788 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
17789 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
17790 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
17791 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
17792 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
17793 .rlen = 496,
17794 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017795 .np = 3,
17796 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017797 }, { /* Generated with Crypto++ */
17798 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17799 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17800 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17801 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17802 .klen = 32,
17803 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
17804 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
17805 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17806 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17807 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17808 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17809 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17810 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17811 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17812 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17813 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17814 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17815 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17816 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17817 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17818 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17819 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17820 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17821 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17822 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17823 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17824 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17825 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17826 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17827 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17828 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17829 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17830 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17831 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17832 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17833 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17834 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17835 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17836 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17837 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17838 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17839 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17840 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17841 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17842 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17843 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17844 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17845 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17846 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17847 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17848 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17849 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17850 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17851 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17852 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17853 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17854 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17855 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17856 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17857 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17858 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17859 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17860 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17861 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17862 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17863 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17864 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17865 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17866 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
17867 "\x7B\xE4\x4D",
17868 .ilen = 499,
17869 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
17870 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
17871 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
17872 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
17873 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
17874 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
17875 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
17876 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
17877 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
17878 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
17879 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
17880 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
17881 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
17882 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
17883 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
17884 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
17885 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
17886 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
17887 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
17888 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
17889 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
17890 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
17891 "\x45\x18\x18\x74\x19\xAD\x71\x01"
17892 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
17893 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
17894 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
17895 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
17896 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
17897 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
17898 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
17899 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
17900 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
17901 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
17902 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
17903 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
17904 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
17905 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
17906 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
17907 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
17908 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
17909 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
17910 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
17911 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
17912 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
17913 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
17914 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
17915 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
17916 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
17917 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
17918 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
17919 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
17920 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
17921 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
17922 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
17923 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
17924 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
17925 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
17926 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
17927 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
17928 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
17929 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
17930 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
17931 "\xFB\xF2\x3F",
17932 .rlen = 499,
17933 .also_non_np = 1,
17934 .np = 2,
17935 .tap = { 499 - 16, 16 },
17936 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017937};
17938
17939static struct cipher_testvec aes_ctr_dec_tv_template[] = {
17940 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17941 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17942 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17943 .klen = 16,
17944 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17945 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17946 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17947 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17948 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17949 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17950 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17951 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17952 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17953 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17954 .ilen = 64,
17955 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17956 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17957 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17958 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17959 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17960 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17961 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17962 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17963 .rlen = 64,
17964 }, {
17965 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17966 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17967 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17968 .klen = 24,
17969 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17970 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17971 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17972 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17973 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17974 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17975 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17976 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17977 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17978 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17979 .ilen = 64,
17980 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17981 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17982 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17983 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17984 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17985 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17986 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17987 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17988 .rlen = 64,
17989 }, {
17990 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17991 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17992 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17993 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17994 .klen = 32,
17995 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17996 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17997 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17998 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17999 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18000 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18001 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18002 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18003 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18004 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18005 .ilen = 64,
18006 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18007 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18008 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18009 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18010 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18011 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18012 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18013 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18014 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018015 }, { /* Generated with Crypto++ */
18016 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18017 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18018 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18019 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18020 .klen = 32,
18021 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18022 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18023 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18024 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18025 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18026 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18027 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18028 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18029 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18030 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18031 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18032 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18033 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18034 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18035 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18036 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18037 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18038 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18039 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18040 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18041 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18042 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18043 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18044 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18045 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18046 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18047 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18048 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18049 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18050 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18051 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18052 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18053 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18054 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18055 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18056 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18057 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18058 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18059 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18060 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18061 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18062 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18063 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18064 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18065 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18066 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18067 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18068 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18069 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18070 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18071 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18072 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18073 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18074 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18075 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18076 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18077 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18078 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18079 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18080 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18081 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18082 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18083 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18084 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18085 .ilen = 496,
18086 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18087 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18088 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18089 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18090 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18091 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18092 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18093 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18094 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18095 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18096 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18097 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18098 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18099 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18100 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18101 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18102 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18103 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18104 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18105 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18106 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18107 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18108 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18109 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18110 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18111 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18112 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18113 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18114 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18115 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18116 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18117 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18118 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18119 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18120 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18121 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18122 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18123 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18124 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18125 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18126 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18127 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18128 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18129 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18130 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18131 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18132 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18133 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18134 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18135 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18136 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18137 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18138 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18139 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18140 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18141 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18142 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18143 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18144 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18145 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18146 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18147 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18148 .rlen = 496,
18149 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018150 .np = 3,
18151 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018152 }, { /* Generated with Crypto++ */
18153 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18154 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18155 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18156 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18157 .klen = 32,
18158 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18159 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18160 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18161 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18162 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18163 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18164 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18165 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18166 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18167 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18168 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18169 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18170 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18171 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18172 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18173 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18174 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18175 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18176 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18177 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18178 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18179 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18180 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18181 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18182 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18183 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18184 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18185 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18186 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18187 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18188 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18189 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18190 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18191 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18192 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18193 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18194 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18195 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18196 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18197 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18198 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18199 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18200 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18201 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18202 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18203 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18204 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18205 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18206 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18207 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18208 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18209 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18210 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18211 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18212 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18213 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18214 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18215 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18216 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18217 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18218 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18219 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18220 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18221 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18222 "\xFB\xF2\x3F",
18223 .ilen = 499,
18224 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18225 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18226 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18227 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18228 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18229 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18230 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18231 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18232 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18233 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18234 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18235 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18236 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18237 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18238 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18239 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18240 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18241 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18242 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18243 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18244 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18245 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18246 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18247 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18248 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18249 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18250 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18251 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18252 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18253 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18254 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18255 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18256 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18257 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18258 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18259 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18260 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18261 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18262 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18263 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18264 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18265 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18266 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18267 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18268 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18269 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18270 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18271 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18272 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18273 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18274 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18275 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18276 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18277 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18278 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18279 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18280 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18281 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18282 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18283 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18284 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18285 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18286 "\x7B\xE4\x4D",
18287 .rlen = 499,
18288 .also_non_np = 1,
18289 .np = 2,
18290 .tap = { 499 - 16, 16 },
18291 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018292};
18293
18294static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018295 { /* From RFC 3686 */
18296 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18297 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18298 "\x00\x00\x00\x30",
18299 .klen = 20,
18300 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18301 .input = "Single block msg",
18302 .ilen = 16,
18303 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18304 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18305 .rlen = 16,
18306 }, {
18307 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18308 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18309 "\x00\x6c\xb6\xdb",
18310 .klen = 20,
18311 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18312 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18313 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18314 "\x10\x11\x12\x13\x14\x15\x16\x17"
18315 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18316 .ilen = 32,
18317 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18318 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18319 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18320 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18321 .rlen = 32,
18322 }, {
18323 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18324 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18325 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18326 "\x00\x00\x00\x48",
18327 .klen = 28,
18328 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18329 .input = "Single block msg",
18330 .ilen = 16,
18331 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18332 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18333 .rlen = 16,
18334 }, {
18335 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18336 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18337 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18338 "\x00\x96\xb0\x3b",
18339 .klen = 28,
18340 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18341 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18342 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18343 "\x10\x11\x12\x13\x14\x15\x16\x17"
18344 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18345 .ilen = 32,
18346 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18347 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18348 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18349 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18350 .rlen = 32,
18351 }, {
18352 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18353 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18354 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18355 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18356 "\x00\x00\x00\x60",
18357 .klen = 36,
18358 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18359 .input = "Single block msg",
18360 .ilen = 16,
18361 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18362 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18363 .rlen = 16,
18364 }, {
18365 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18366 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18367 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18368 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18369 "\x00\xfa\xac\x24",
18370 .klen = 36,
18371 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18372 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18373 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18374 "\x10\x11\x12\x13\x14\x15\x16\x17"
18375 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18376 .ilen = 32,
18377 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18378 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18379 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18380 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18381 .rlen = 32,
18382 }, {
18383 // generated using Crypto++
18384 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18385 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18386 "\x10\x11\x12\x13\x14\x15\x16\x17"
18387 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18388 "\x00\x00\x00\x00",
18389 .klen = 32 + 4,
18390 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18391 .input =
18392 "\x00\x01\x02\x03\x04\x05\x06\x07"
18393 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18394 "\x10\x11\x12\x13\x14\x15\x16\x17"
18395 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18396 "\x20\x21\x22\x23\x24\x25\x26\x27"
18397 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18398 "\x30\x31\x32\x33\x34\x35\x36\x37"
18399 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18400 "\x40\x41\x42\x43\x44\x45\x46\x47"
18401 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18402 "\x50\x51\x52\x53\x54\x55\x56\x57"
18403 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18404 "\x60\x61\x62\x63\x64\x65\x66\x67"
18405 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18406 "\x70\x71\x72\x73\x74\x75\x76\x77"
18407 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18408 "\x80\x81\x82\x83\x84\x85\x86\x87"
18409 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18410 "\x90\x91\x92\x93\x94\x95\x96\x97"
18411 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18412 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18413 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18414 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18415 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18416 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18417 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18418 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18419 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18420 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18421 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18422 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18423 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18424 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18425 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18426 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18427 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18428 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18429 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18430 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18431 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18432 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18433 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18434 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18435 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18436 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18437 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18438 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18439 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18440 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18441 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18442 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18443 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18444 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18445 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18446 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18447 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18448 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18449 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18450 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18451 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18452 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18453 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18454 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18455 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18456 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18457 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18458 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18459 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18460 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18461 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18462 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18463 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18464 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18465 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18466 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18467 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18468 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18469 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18470 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18471 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18472 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18473 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18474 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18475 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18476 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18477 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18478 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18479 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18480 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18481 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18482 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18483 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18484 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18485 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18486 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18487 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18488 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18489 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18490 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18491 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18492 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18493 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18494 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18495 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18496 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18497 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18498 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18499 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18500 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18501 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18502 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18503 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18504 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18505 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18506 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18507 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18508 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18509 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18510 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18511 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18512 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18513 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18514 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18515 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18516 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18517 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18518 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18519 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18520 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18521 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18522 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18523 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18524 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18525 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18526 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18527 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18528 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18529 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18530 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18531 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18532 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18533 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18534 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18535 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18536 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18537 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18538 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18539 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18540 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18541 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18542 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18543 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18544 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18545 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18546 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18547 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18548 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18549 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18550 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18551 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18552 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18553 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18554 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18555 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18556 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18557 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18558 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18559 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18560 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18561 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18562 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18563 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18564 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18565 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18566 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18567 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18568 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18569 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18570 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18571 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18572 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18573 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18574 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18575 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18576 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18577 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18578 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18579 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18580 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18581 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18582 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18583 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18584 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18585 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18586 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18587 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18588 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18589 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18590 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18591 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18592 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18593 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18594 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18595 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18596 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18597 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18598 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18599 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18600 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18601 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18602 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18603 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18604 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18605 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18606 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18607 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18608 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18609 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18610 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18611 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18612 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18613 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18614 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18615 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18616 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18617 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18618 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18619 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18620 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18621 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18622 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18623 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18624 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18625 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18626 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18627 "\x28\x37\x46\x55\x64\x73\x82\x91"
18628 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18629 "\x18\x27\x36\x45\x54\x63\x72\x81"
18630 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18631 "\x08\x17\x26\x35\x44\x53\x62\x71"
18632 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18633 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18634 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18635 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18636 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18637 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18638 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18639 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18640 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18641 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18642 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18643 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18644 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18645 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18646 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18647 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18648 "\x00\x11\x22\x33\x44\x55\x66\x77"
18649 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18650 "\x10\x21\x32\x43\x54\x65\x76\x87"
18651 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18652 "\x20\x31\x42\x53\x64\x75\x86\x97"
18653 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18654 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18655 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18656 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18657 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18658 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18659 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18660 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18661 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18662 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18663 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18664 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18665 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18666 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18667 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18668 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18669 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18670 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18671 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18672 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18673 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18674 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18675 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18676 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18677 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18678 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18679 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18680 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18681 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18682 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18683 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18684 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18685 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18686 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18687 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18688 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18689 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18690 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18691 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18692 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18693 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18694 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18695 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18696 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18697 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18698 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18699 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18700 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18701 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18702 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18703 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18704 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18705 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18706 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18707 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18708 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18709 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18710 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18711 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18712 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18713 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18714 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18715 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18716 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18717 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18718 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18719 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18720 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18721 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18722 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18723 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18724 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18725 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18726 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18727 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18728 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18729 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18730 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18731 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18732 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18733 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18734 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18735 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18736 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18737 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18738 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18739 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18740 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18741 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18742 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18743 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18744 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18745 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18746 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18747 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18748 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18749 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18750 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18751 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18752 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18753 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18754 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18755 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18756 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18757 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18758 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18759 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18760 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18761 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18762 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18763 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18764 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18765 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18766 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18767 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18768 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18769 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18770 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18771 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18772 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18773 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18774 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18775 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18776 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18777 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18778 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18779 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18780 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18781 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18782 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18783 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18784 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18785 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18786 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18787 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18788 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18789 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18790 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18791 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18792 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18793 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18794 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18795 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18796 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18797 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18798 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18799 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
18800 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
18801 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
18802 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
18803 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
18804 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
18805 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
18806 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
18807 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
18808 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
18809 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
18810 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
18811 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
18812 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
18813 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
18814 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
18815 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
18816 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
18817 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
18818 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
18819 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
18820 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
18821 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
18822 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
18823 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
18824 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
18825 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
18826 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
18827 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
18828 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
18829 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
18830 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
18831 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
18832 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
18833 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
18834 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
18835 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
18836 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
18837 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
18838 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
18839 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
18840 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
18841 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
18842 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
18843 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
18844 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
18845 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
18846 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
18847 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
18848 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
18849 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
18850 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
18851 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
18852 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
18853 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
18854 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
18855 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
18856 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
18857 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
18858 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
18859 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
18860 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
18861 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
18862 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
18863 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
18864 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
18865 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
18866 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
18867 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
18868 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
18869 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
18870 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
18871 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
18872 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
18873 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
18874 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
18875 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
18876 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
18877 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
18878 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
18879 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
18880 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
18881 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
18882 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
18883 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
18884 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
18885 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
18886 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
18887 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
18888 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
18889 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
18890 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
18891 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
18892 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
18893 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
18894 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
18895 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
18896 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
18897 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
18898 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
18899 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
18900 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
18901 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
18902 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
18903 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
18904 "\x00\x21\x42\x63",
18905 .ilen = 4100,
18906 .result =
18907 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
18908 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
18909 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
18910 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
18911 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
18912 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
18913 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
18914 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
18915 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
18916 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
18917 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
18918 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
18919 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
18920 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
18921 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
18922 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
18923 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
18924 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
18925 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
18926 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
18927 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
18928 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
18929 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
18930 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
18931 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
18932 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
18933 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
18934 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
18935 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
18936 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
18937 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
18938 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
18939 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
18940 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
18941 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
18942 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
18943 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
18944 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
18945 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
18946 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
18947 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
18948 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
18949 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
18950 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
18951 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
18952 "\x04\x02\xef\xd3\x44\xde\x76\x31"
18953 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
18954 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
18955 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
18956 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
18957 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
18958 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
18959 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
18960 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
18961 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
18962 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
18963 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
18964 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
18965 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
18966 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
18967 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
18968 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
18969 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
18970 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
18971 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
18972 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
18973 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
18974 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
18975 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
18976 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
18977 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
18978 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
18979 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
18980 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
18981 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
18982 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
18983 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
18984 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
18985 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
18986 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
18987 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
18988 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
18989 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
18990 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
18991 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
18992 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
18993 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
18994 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
18995 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
18996 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
18997 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
18998 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
18999 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19000 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19001 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19002 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19003 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19004 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19005 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19006 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19007 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19008 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19009 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19010 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19011 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19012 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19013 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19014 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19015 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19016 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19017 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19018 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19019 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19020 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19021 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19022 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19023 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19024 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19025 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19026 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19027 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19028 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19029 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19030 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19031 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19032 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19033 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19034 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19035 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19036 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19037 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19038 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19039 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19040 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19041 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19042 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19043 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19044 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19045 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19046 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19047 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19048 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19049 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19050 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19051 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19052 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19053 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19054 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19055 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19056 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19057 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19058 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19059 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19060 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19061 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19062 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19063 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19064 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19065 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19066 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19067 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19068 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19069 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19070 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19071 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19072 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19073 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19074 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19075 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19076 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19077 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19078 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19079 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19080 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19081 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19082 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19083 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19084 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19085 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19086 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19087 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19088 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19089 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19090 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19091 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19092 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19093 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19094 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19095 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19096 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19097 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19098 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19099 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19100 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19101 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19102 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19103 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19104 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19105 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19106 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19107 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19108 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19109 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19110 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19111 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19112 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19113 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19114 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19115 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19116 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19117 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19118 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19119 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19120 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19121 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19122 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19123 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19124 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19125 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19126 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19127 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19128 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19129 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19130 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19131 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19132 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19133 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19134 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19135 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19136 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19137 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19138 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19139 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19140 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19141 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19142 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19143 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19144 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19145 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19146 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19147 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19148 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19149 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19150 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19151 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19152 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19153 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19154 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19155 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19156 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19157 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19158 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19159 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19160 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19161 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19162 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19163 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19164 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19165 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19166 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19167 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19168 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19169 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19170 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19171 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19172 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19173 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19174 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19175 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19176 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19177 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19178 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19179 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19180 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19181 "\x11\x94\x13\x69\x51\x09\x28\xde"
19182 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19183 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19184 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19185 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19186 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19187 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19188 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19189 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19190 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19191 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19192 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19193 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19194 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19195 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19196 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19197 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19198 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19199 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19200 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19201 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19202 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19203 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19204 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19205 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19206 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19207 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19208 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19209 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19210 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19211 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19212 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19213 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19214 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19215 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19216 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19217 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19218 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19219 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19220 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19221 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19222 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19223 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19224 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19225 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19226 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19227 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19228 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19229 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19230 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19231 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19232 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19233 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19234 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19235 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19236 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19237 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19238 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19239 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19240 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19241 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19242 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19243 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19244 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19245 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19246 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19247 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19248 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19249 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19250 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19251 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19252 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19253 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19254 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19255 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19256 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19257 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19258 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19259 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19260 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19261 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19262 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19263 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19264 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19265 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19266 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19267 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19268 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19269 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19270 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19271 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19272 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19273 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19274 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19275 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19276 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19277 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19278 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19279 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19280 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19281 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19282 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19283 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19284 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19285 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19286 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19287 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19288 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19289 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19290 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19291 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19292 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19293 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19294 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19295 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19296 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19297 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19298 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19299 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19300 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19301 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19302 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19303 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19304 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19305 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19306 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19307 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19308 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19309 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19310 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19311 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19312 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19313 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19314 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19315 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19316 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19317 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19318 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19319 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19320 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19321 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19322 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19323 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19324 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19325 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19326 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19327 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19328 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19329 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19330 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19331 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19332 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19333 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19334 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19335 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19336 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19337 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19338 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19339 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19340 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19341 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19342 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19343 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19344 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19345 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19346 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19347 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19348 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19349 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19350 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19351 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19352 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19353 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19354 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19355 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19356 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19357 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19358 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19359 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19360 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19361 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19362 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19363 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19364 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19365 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19366 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19367 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19368 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19369 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19370 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19371 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19372 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19373 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19374 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19375 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19376 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19377 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19378 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19379 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19380 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19381 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19382 "\xed\x38\x80\x36\x72\x43\x27\x49"
19383 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19384 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19385 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19386 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19387 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19388 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19389 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19390 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19391 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19392 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19393 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19394 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19395 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19396 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19397 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19398 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19399 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19400 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19401 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19402 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19403 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19404 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19405 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19406 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19407 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19408 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19409 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19410 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19411 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19412 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19413 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19414 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19415 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19416 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19417 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19418 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19419 "\x21\xed\xda\x86",
19420 .rlen = 4100,
19421 .np = 2,
19422 .tap = { 4064, 36 },
19423 },
19424};
19425
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019426static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019427 { /* From RFC 3686 */
19428 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19429 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19430 "\x00\x00\x00\x30",
19431 .klen = 20,
19432 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19433 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19434 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19435 .ilen = 16,
19436 .result = "Single block msg",
19437 .rlen = 16,
19438 }, {
19439 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19440 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19441 "\x00\x6c\xb6\xdb",
19442 .klen = 20,
19443 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19444 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19445 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19446 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19447 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19448 .ilen = 32,
19449 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19450 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19451 "\x10\x11\x12\x13\x14\x15\x16\x17"
19452 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19453 .rlen = 32,
19454 }, {
19455 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19456 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19457 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19458 "\x00\x00\x00\x48",
19459 .klen = 28,
19460 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19461 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19462 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19463 .ilen = 16,
19464 .result = "Single block msg",
19465 .rlen = 16,
19466 }, {
19467 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19468 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19469 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19470 "\x00\x96\xb0\x3b",
19471 .klen = 28,
19472 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19473 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19474 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19475 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19476 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19477 .ilen = 32,
19478 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19479 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19480 "\x10\x11\x12\x13\x14\x15\x16\x17"
19481 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19482 .rlen = 32,
19483 }, {
19484 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19485 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19486 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19487 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19488 "\x00\x00\x00\x60",
19489 .klen = 36,
19490 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19491 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19492 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19493 .ilen = 16,
19494 .result = "Single block msg",
19495 .rlen = 16,
19496 }, {
19497 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19498 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19499 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19500 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19501 "\x00\xfa\xac\x24",
19502 .klen = 36,
19503 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19504 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19505 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19506 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19507 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19508 .ilen = 32,
19509 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19510 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19511 "\x10\x11\x12\x13\x14\x15\x16\x17"
19512 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19513 .rlen = 32,
19514 },
19515};
19516
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019517static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19518 /* From NIST Special Publication 800-38A, Appendix F.5 */
19519 {
19520 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19521 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19522 .klen = 16,
19523 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19524 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19525 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19526 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19527 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19528 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19529 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19530 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19531 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19532 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19533 .ilen = 64,
19534 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19535 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19536 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19537 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19538 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19539 "\x44\xf7\xa8\x22\x60\xed\xcc"
19540 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19541 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19542 .rlen = 64,
19543 }
19544};
19545
19546static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19547 /* From NIST Special Publication 800-38A, Appendix F.5 */
19548 {
19549 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19550 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19551 .klen = 16,
19552 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19553 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19554 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19555 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19556 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19557 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19558 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19559 "\x44\xf7\xa8\x22\x60\xed\xcc"
19560 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19561 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19562 .ilen = 64,
19563 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19564 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19565 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19566 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19567 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19568 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19569 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19570 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19571 .rlen = 64,
19572 }
19573};
19574
Herbert Xuda7f0332008-07-31 17:08:25 +080019575static struct aead_testvec aes_gcm_enc_tv_template[] = {
19576 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19577 .key = zeroed_string,
19578 .klen = 16,
19579 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19580 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19581 .rlen = 16,
19582 }, {
19583 .key = zeroed_string,
19584 .klen = 16,
19585 .input = zeroed_string,
19586 .ilen = 16,
19587 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19588 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19589 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19590 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19591 .rlen = 32,
19592 }, {
19593 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19594 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19595 .klen = 16,
19596 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19597 "\xde\xca\xf8\x88",
19598 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19599 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19600 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19601 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19602 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19603 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19604 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19605 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19606 .ilen = 64,
19607 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19608 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19609 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19610 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19611 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19612 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19613 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19614 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19615 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19616 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19617 .rlen = 80,
19618 }, {
19619 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19620 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19621 .klen = 16,
19622 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19623 "\xde\xca\xf8\x88",
19624 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19625 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19626 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19627 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19628 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19629 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19630 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19631 "\xba\x63\x7b\x39",
19632 .ilen = 60,
19633 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19634 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19635 "\xab\xad\xda\xd2",
19636 .alen = 20,
19637 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19638 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19639 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19640 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19641 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19642 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19643 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19644 "\x3d\x58\xe0\x91"
19645 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19646 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19647 .rlen = 76,
19648 }, {
19649 .key = zeroed_string,
19650 .klen = 24,
19651 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19652 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19653 .rlen = 16,
19654 }, {
19655 .key = zeroed_string,
19656 .klen = 24,
19657 .input = zeroed_string,
19658 .ilen = 16,
19659 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19660 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19661 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19662 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19663 .rlen = 32,
19664 }, {
19665 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19666 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19667 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19668 .klen = 24,
19669 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19670 "\xde\xca\xf8\x88",
19671 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19672 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19673 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19674 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19675 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19676 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19677 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19678 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19679 .ilen = 64,
19680 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19681 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19682 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19683 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19684 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19685 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19686 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19687 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19688 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19689 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19690 .rlen = 80,
19691 }, {
19692 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19693 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19694 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19695 .klen = 24,
19696 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19697 "\xde\xca\xf8\x88",
19698 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19699 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19700 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19701 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19702 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19703 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19704 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19705 "\xba\x63\x7b\x39",
19706 .ilen = 60,
19707 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19708 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19709 "\xab\xad\xda\xd2",
19710 .alen = 20,
19711 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19712 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19713 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19714 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19715 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19716 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19717 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19718 "\xcc\xda\x27\x10"
19719 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19720 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19721 .rlen = 76,
19722 .np = 2,
19723 .tap = { 32, 28 },
19724 .anp = 2,
19725 .atap = { 8, 12 }
19726 }, {
19727 .key = zeroed_string,
19728 .klen = 32,
19729 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
19730 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
19731 .rlen = 16,
19732 }
19733};
19734
19735static struct aead_testvec aes_gcm_dec_tv_template[] = {
19736 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19737 .key = zeroed_string,
19738 .klen = 32,
19739 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
19740 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
19741 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
19742 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
19743 .ilen = 32,
19744 .result = zeroed_string,
19745 .rlen = 16,
19746 }, {
19747 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19748 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19749 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19750 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19751 .klen = 32,
19752 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19753 "\xde\xca\xf8\x88",
19754 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19755 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19756 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19757 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19758 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19759 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19760 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19761 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
19762 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
19763 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
19764 .ilen = 80,
19765 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19766 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19767 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19768 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19769 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19770 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19771 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19772 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19773 .rlen = 64,
19774 }, {
19775 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19776 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19777 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19778 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19779 .klen = 32,
19780 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19781 "\xde\xca\xf8\x88",
19782 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19783 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19784 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19785 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19786 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19787 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19788 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19789 "\xbc\xc9\xf6\x62"
19790 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
19791 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
19792 .ilen = 76,
19793 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19794 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19795 "\xab\xad\xda\xd2",
19796 .alen = 20,
19797 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19798 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19799 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19800 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19801 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19802 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19803 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19804 "\xba\x63\x7b\x39",
19805 .rlen = 60,
19806 .np = 2,
19807 .tap = { 48, 28 },
19808 .anp = 3,
19809 .atap = { 8, 8, 4 }
19810 }, {
19811 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19812 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19813 .klen = 16,
19814 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19815 "\xde\xca\xf8\x88",
19816 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19817 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19818 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19819 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19820 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19821 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19822 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19823 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19824 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19825 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19826 .ilen = 80,
19827 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19828 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19829 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19830 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19831 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19832 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19833 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19834 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19835 .rlen = 64,
19836 }, {
19837 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19838 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19839 .klen = 16,
19840 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19841 "\xde\xca\xf8\x88",
19842 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19843 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19844 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19845 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19846 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19847 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19848 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19849 "\x3d\x58\xe0\x91"
19850 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19851 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19852 .ilen = 76,
19853 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19854 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19855 "\xab\xad\xda\xd2",
19856 .alen = 20,
19857 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19858 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19859 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19860 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19861 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19862 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19863 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19864 "\xba\x63\x7b\x39",
19865 .rlen = 60,
19866 }, {
19867 .key = zeroed_string,
19868 .klen = 24,
19869 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19870 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19871 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19872 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19873 .ilen = 32,
19874 .result = zeroed_string,
19875 .rlen = 16,
19876 }, {
19877 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19878 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19879 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19880 .klen = 24,
19881 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19882 "\xde\xca\xf8\x88",
19883 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19884 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19885 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19886 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19887 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19888 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19889 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19890 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19891 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19892 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19893 .ilen = 80,
19894 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19895 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19896 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19897 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19898 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19899 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19900 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19901 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19902 .rlen = 64,
19903 }, {
19904 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19905 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19906 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19907 .klen = 24,
19908 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19909 "\xde\xca\xf8\x88",
19910 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19911 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19912 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19913 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19914 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19915 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19916 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19917 "\xcc\xda\x27\x10"
19918 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19919 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19920 .ilen = 76,
19921 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19922 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19923 "\xab\xad\xda\xd2",
19924 .alen = 20,
19925 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19926 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19927 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19928 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19929 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19930 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19931 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19932 "\xba\x63\x7b\x39",
19933 .rlen = 60,
19934 }
19935};
19936
Adrian Hoban69435b92010-11-04 15:02:04 -040019937static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
19938 { /* Generated using Crypto++ */
19939 .key = zeroed_string,
19940 .klen = 20,
19941 .iv = zeroed_string,
19942 .input = zeroed_string,
19943 .ilen = 16,
19944 .assoc = zeroed_string,
19945 .alen = 8,
19946 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
19947 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
19948 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
19949 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
19950 .rlen = 32,
19951 },{
19952 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19953 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19954 "\x00\x00\x00\x00",
19955 .klen = 20,
19956 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
19957 "\x00\x00\x00\x00",
19958 .input = zeroed_string,
19959 .ilen = 16,
19960 .assoc = zeroed_string,
19961 .alen = 8,
19962 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
19963 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
19964 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
19965 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
19966 .rlen = 32,
19967
19968 }, {
19969 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19970 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19971 "\x00\x00\x00\x00",
19972 .klen = 20,
19973 .iv = zeroed_string,
19974 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
19975 "\x01\x01\x01\x01\x01\x01\x01\x01",
19976 .ilen = 16,
19977 .assoc = zeroed_string,
19978 .alen = 8,
19979 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
19980 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
19981 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
19982 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
19983 .rlen = 32,
19984 }, {
19985 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19986 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19987 "\x00\x00\x00\x00",
19988 .klen = 20,
19989 .iv = zeroed_string,
19990 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
19991 "\x01\x01\x01\x01\x01\x01\x01\x01",
19992 .ilen = 16,
19993 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
19994 .alen = 8,
19995 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
19996 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
19997 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
19998 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
19999 .rlen = 32,
20000 }, {
20001 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20002 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20003 "\x00\x00\x00\x00",
20004 .klen = 20,
20005 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20006 "\x00\x00\x00\x00",
20007 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20008 "\x01\x01\x01\x01\x01\x01\x01\x01",
20009 .ilen = 16,
20010 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20011 .alen = 8,
20012 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20013 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20014 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20015 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20016 .rlen = 32,
20017 }, {
20018 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20019 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20020 "\x00\x00\x00\x00",
20021 .klen = 20,
20022 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20023 "\x00\x00\x00\x00",
20024 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20025 "\x01\x01\x01\x01\x01\x01\x01\x01"
20026 "\x01\x01\x01\x01\x01\x01\x01\x01"
20027 "\x01\x01\x01\x01\x01\x01\x01\x01"
20028 "\x01\x01\x01\x01\x01\x01\x01\x01"
20029 "\x01\x01\x01\x01\x01\x01\x01\x01"
20030 "\x01\x01\x01\x01\x01\x01\x01\x01"
20031 "\x01\x01\x01\x01\x01\x01\x01\x01",
20032 .ilen = 64,
20033 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20034 .alen = 8,
20035 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20036 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20037 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20038 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20039 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20040 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20041 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20042 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20043 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20044 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20045 .rlen = 80,
20046 }, {
20047 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20048 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20049 "\x00\x00\x00\x00",
20050 .klen = 20,
20051 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20052 "\x00\x00\x00\x00",
20053 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20054 "\xff\xff\xff\xff\xff\xff\xff\xff"
20055 "\xff\xff\xff\xff\xff\xff\xff\xff"
20056 "\xff\xff\xff\xff\xff\xff\xff\xff"
20057 "\xff\xff\xff\xff\xff\xff\xff\xff"
20058 "\xff\xff\xff\xff\xff\xff\xff\xff"
20059 "\xff\xff\xff\xff\xff\xff\xff\xff"
20060 "\xff\xff\xff\xff\xff\xff\xff\xff"
20061 "\xff\xff\xff\xff\xff\xff\xff\xff"
20062 "\xff\xff\xff\xff\xff\xff\xff\xff"
20063 "\xff\xff\xff\xff\xff\xff\xff\xff"
20064 "\xff\xff\xff\xff\xff\xff\xff\xff"
20065 "\xff\xff\xff\xff\xff\xff\xff\xff"
20066 "\xff\xff\xff\xff\xff\xff\xff\xff"
20067 "\xff\xff\xff\xff\xff\xff\xff\xff"
20068 "\xff\xff\xff\xff\xff\xff\xff\xff"
20069 "\xff\xff\xff\xff\xff\xff\xff\xff"
20070 "\xff\xff\xff\xff\xff\xff\xff\xff"
20071 "\xff\xff\xff\xff\xff\xff\xff\xff"
20072 "\xff\xff\xff\xff\xff\xff\xff\xff"
20073 "\xff\xff\xff\xff\xff\xff\xff\xff"
20074 "\xff\xff\xff\xff\xff\xff\xff\xff"
20075 "\xff\xff\xff\xff\xff\xff\xff\xff"
20076 "\xff\xff\xff\xff\xff\xff\xff\xff",
20077 .ilen = 192,
20078 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20079 "\xaa\xaa\xaa\xaa",
20080 .alen = 12,
20081 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20082 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20083 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20084 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20085 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20086 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20087 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20088 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20089 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20090 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20091 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20092 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20093 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20094 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20095 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20096 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20097 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20098 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20099 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20100 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20101 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20102 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20103 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20104 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20105 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20106 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20107 .rlen = 208,
20108 }
20109};
20110
20111static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
20112 { /* Generated using Crypto++ */
20113 .key = zeroed_string,
20114 .klen = 20,
20115 .iv = zeroed_string,
20116 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20117 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20118 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20119 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20120 .ilen = 32,
20121 .assoc = zeroed_string,
20122 .alen = 8,
20123 .result = zeroed_string,
20124 .rlen = 16,
20125
20126 },{
20127 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20128 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20129 "\x00\x00\x00\x00",
20130 .klen = 20,
20131 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20132 "\x00\x00\x00\x00",
20133 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20134 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20135 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20136 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20137 .ilen = 32,
20138 .assoc = zeroed_string,
20139 .alen = 8,
20140 .result = zeroed_string,
20141 .rlen = 16,
20142 }, {
20143 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20144 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20145 "\x00\x00\x00\x00",
20146 .klen = 20,
20147 .iv = zeroed_string,
20148 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20149 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20150 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20151 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20152 .ilen = 32,
20153 .assoc = zeroed_string,
20154 .alen = 8,
20155 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20156 "\x01\x01\x01\x01\x01\x01\x01\x01",
20157 .rlen = 16,
20158 }, {
20159 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20160 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20161 "\x00\x00\x00\x00",
20162 .klen = 20,
20163 .iv = zeroed_string,
20164 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20165 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20166 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20167 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20168 .ilen = 32,
20169 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20170 .alen = 8,
20171 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20172 "\x01\x01\x01\x01\x01\x01\x01\x01",
20173 .rlen = 16,
20174
20175 }, {
20176 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20177 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20178 "\x00\x00\x00\x00",
20179 .klen = 20,
20180 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20181 "\x00\x00\x00\x00",
20182 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20183 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20184 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20185 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20186 .ilen = 32,
20187 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20188 .alen = 8,
20189 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20190 "\x01\x01\x01\x01\x01\x01\x01\x01",
20191 .rlen = 16,
20192 }, {
20193 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20194 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20195 "\x00\x00\x00\x00",
20196 .klen = 20,
20197 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20198 "\x00\x00\x00\x00",
20199 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20200 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20201 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20202 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20203 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20204 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20205 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20206 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20207 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20208 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20209 .ilen = 80,
20210 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20211 .alen = 8,
20212 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20213 "\x01\x01\x01\x01\x01\x01\x01\x01"
20214 "\x01\x01\x01\x01\x01\x01\x01\x01"
20215 "\x01\x01\x01\x01\x01\x01\x01\x01"
20216 "\x01\x01\x01\x01\x01\x01\x01\x01"
20217 "\x01\x01\x01\x01\x01\x01\x01\x01"
20218 "\x01\x01\x01\x01\x01\x01\x01\x01"
20219 "\x01\x01\x01\x01\x01\x01\x01\x01",
20220 .rlen = 64,
20221 }, {
20222 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20223 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20224 "\x00\x00\x00\x00",
20225 .klen = 20,
20226 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20227 "\x00\x00\x00\x00",
20228 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20229 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20230 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20231 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20232 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20233 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20234 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20235 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20236 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20237 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20238 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20239 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20240 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20241 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20242 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20243 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20244 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20245 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20246 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20247 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20248 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20249 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20250 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20251 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20252 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20253 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20254 .ilen = 208,
20255 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20256 "\xaa\xaa\xaa\xaa",
20257 .alen = 12,
20258 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20259 "\xff\xff\xff\xff\xff\xff\xff\xff"
20260 "\xff\xff\xff\xff\xff\xff\xff\xff"
20261 "\xff\xff\xff\xff\xff\xff\xff\xff"
20262 "\xff\xff\xff\xff\xff\xff\xff\xff"
20263 "\xff\xff\xff\xff\xff\xff\xff\xff"
20264 "\xff\xff\xff\xff\xff\xff\xff\xff"
20265 "\xff\xff\xff\xff\xff\xff\xff\xff"
20266 "\xff\xff\xff\xff\xff\xff\xff\xff"
20267 "\xff\xff\xff\xff\xff\xff\xff\xff"
20268 "\xff\xff\xff\xff\xff\xff\xff\xff"
20269 "\xff\xff\xff\xff\xff\xff\xff\xff"
20270 "\xff\xff\xff\xff\xff\xff\xff\xff"
20271 "\xff\xff\xff\xff\xff\xff\xff\xff"
20272 "\xff\xff\xff\xff\xff\xff\xff\xff"
20273 "\xff\xff\xff\xff\xff\xff\xff\xff"
20274 "\xff\xff\xff\xff\xff\xff\xff\xff"
20275 "\xff\xff\xff\xff\xff\xff\xff\xff"
20276 "\xff\xff\xff\xff\xff\xff\xff\xff"
20277 "\xff\xff\xff\xff\xff\xff\xff\xff"
20278 "\xff\xff\xff\xff\xff\xff\xff\xff"
20279 "\xff\xff\xff\xff\xff\xff\xff\xff"
20280 "\xff\xff\xff\xff\xff\xff\xff\xff"
20281 "\xff\xff\xff\xff\xff\xff\xff\xff",
20282 .rlen = 192,
20283
20284 }
20285};
20286
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030020287static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
20288 { /* From draft-mcgrew-gcm-test-01 */
20289 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20290 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20291 "\x22\x43\x3c\x64",
20292 .klen = 20,
20293 .iv = zeroed_string,
20294 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20295 .alen = 8,
20296 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20297 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20298 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20299 "\x02\x00\x07\x00\x61\x62\x63\x64"
20300 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20301 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20302 "\x01\x02\x02\x01",
20303 .ilen = 52,
20304 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20305 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20306 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20307 "\x02\x00\x07\x00\x61\x62\x63\x64"
20308 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20309 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20310 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20311 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20312 "\xe4\x09\x9a\xaa",
20313 .rlen = 68,
20314 }
20315};
20316
20317static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
20318 { /* From draft-mcgrew-gcm-test-01 */
20319 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20320 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20321 "\x22\x43\x3c\x64",
20322 .klen = 20,
20323 .iv = zeroed_string,
20324 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20325 .alen = 8,
20326 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20327 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20328 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20329 "\x02\x00\x07\x00\x61\x62\x63\x64"
20330 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20331 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20332 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20333 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20334 "\xe4\x09\x9a\xaa",
20335 .ilen = 68,
20336 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20337 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20338 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20339 "\x02\x00\x07\x00\x61\x62\x63\x64"
20340 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20341 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20342 "\x01\x02\x02\x01",
20343 .rlen = 52,
20344 }, { /* nearly same as previous, but should fail */
20345 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20346 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20347 "\x22\x43\x3c\x64",
20348 .klen = 20,
20349 .iv = zeroed_string,
20350 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20351 .alen = 8,
20352 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20353 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20354 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20355 "\x02\x00\x07\x00\x61\x62\x63\x64"
20356 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20357 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20358 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20359 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20360 "\x00\x00\x00\x00",
20361 .ilen = 68,
20362 .novrfy = 1,
20363 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20364 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20365 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20366 "\x02\x00\x07\x00\x61\x62\x63\x64"
20367 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20368 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20369 "\x01\x02\x02\x01",
20370 .rlen = 52,
20371 },
20372};
20373
Herbert Xuda7f0332008-07-31 17:08:25 +080020374static struct aead_testvec aes_ccm_enc_tv_template[] = {
20375 { /* From RFC 3610 */
20376 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20377 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20378 .klen = 16,
20379 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
20380 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20381 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20382 .alen = 8,
20383 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20384 "\x10\x11\x12\x13\x14\x15\x16\x17"
20385 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
20386 .ilen = 23,
20387 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
20388 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
20389 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
20390 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
20391 .rlen = 31,
20392 }, {
20393 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20394 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20395 .klen = 16,
20396 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
20397 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20398 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20399 "\x08\x09\x0a\x0b",
20400 .alen = 12,
20401 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20402 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20403 "\x1c\x1d\x1e\x1f",
20404 .ilen = 20,
20405 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
20406 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
20407 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
20408 "\x7d\x9c\x2d\x93",
20409 .rlen = 28,
20410 }, {
20411 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20412 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20413 .klen = 16,
20414 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
20415 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20416 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20417 .alen = 8,
20418 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20419 "\x10\x11\x12\x13\x14\x15\x16\x17"
20420 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
20421 "\x20",
20422 .ilen = 25,
20423 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
20424 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
20425 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
20426 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
20427 "\x7e\x5f\x4e",
20428 .rlen = 35,
20429 }, {
20430 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20431 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20432 .klen = 16,
20433 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
20434 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20435 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20436 "\x08\x09\x0a\x0b",
20437 .alen = 12,
20438 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20439 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20440 "\x1c\x1d\x1e",
20441 .ilen = 19,
20442 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
20443 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
20444 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
20445 "\x4d\x99\x99\x88\xdd",
20446 .rlen = 29,
20447 }, {
20448 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20449 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20450 .klen = 16,
20451 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
20452 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20453 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
20454 .alen = 8,
20455 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
20456 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
20457 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
20458 .ilen = 24,
20459 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
20460 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
20461 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
20462 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
20463 .rlen = 32,
20464 }, {
20465 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20466 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20467 .klen = 16,
20468 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
20469 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20470 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
20471 "\x20\xea\x60\xc0",
20472 .alen = 12,
20473 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
20474 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
20475 "\x3a\x80\x3b\xa8\x7f",
20476 .ilen = 21,
20477 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
20478 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
20479 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
20480 "\x5a\xe0\x70\x45\x51",
20481 .rlen = 29,
20482 }, {
20483 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20484 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20485 .klen = 16,
20486 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
20487 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20488 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
20489 .alen = 8,
20490 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
20491 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
20492 "\x98\x09\xd6\x7d\xbe\xdd\x18",
20493 .ilen = 23,
20494 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
20495 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
20496 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
20497 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
20498 "\xba",
20499 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080020500 }, {
20501 /*
20502 * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
20503 * below but rewritten to use the ccm algorithm directly.
20504 */
20505 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
20506 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
20507 .klen = 16,
20508 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
20509 .alen = 0,
20510 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
20511 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
20512 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
20513 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
20514 .ilen = 32,
20515 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
20516 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
20517 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
20518 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
20519 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
20520 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
20521 .rlen = 48,
20522 }
Herbert Xuda7f0332008-07-31 17:08:25 +080020523};
20524
20525static struct aead_testvec aes_ccm_dec_tv_template[] = {
20526 { /* From RFC 3610 */
20527 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20528 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20529 .klen = 16,
20530 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
20531 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20532 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20533 .alen = 8,
20534 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
20535 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
20536 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
20537 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
20538 .ilen = 31,
20539 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20540 "\x10\x11\x12\x13\x14\x15\x16\x17"
20541 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
20542 .rlen = 23,
20543 }, {
20544 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20545 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20546 .klen = 16,
20547 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
20548 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20549 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20550 "\x08\x09\x0a\x0b",
20551 .alen = 12,
20552 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
20553 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
20554 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
20555 "\x7d\x9c\x2d\x93",
20556 .ilen = 28,
20557 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20558 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20559 "\x1c\x1d\x1e\x1f",
20560 .rlen = 20,
20561 }, {
20562 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20563 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20564 .klen = 16,
20565 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
20566 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20567 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20568 .alen = 8,
20569 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
20570 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
20571 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
20572 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
20573 "\x7e\x5f\x4e",
20574 .ilen = 35,
20575 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20576 "\x10\x11\x12\x13\x14\x15\x16\x17"
20577 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
20578 "\x20",
20579 .rlen = 25,
20580 }, {
20581 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20582 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20583 .klen = 16,
20584 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
20585 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20586 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20587 "\x08\x09\x0a\x0b",
20588 .alen = 12,
20589 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
20590 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
20591 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
20592 "\x4d\x99\x99\x88\xdd",
20593 .ilen = 29,
20594 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20595 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20596 "\x1c\x1d\x1e",
20597 .rlen = 19,
20598 }, {
20599 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20600 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20601 .klen = 16,
20602 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
20603 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20604 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
20605 .alen = 8,
20606 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
20607 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
20608 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
20609 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
20610 .ilen = 32,
20611 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
20612 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
20613 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
20614 .rlen = 24,
20615 }, {
20616 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20617 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20618 .klen = 16,
20619 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
20620 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20621 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
20622 "\x20\xea\x60\xc0",
20623 .alen = 12,
20624 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
20625 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
20626 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
20627 "\x5a\xe0\x70\x45\x51",
20628 .ilen = 29,
20629 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
20630 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
20631 "\x3a\x80\x3b\xa8\x7f",
20632 .rlen = 21,
20633 }, {
20634 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20635 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20636 .klen = 16,
20637 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
20638 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20639 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
20640 .alen = 8,
20641 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
20642 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
20643 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
20644 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
20645 "\xba",
20646 .ilen = 33,
20647 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
20648 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
20649 "\x98\x09\xd6\x7d\xbe\xdd\x18",
20650 .rlen = 23,
20651 },
20652};
20653
Jarod Wilson5d667322009-05-04 19:23:40 +080020654/*
20655 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
20656 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
20657 * Special Publication 800-38C's test vectors also use nonce lengths our
20658 * implementation doesn't support. The following are taken from fips cavs
20659 * fax files on hand at Red Hat.
20660 *
20661 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
20662 * part of the nonce which combine w/the iv, but need to be input this way.
20663 */
20664static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
20665 {
20666 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
20667 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
20668 "\x96\xac\x59",
20669 .klen = 19,
20670 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
20671 .alen = 0,
20672 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
20673 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
20674 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
20675 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
20676 .ilen = 32,
20677 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
20678 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
20679 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
20680 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
20681 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
20682 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
20683 .rlen = 48,
20684 }, {
20685 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
20686 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
20687 "\x4f\xa3\x19",
20688 .klen = 19,
20689 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
20690 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
20691 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
20692 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
20693 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
20694 .alen = 32,
20695 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
20696 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
20697 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
20698 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
20699 .ilen = 32,
20700 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
20701 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
20702 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
20703 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
20704 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
20705 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
20706 .rlen = 48,
20707 }, {
20708 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
20709 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
20710 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
20711 "\xa0\x20\x35",
20712 .klen = 27,
20713 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
20714 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
20715 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
20716 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
20717 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
20718 .alen = 32,
20719 .ilen = 0,
20720 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
20721 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
20722 .rlen = 16,
20723 }, {
20724 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
20725 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
20726 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
20727 "\xd6\x3c\x8c",
20728 .klen = 27,
20729 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
20730 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
20731 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
20732 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
20733 "\xe3\x00\x73\x69\x84\x69\x87\x79",
20734 .alen = 32,
20735 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
20736 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
20737 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
20738 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
20739 .ilen = 32,
20740 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
20741 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
20742 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
20743 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
20744 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
20745 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
20746 .rlen = 48,
20747 }, {
20748 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
20749 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
20750 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
20751 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
20752 "\x1e\x29\x91",
20753 .klen = 35,
20754 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
20755 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
20756 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
20757 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
20758 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
20759 .alen = 32,
20760 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
20761 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
20762 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
20763 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
20764 .ilen = 32,
20765 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
20766 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
20767 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
20768 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
20769 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
20770 .rlen = 40,
20771 }, {
20772 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
20773 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
20774 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
20775 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
20776 "\xf9\xd9\x4e",
20777 .klen = 35,
20778 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
20779 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
20780 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
20781 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
20782 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
20783 .alen = 32,
20784 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
20785 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
20786 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
20787 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
20788 .ilen = 32,
20789 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
20790 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
20791 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
20792 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
20793 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
20794 "\x7b\x72\x8a\xf7",
20795 .rlen = 44,
20796 }, {
20797 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
20798 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
20799 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
20800 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
20801 "\x24\xa7\x8b",
20802 .klen = 35,
20803 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
20804 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
20805 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
20806 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
20807 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
20808 .alen = 32,
20809 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
20810 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
20811 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
20812 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
20813 .ilen = 32,
20814 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
20815 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
20816 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
20817 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
20818 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
20819 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
20820 .rlen = 48,
20821 },
20822};
20823
20824static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
20825 {
20826 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
20827 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
20828 "\xc6\xfb\x7d",
20829 .klen = 19,
20830 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
20831 .alen = 0,
20832 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
20833 .ilen = 8,
20834 .result = "\x00",
20835 .rlen = 0,
20836 .novrfy = 1,
20837 }, {
20838 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
20839 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
20840 "\xaf\x94\x87",
20841 .klen = 19,
20842 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
20843 .alen = 0,
20844 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
20845 .ilen = 8,
20846 .result = "\x00",
20847 .rlen = 0,
20848 }, {
20849 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
20850 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
20851 "\xc6\xfb\x7d",
20852 .klen = 19,
20853 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
20854 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
20855 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
20856 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
20857 "\xd8\x94\x99\x91\x81\x54\x62\x57",
20858 .alen = 32,
20859 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
20860 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
20861 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
20862 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
20863 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
20864 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
20865 .ilen = 48,
20866 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
20867 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
20868 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
20869 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
20870 .rlen = 32,
20871 .novrfy = 1,
20872 }, {
20873 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
20874 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
20875 "\x05\xe0\xc9",
20876 .klen = 19,
20877 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
20878 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
20879 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
20880 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
20881 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
20882 .alen = 32,
20883 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
20884 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
20885 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
20886 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
20887 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
20888 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
20889 .ilen = 48,
20890 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
20891 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
20892 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
20893 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
20894 .rlen = 32,
20895 }, {
20896 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
20897 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
20898 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
20899 "\xee\x49\x83",
20900 .klen = 27,
20901 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20902 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
20903 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
20904 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
20905 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
20906 .alen = 32,
20907 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
20908 .ilen = 8,
20909 .result = "\x00",
20910 .rlen = 0,
20911 }, {
20912 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
20913 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
20914 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
20915 "\xee\x49\x83",
20916 .klen = 27,
20917 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20918 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
20919 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
20920 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
20921 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
20922 .alen = 32,
20923 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
20924 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
20925 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
20926 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
20927 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
20928 .ilen = 40,
20929 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
20930 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
20931 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
20932 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
20933 .rlen = 32,
20934 }, {
20935 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
20936 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
20937 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
20938 "\xd1\xfc\x57",
20939 .klen = 27,
20940 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
20941 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
20942 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
20943 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
20944 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
20945 .alen = 32,
20946 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
20947 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
20948 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
20949 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
20950 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
20951 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
20952 .ilen = 48,
20953 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
20954 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
20955 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
20956 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
20957 .rlen = 32,
20958 .novrfy = 1,
20959 }, {
20960 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
20961 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
20962 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
20963 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
20964 "\xee\x49\x83",
20965 .klen = 35,
20966 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20967 .alen = 0,
20968 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
20969 .ilen = 8,
20970 .result = "\x00",
20971 .rlen = 0,
20972 }, {
20973 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
20974 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
20975 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
20976 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
20977 "\x85\x34\x66",
20978 .klen = 35,
20979 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
20980 .alen = 0,
20981 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
20982 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
20983 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
20984 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
20985 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
20986 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
20987 .ilen = 48,
20988 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
20989 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
20990 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
20991 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
20992 .rlen = 32,
20993 .novrfy = 1,
20994 }, {
20995 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
20996 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
20997 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
20998 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
20999 "\xcf\x76\x3f",
21000 .klen = 35,
21001 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
21002 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
21003 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
21004 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
21005 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
21006 .alen = 32,
21007 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
21008 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
21009 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
21010 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
21011 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
21012 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
21013 .ilen = 48,
21014 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
21015 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
21016 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
21017 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
21018 .rlen = 32,
21019 },
21020};
21021
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080021022/*
Martin Williaf2b76b2015-06-01 13:44:01 +020021023 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
21024 */
21025#define RFC7539_ENC_TEST_VECTORS 2
21026#define RFC7539_DEC_TEST_VECTORS 2
21027static struct aead_testvec rfc7539_enc_tv_template[] = {
21028 {
21029 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
21030 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
21031 "\x90\x91\x92\x93\x94\x95\x96\x97"
21032 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
21033 .klen = 32,
21034 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
21035 "\x44\x45\x46\x47",
21036 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
21037 "\xc4\xc5\xc6\xc7",
21038 .alen = 12,
21039 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
21040 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
21041 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
21042 "\x74\x68\x65\x20\x63\x6c\x61\x73"
21043 "\x73\x20\x6f\x66\x20\x27\x39\x39"
21044 "\x3a\x20\x49\x66\x20\x49\x20\x63"
21045 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
21046 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
21047 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
21048 "\x74\x69\x70\x20\x66\x6f\x72\x20"
21049 "\x74\x68\x65\x20\x66\x75\x74\x75"
21050 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
21051 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
21052 "\x75\x6c\x64\x20\x62\x65\x20\x69"
21053 "\x74\x2e",
21054 .ilen = 114,
21055 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
21056 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
21057 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
21058 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
21059 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
21060 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
21061 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
21062 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
21063 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
21064 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
21065 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
21066 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
21067 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
21068 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
21069 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
21070 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
21071 "\x06\x91",
21072 .rlen = 130,
21073 }, {
21074 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21075 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21076 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21077 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
21078 .klen = 32,
21079 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
21080 "\x05\x06\x07\x08",
21081 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21082 "\x00\x00\x4e\x91",
21083 .alen = 12,
21084 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21085 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21086 "\x61\x72\x65\x20\x64\x72\x61\x66"
21087 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21088 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21089 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21090 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21091 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21092 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21093 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21094 "\x20\x75\x70\x64\x61\x74\x65\x64"
21095 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21096 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21097 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21098 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21099 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21100 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21101 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21102 "\x20\x49\x74\x20\x69\x73\x20\x69"
21103 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21104 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21105 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21106 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21107 "\x66\x74\x73\x20\x61\x73\x20\x72"
21108 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21109 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21110 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21111 "\x63\x69\x74\x65\x20\x74\x68\x65"
21112 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21113 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21114 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21115 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21116 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21117 "\x9d",
21118 .ilen = 265,
21119 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21120 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21121 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21122 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21123 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21124 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21125 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21126 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21127 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21128 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21129 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21130 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21131 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21132 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21133 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21134 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21135 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21136 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21137 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21138 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21139 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21140 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21141 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21142 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21143 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21144 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21145 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21146 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21147 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21148 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21149 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21150 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21151 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21152 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21153 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21154 "\x38",
21155 .rlen = 281,
21156 },
21157};
21158
21159static struct aead_testvec rfc7539_dec_tv_template[] = {
21160 {
21161 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
21162 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
21163 "\x90\x91\x92\x93\x94\x95\x96\x97"
21164 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
21165 .klen = 32,
21166 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
21167 "\x44\x45\x46\x47",
21168 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
21169 "\xc4\xc5\xc6\xc7",
21170 .alen = 12,
21171 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
21172 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
21173 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
21174 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
21175 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
21176 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
21177 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
21178 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
21179 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
21180 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
21181 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
21182 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
21183 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
21184 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
21185 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
21186 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
21187 "\x06\x91",
21188 .ilen = 130,
21189 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
21190 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
21191 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
21192 "\x74\x68\x65\x20\x63\x6c\x61\x73"
21193 "\x73\x20\x6f\x66\x20\x27\x39\x39"
21194 "\x3a\x20\x49\x66\x20\x49\x20\x63"
21195 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
21196 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
21197 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
21198 "\x74\x69\x70\x20\x66\x6f\x72\x20"
21199 "\x74\x68\x65\x20\x66\x75\x74\x75"
21200 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
21201 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
21202 "\x75\x6c\x64\x20\x62\x65\x20\x69"
21203 "\x74\x2e",
21204 .rlen = 114,
21205 }, {
21206 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21207 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21208 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21209 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
21210 .klen = 32,
21211 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
21212 "\x05\x06\x07\x08",
21213 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21214 "\x00\x00\x4e\x91",
21215 .alen = 12,
21216 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21217 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21218 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21219 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21220 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21221 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21222 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21223 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21224 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21225 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21226 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21227 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21228 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21229 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21230 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21231 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21232 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21233 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21234 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21235 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21236 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21237 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21238 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21239 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21240 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21241 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21242 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21243 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21244 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21245 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21246 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21247 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21248 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21249 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21250 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21251 "\x38",
21252 .ilen = 281,
21253 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21254 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21255 "\x61\x72\x65\x20\x64\x72\x61\x66"
21256 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21257 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21258 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21259 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21260 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21261 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21262 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21263 "\x20\x75\x70\x64\x61\x74\x65\x64"
21264 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21265 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21266 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21267 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21268 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21269 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21270 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21271 "\x20\x49\x74\x20\x69\x73\x20\x69"
21272 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21273 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21274 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21275 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21276 "\x66\x74\x73\x20\x61\x73\x20\x72"
21277 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21278 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21279 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21280 "\x63\x69\x74\x65\x20\x74\x68\x65"
21281 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21282 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21283 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21284 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21285 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21286 "\x9d",
21287 .rlen = 265,
21288 },
21289};
21290
21291/*
Martin Willi59007582015-06-01 13:44:03 +020021292 * draft-irtf-cfrg-chacha20-poly1305
21293 */
21294#define RFC7539ESP_DEC_TEST_VECTORS 1
21295#define RFC7539ESP_ENC_TEST_VECTORS 1
21296static struct aead_testvec rfc7539esp_enc_tv_template[] = {
21297 {
21298 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21299 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21300 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21301 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
21302 "\x00\x00\x00\x00",
21303 .klen = 36,
21304 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21305 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21306 "\x00\x00\x4e\x91",
21307 .alen = 12,
21308 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21309 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21310 "\x61\x72\x65\x20\x64\x72\x61\x66"
21311 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21312 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21313 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21314 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21315 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21316 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21317 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21318 "\x20\x75\x70\x64\x61\x74\x65\x64"
21319 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21320 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21321 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21322 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21323 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21324 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21325 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21326 "\x20\x49\x74\x20\x69\x73\x20\x69"
21327 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21328 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21329 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21330 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21331 "\x66\x74\x73\x20\x61\x73\x20\x72"
21332 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21333 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21334 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21335 "\x63\x69\x74\x65\x20\x74\x68\x65"
21336 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21337 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21338 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21339 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21340 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21341 "\x9d",
21342 .ilen = 265,
21343 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21344 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21345 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21346 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21347 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21348 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21349 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21350 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21351 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21352 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21353 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21354 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21355 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21356 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21357 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21358 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21359 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21360 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21361 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21362 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21363 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21364 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21365 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21366 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21367 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21368 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21369 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21370 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21371 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21372 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21373 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21374 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21375 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21376 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21377 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21378 "\x38",
21379 .rlen = 281,
21380 },
21381};
21382
21383static struct aead_testvec rfc7539esp_dec_tv_template[] = {
21384 {
21385 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21386 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21387 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21388 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
21389 "\x00\x00\x00\x00",
21390 .klen = 36,
21391 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21392 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21393 "\x00\x00\x4e\x91",
21394 .alen = 12,
21395 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21396 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21397 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21398 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21399 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21400 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21401 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21402 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21403 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21404 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21405 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21406 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21407 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21408 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21409 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21410 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21411 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21412 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21413 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21414 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21415 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21416 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21417 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21418 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21419 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21420 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21421 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21422 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21423 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21424 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21425 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21426 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21427 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21428 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21429 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21430 "\x38",
21431 .ilen = 281,
21432 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21433 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21434 "\x61\x72\x65\x20\x64\x72\x61\x66"
21435 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21436 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21437 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21438 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21439 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21440 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21441 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21442 "\x20\x75\x70\x64\x61\x74\x65\x64"
21443 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21444 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21445 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21446 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21447 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21448 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21449 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21450 "\x20\x49\x74\x20\x69\x73\x20\x69"
21451 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21452 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21453 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21454 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21455 "\x66\x74\x73\x20\x61\x73\x20\x72"
21456 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21457 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21458 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21459 "\x63\x69\x74\x65\x20\x74\x68\x65"
21460 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21461 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21462 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21463 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21464 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21465 "\x9d",
21466 .rlen = 265,
21467 },
21468};
21469
21470/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080021471 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
21472 * test vectors, taken from Appendix B.2.9 and B.2.10:
21473 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
21474 * Only AES-128 is supported at this time.
21475 */
21476#define ANSI_CPRNG_AES_TEST_VECTORS 6
21477
21478static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
21479 {
21480 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21481 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21482 .klen = 16,
21483 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21484 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
21485 .dtlen = 16,
21486 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
21487 "\x00\x00\x00\x00\x00\x00\x00\x00",
21488 .vlen = 16,
21489 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
21490 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
21491 .rlen = 16,
21492 .loops = 1,
21493 }, {
21494 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21495 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21496 .klen = 16,
21497 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21498 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
21499 .dtlen = 16,
21500 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
21501 "\x00\x00\x00\x00\x00\x00\x00\x00",
21502 .vlen = 16,
21503 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
21504 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
21505 .rlen = 16,
21506 .loops = 1,
21507 }, {
21508 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21509 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21510 .klen = 16,
21511 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21512 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
21513 .dtlen = 16,
21514 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
21515 "\x00\x00\x00\x00\x00\x00\x00\x00",
21516 .vlen = 16,
21517 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
21518 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
21519 .rlen = 16,
21520 .loops = 1,
21521 }, {
21522 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21523 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21524 .klen = 16,
21525 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21526 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
21527 .dtlen = 16,
21528 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
21529 "\x00\x00\x00\x00\x00\x00\x00\x00",
21530 .vlen = 16,
21531 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
21532 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
21533 .rlen = 16,
21534 .loops = 1,
21535 }, {
21536 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21537 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21538 .klen = 16,
21539 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21540 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
21541 .dtlen = 16,
21542 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
21543 "\x00\x00\x00\x00\x00\x00\x00\x00",
21544 .vlen = 16,
21545 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
21546 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
21547 .rlen = 16,
21548 .loops = 1,
21549 }, { /* Monte Carlo Test */
21550 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
21551 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
21552 .klen = 16,
21553 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
21554 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
21555 .dtlen = 16,
21556 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
21557 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
21558 .vlen = 16,
21559 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
21560 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
21561 .rlen = 16,
21562 .loops = 10000,
21563 },
21564};
21565
Stephan Mueller3332ee22014-05-31 17:24:38 +020021566/*
21567 * SP800-90A DRBG Test vectors from
21568 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
21569 *
21570 * Test vectors for DRBG with prediction resistance. All types of DRBGs
21571 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
21572 * w/o personalization string, w/ and w/o additional input string).
21573 */
21574static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
21575 {
21576 .entropy = (unsigned char *)
21577 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
21578 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
21579 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
21580 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
21581 .entropylen = 48,
21582 .entpra = (unsigned char *)
21583 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
21584 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
21585 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
21586 .entprb = (unsigned char *)
21587 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
21588 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
21589 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
21590 .entprlen = 32,
21591 .expected = (unsigned char *)
21592 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
21593 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
21594 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
21595 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
21596 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
21597 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
21598 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
21599 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
21600 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
21601 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
21602 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
21603 .expectedlen = 128,
21604 .addtla = NULL,
21605 .addtlb = NULL,
21606 .addtllen = 0,
21607 .pers = NULL,
21608 .perslen = 0,
21609 }, {
21610 .entropy = (unsigned char *)
21611 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
21612 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
21613 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
21614 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
21615 .entropylen = 48,
21616 .entpra = (unsigned char *)
21617 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
21618 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
21619 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
21620 .entprb = (unsigned char *)
21621 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
21622 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
21623 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
21624 .entprlen = 32,
21625 .expected = (unsigned char *)
21626 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
21627 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
21628 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
21629 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
21630 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
21631 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
21632 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
21633 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
21634 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
21635 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
21636 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
21637 .expectedlen = 128,
21638 .addtla = (unsigned char *)
21639 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
21640 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
21641 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
21642 .addtlb = (unsigned char *)
21643 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
21644 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
21645 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
21646 .addtllen = 32,
21647 .pers = NULL,
21648 .perslen = 0,
21649 }, {
21650 .entropy = (unsigned char *)
21651 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
21652 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
21653 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
21654 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
21655 .entropylen = 48,
21656 .entpra = (unsigned char *)
21657 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
21658 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
21659 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
21660 .entprb = (unsigned char *)
21661 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
21662 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
21663 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
21664 .entprlen = 32,
21665 .expected = (unsigned char *)
21666 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
21667 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
21668 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
21669 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
21670 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
21671 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
21672 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
21673 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
21674 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
21675 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
21676 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
21677 .expectedlen = 128,
21678 .addtla = NULL,
21679 .addtlb = NULL,
21680 .addtllen = 0,
21681 .pers = (unsigned char *)
21682 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
21683 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
21684 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
21685 .perslen = 32,
21686 }, {
21687 .entropy = (unsigned char *)
21688 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
21689 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
21690 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
21691 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
21692 .entropylen = 48,
21693 .entpra = (unsigned char *)
21694 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
21695 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
21696 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
21697 .entprb = (unsigned char *)
21698 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
21699 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
21700 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
21701 .entprlen = 32,
21702 .expected = (unsigned char *)
21703 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
21704 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
21705 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
21706 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
21707 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
21708 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
21709 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
21710 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
21711 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
21712 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
21713 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
21714 .expectedlen = 128,
21715 .addtla = (unsigned char *)
21716 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
21717 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
21718 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
21719 .addtlb = (unsigned char *)
21720 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
21721 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
21722 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
21723 .addtllen = 32,
21724 .pers = (unsigned char *)
21725 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
21726 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
21727 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
21728 .perslen = 32,
21729 },
21730};
21731
21732static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
21733 {
21734 .entropy = (unsigned char *)
21735 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
21736 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
21737 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
21738 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
21739 .entropylen = 48,
21740 .entpra = (unsigned char *)
21741 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
21742 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
21743 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
21744 .entprb = (unsigned char *)
21745 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
21746 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
21747 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
21748 .entprlen = 32,
21749 .expected = (unsigned char *)
21750 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
21751 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
21752 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
21753 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
21754 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
21755 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
21756 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
21757 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
21758 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
21759 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
21760 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
21761 .expectedlen = 128,
21762 .addtla = NULL,
21763 .addtlb = NULL,
21764 .addtllen = 0,
21765 .pers = NULL,
21766 .perslen = 0,
21767 }, {
21768 .entropy = (unsigned char *)
21769 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
21770 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
21771 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
21772 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
21773 .entropylen = 48,
21774 .entpra = (unsigned char *)
21775 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
21776 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
21777 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
21778 .entprb = (unsigned char *)
21779 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
21780 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
21781 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
21782 .entprlen = 32,
21783 .expected = (unsigned char *)
21784 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
21785 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
21786 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
21787 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
21788 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
21789 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
21790 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
21791 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
21792 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
21793 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
21794 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
21795 .expectedlen = 128,
21796 .addtla = (unsigned char *)
21797 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
21798 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
21799 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
21800 .addtlb = (unsigned char *)
21801 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
21802 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
21803 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
21804 .addtllen = 32,
21805 .pers = NULL,
21806 .perslen = 0,
21807 }, {
21808 .entropy = (unsigned char *)
21809 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
21810 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
21811 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
21812 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
21813 .entropylen = 48,
21814 .entpra = (unsigned char *)
21815 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
21816 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
21817 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
21818 .entprb = (unsigned char *)
21819 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
21820 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
21821 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
21822 .entprlen = 32,
21823 .expected = (unsigned char *)
21824 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
21825 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
21826 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
21827 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
21828 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
21829 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
21830 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
21831 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
21832 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
21833 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
21834 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
21835 .expectedlen = 128,
21836 .addtla = NULL,
21837 .addtlb = NULL,
21838 .addtllen = 0,
21839 .pers = (unsigned char *)
21840 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
21841 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
21842 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
21843 .perslen = 32,
21844 }, {
21845 .entropy = (unsigned char *)
21846 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
21847 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
21848 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
21849 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
21850 .entropylen = 48,
21851 .entpra = (unsigned char *)
21852 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
21853 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
21854 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
21855 .entprb = (unsigned char *)
21856 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
21857 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
21858 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
21859 .entprlen = 32,
21860 .expected = (unsigned char *)
21861 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
21862 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
21863 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
21864 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
21865 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
21866 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
21867 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
21868 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
21869 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
21870 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
21871 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
21872 .expectedlen = 128,
21873 .addtla = (unsigned char *)
21874 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
21875 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
21876 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
21877 .addtlb = (unsigned char *)
21878 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
21879 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
21880 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
21881 .addtllen = 32,
21882 .pers = (unsigned char *)
21883 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
21884 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
21885 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
21886 .perslen = 32,
21887 },
21888};
21889
21890static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
21891 {
21892 .entropy = (unsigned char *)
21893 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
21894 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
21895 .entropylen = 24,
21896 .entpra = (unsigned char *)
21897 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
21898 "\xb4\xec\x80\xb1",
21899 .entprb = (unsigned char *)
21900 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
21901 "\x28\x07\xeb\xc2",
21902 .entprlen = 16,
21903 .expected = (unsigned char *)
21904 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
21905 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
21906 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
21907 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
21908 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
21909 "\x8a\xf1\x23\xa8",
21910 .expectedlen = 64,
21911 .addtla = NULL,
21912 .addtlb = NULL,
21913 .addtllen = 0,
21914 .pers = NULL,
21915 .perslen = 0,
21916 }, {
21917 .entropy = (unsigned char *)
21918 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
21919 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
21920 .entropylen = 24,
21921 .entpra = (unsigned char *)
21922 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
21923 "\x67\xd1\x08\xf8",
21924 .entprb = (unsigned char *)
21925 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
21926 "\xd4\xba\x04\x58",
21927 .entprlen = 16,
21928 .expected = (unsigned char *)
21929 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
21930 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
21931 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
21932 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
21933 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
21934 "\xc1\x02\x41\x82",
21935 .expectedlen = 64,
21936 .addtla = (unsigned char *)
21937 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
21938 "\xeb\xb3\x01\x76",
21939 .addtlb = (unsigned char *)
21940 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
21941 "\xd0\x7f\xcc\x43",
21942 .addtllen = 16,
21943 .pers = NULL,
21944 .perslen = 0,
21945 }, {
21946 .entropy = (unsigned char *)
21947 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
21948 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
21949 .entropylen = 24,
21950 .entpra = (unsigned char *)
21951 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
21952 "\xc3\x0f\xe3\xb0",
21953 .entprb = (unsigned char *)
21954 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
21955 "\xd6\x9c\x9d\xe8",
21956 .entprlen = 16,
21957 .expected = (unsigned char *)
21958 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
21959 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
21960 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
21961 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
21962 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
21963 "\x72\x82\x0c\xcf",
21964 .expectedlen = 64,
21965 .addtla = NULL,
21966 .addtlb = NULL,
21967 .addtllen = 0,
21968 .pers = (unsigned char *)
21969 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
21970 "\x21\x52\xb3\xad",
21971 .perslen = 16,
21972 }, {
21973 .entropy = (unsigned char *)
21974 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
21975 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
21976 .entropylen = 24,
21977 .entpra = (unsigned char *)
21978 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
21979 "\xc4\x2c\xe8\x10",
21980 .entprb = (unsigned char *)
21981 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
21982 "\x08\xf7\xa5\x01",
21983 .entprlen = 16,
21984 .expected = (unsigned char *)
21985 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
21986 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
21987 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
21988 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
21989 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
21990 "\x23\xc5\x1f\x68",
21991 .expectedlen = 64,
21992 .addtla = (unsigned char *)
21993 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
21994 "\x23\x6d\xad\x1d",
21995 .addtlb = (unsigned char *)
21996 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
21997 "\xbc\x59\x31\x8c",
21998 .addtllen = 16,
21999 .pers = (unsigned char *)
22000 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
22001 "\x37\x3c\x5c\x0b",
22002 .perslen = 16,
22003 },
22004};
22005
22006/*
22007 * SP800-90A DRBG Test vectors from
22008 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22009 *
22010 * Test vectors for DRBG without prediction resistance. All types of DRBGs
22011 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22012 * w/o personalization string, w/ and w/o additional input string).
22013 */
22014static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
22015 {
22016 .entropy = (unsigned char *)
22017 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
22018 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
22019 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
22020 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
22021 .entropylen = 48,
22022 .expected = (unsigned char *)
22023 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
22024 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
22025 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
22026 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
22027 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
22028 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
22029 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
22030 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
22031 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
22032 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
22033 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
22034 .expectedlen = 128,
22035 .addtla = NULL,
22036 .addtlb = NULL,
22037 .addtllen = 0,
22038 .pers = NULL,
22039 .perslen = 0,
22040 }, {
22041 .entropy = (unsigned char *)
22042 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
22043 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
22044 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
22045 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
22046 .entropylen = 48,
22047 .expected = (unsigned char *)
22048 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
22049 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
22050 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
22051 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
22052 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
22053 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
22054 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
22055 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
22056 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
22057 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
22058 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
22059 .expectedlen = 128,
22060 .addtla = (unsigned char *)
22061 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
22062 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
22063 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
22064 .addtlb = (unsigned char *)
22065 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
22066 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
22067 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
22068 .addtllen = 32,
22069 .pers = NULL,
22070 .perslen = 0,
22071 }, {
22072 .entropy = (unsigned char *)
22073 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
22074 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
22075 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
22076 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
22077 .entropylen = 48,
22078 .expected = (unsigned char *)
22079 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
22080 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
22081 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
22082 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
22083 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
22084 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
22085 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
22086 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
22087 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
22088 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
22089 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
22090 .expectedlen = 128,
22091 .addtla = NULL,
22092 .addtlb = NULL,
22093 .addtllen = 0,
22094 .pers = (unsigned char *)
22095 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
22096 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
22097 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
22098 .perslen = 32,
22099 }, {
22100 .entropy = (unsigned char *)
22101 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
22102 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
22103 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
22104 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
22105 .entropylen = 48,
22106 .expected = (unsigned char *)
22107 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
22108 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
22109 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
22110 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
22111 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
22112 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
22113 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
22114 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
22115 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
22116 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
22117 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
22118 .expectedlen = 128,
22119 .addtla = (unsigned char *)
22120 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
22121 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
22122 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
22123 .addtlb = (unsigned char *)
22124 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
22125 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
22126 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
22127 .addtllen = 32,
22128 .pers = (unsigned char *)
22129 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
22130 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
22131 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
22132 .perslen = 32,
22133 },
22134};
22135
22136static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
22137 {
22138 .entropy = (unsigned char *)
22139 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
22140 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
22141 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
22142 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
22143 .entropylen = 48,
22144 .expected = (unsigned char *)
22145 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
22146 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
22147 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
22148 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
22149 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
22150 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
22151 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
22152 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
22153 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
22154 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
22155 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
22156 .expectedlen = 128,
22157 .addtla = NULL,
22158 .addtlb = NULL,
22159 .addtllen = 0,
22160 .pers = NULL,
22161 .perslen = 0,
22162 }, {
22163 .entropy = (unsigned char *)
22164 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
22165 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
22166 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
22167 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
22168 .entropylen = 48,
22169 .expected = (unsigned char *)
22170 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
22171 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
22172 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
22173 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
22174 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
22175 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
22176 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
22177 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
22178 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
22179 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
22180 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
22181 .expectedlen = 128,
22182 .addtla = (unsigned char *)
22183 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
22184 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
22185 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
22186 .addtlb = (unsigned char *)
22187 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
22188 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
22189 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
22190 .addtllen = 32,
22191 .pers = NULL,
22192 .perslen = 0,
22193 }, {
22194 .entropy = (unsigned char *)
22195 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
22196 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
22197 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
22198 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
22199 .entropylen = 48,
22200 .expected = (unsigned char *)
22201 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
22202 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
22203 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
22204 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
22205 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
22206 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
22207 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
22208 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
22209 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
22210 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
22211 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
22212 .expectedlen = 128,
22213 .addtla = NULL,
22214 .addtlb = NULL,
22215 .addtllen = 0,
22216 .pers = (unsigned char *)
22217 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
22218 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
22219 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
22220 .perslen = 32,
22221 }, {
22222 .entropy = (unsigned char *)
22223 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
22224 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
22225 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
22226 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
22227 .entropylen = 48,
22228 .expected = (unsigned char *)
22229 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
22230 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
22231 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
22232 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
22233 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
22234 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
22235 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
22236 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
22237 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
22238 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
22239 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
22240 .expectedlen = 128,
22241 .addtla = (unsigned char *)
22242 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
22243 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
22244 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
22245 .addtlb = (unsigned char *)
22246 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
22247 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
22248 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
22249 .addtllen = 32,
22250 .pers = (unsigned char *)
22251 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
22252 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
22253 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
22254 .perslen = 32,
22255 },
22256};
22257
22258static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
22259 {
22260 .entropy = (unsigned char *)
22261 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
22262 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
22263 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
22264 "\xac\x9b\xbb\x00",
22265 .entropylen = 40,
22266 .expected = (unsigned char *)
22267 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
22268 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
22269 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
22270 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
22271 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
22272 "\x9a\x9d\xf1\x0d",
22273 .expectedlen = 64,
22274 .addtla = NULL,
22275 .addtlb = NULL,
22276 .addtllen = 0,
22277 .pers = NULL,
22278 .perslen = 0,
22279 },
22280};
22281
22282static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
22283 {
22284 .entropy = (unsigned char *)
22285 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
22286 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
22287 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
22288 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
22289 .entropylen = 48,
22290 .expected = (unsigned char *)
22291 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
22292 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
22293 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
22294 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
22295 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
22296 "\xb4\xf0\x7e\x1d",
22297 .expectedlen = 64,
22298 .addtla = NULL,
22299 .addtlb = NULL,
22300 .addtllen = 0,
22301 .pers = NULL,
22302 .perslen = 0,
22303 },
22304};
22305
22306static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
22307 {
22308 .entropy = (unsigned char *)
22309 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
22310 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
22311 .entropylen = 24,
22312 .expected = (unsigned char *)
22313 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
22314 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
22315 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
22316 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
22317 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
22318 "\xcb\x2d\xd6\xb0",
22319 .expectedlen = 64,
22320 .addtla = NULL,
22321 .addtlb = NULL,
22322 .addtllen = 0,
22323 .pers = NULL,
22324 .perslen = 0,
22325 }, {
22326 .entropy = (unsigned char *)
22327 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
22328 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
22329 .entropylen = 24,
22330 .expected = (unsigned char *)
22331 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
22332 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
22333 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
22334 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
22335 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
22336 "\xc3\xdf\xb3\x81",
22337 .expectedlen = 64,
22338 .addtla = (unsigned char *)
22339 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
22340 "\x91\x4d\x81\x56",
22341 .addtlb = (unsigned char *)
22342 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
22343 "\x4a\x55\xd1\xc6",
22344 .addtllen = 16,
22345 .pers = NULL,
22346 .perslen = 0,
22347 }, {
22348 .entropy = (unsigned char *)
22349 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
22350 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
22351 .entropylen = 24,
22352 .expected = (unsigned char *)
22353 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
22354 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
22355 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
22356 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
22357 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
22358 "\x34\x30\x0c\x3d",
22359 .expectedlen = 64,
22360 .addtla = NULL,
22361 .addtlb = NULL,
22362 .addtllen = 0,
22363 .pers = (unsigned char *)
22364 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
22365 "\x0b\xc6\x97\x54",
22366 .perslen = 16,
22367 }, {
22368 .entropy = (unsigned char *)
22369 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
22370 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
22371 .entropylen = 24,
22372 .expected = (unsigned char *)
22373 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
22374 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
22375 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
22376 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
22377 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
22378 "\x2b\x49\x1e\x5c",
22379 .expectedlen = 64,
22380 .addtla = (unsigned char *)
22381 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
22382 "\x44\x85\xe7\xfe",
22383 .addtlb = (unsigned char *)
22384 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
22385 "\x82\x16\x62\x7f",
22386 .addtllen = 16,
22387 .pers = (unsigned char *)
22388 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
22389 "\x8e\xcf\xe0\x02",
22390 .perslen = 16,
22391 },
22392};
22393
Herbert Xuda7f0332008-07-31 17:08:25 +080022394/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022395#define CAST5_ENC_TEST_VECTORS 4
22396#define CAST5_DEC_TEST_VECTORS 4
22397#define CAST5_CBC_ENC_TEST_VECTORS 1
22398#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030022399#define CAST5_CTR_ENC_TEST_VECTORS 2
22400#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080022401
22402static struct cipher_testvec cast5_enc_tv_template[] = {
22403 {
22404 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22405 "\x23\x45\x67\x89\x34\x56\x78\x9a",
22406 .klen = 16,
22407 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22408 .ilen = 8,
22409 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
22410 .rlen = 8,
22411 }, {
22412 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22413 "\x23\x45",
22414 .klen = 10,
22415 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22416 .ilen = 8,
22417 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
22418 .rlen = 8,
22419 }, {
22420 .key = "\x01\x23\x45\x67\x12",
22421 .klen = 5,
22422 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22423 .ilen = 8,
22424 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
22425 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022426 }, { /* Generated from TF test vectors */
22427 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22428 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22429 .klen = 16,
22430 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22431 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22432 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22433 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22434 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22435 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22436 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22437 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22438 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22439 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22440 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22441 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22442 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22443 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22444 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22445 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22446 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22447 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22448 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22449 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22450 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22451 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22452 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22453 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22454 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22455 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22456 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22457 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22458 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22459 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22460 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22461 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22462 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22463 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22464 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22465 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22466 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22467 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22468 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22469 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22470 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22471 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22472 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22473 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22474 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22475 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22476 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22477 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22478 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22479 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22480 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22481 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22482 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22483 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22484 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22485 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22486 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22487 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22488 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22489 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22490 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22491 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22492 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22493 .ilen = 496,
22494 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
22495 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
22496 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
22497 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
22498 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
22499 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
22500 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
22501 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
22502 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
22503 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
22504 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
22505 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
22506 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
22507 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
22508 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
22509 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
22510 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
22511 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
22512 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
22513 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
22514 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
22515 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
22516 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
22517 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
22518 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
22519 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
22520 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
22521 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
22522 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
22523 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
22524 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
22525 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
22526 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
22527 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
22528 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
22529 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
22530 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
22531 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
22532 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
22533 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
22534 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
22535 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
22536 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
22537 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
22538 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
22539 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
22540 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
22541 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
22542 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
22543 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
22544 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
22545 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
22546 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
22547 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
22548 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
22549 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
22550 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
22551 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
22552 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
22553 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
22554 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
22555 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
22556 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022557 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022558 .np = 3,
22559 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080022560 },
22561};
22562
22563static struct cipher_testvec cast5_dec_tv_template[] = {
22564 {
22565 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22566 "\x23\x45\x67\x89\x34\x56\x78\x9a",
22567 .klen = 16,
22568 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
22569 .ilen = 8,
22570 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22571 .rlen = 8,
22572 }, {
22573 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22574 "\x23\x45",
22575 .klen = 10,
22576 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
22577 .ilen = 8,
22578 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22579 .rlen = 8,
22580 }, {
22581 .key = "\x01\x23\x45\x67\x12",
22582 .klen = 5,
22583 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
22584 .ilen = 8,
22585 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22586 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022587 }, { /* Generated from TF test vectors */
22588 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22589 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22590 .klen = 16,
22591 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22592 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
22593 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
22594 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
22595 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
22596 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
22597 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
22598 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
22599 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
22600 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
22601 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
22602 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
22603 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
22604 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
22605 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
22606 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
22607 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
22608 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
22609 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
22610 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
22611 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
22612 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
22613 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
22614 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
22615 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
22616 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
22617 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
22618 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
22619 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
22620 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
22621 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
22622 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
22623 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
22624 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
22625 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
22626 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
22627 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
22628 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
22629 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
22630 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
22631 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
22632 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
22633 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
22634 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
22635 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
22636 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
22637 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
22638 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
22639 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
22640 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
22641 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
22642 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
22643 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
22644 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
22645 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
22646 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
22647 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
22648 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
22649 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
22650 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
22651 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
22652 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
22653 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
22654 .ilen = 496,
22655 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22656 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22657 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22658 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22659 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22660 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22661 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22662 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22663 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22664 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22665 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22666 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22667 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22668 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22669 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22670 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22671 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22672 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22673 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22674 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22675 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22676 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22677 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22678 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22679 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22680 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22681 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22682 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22683 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22684 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22685 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22686 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22687 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22688 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22689 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22690 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22691 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22692 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22693 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22694 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22695 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22696 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22697 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22698 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22699 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22700 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22701 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22702 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22703 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22704 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22705 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22706 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22707 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22708 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22709 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22710 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22711 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22712 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22713 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22714 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22715 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22716 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22717 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022718 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022719 .np = 3,
22720 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022721 },
22722};
22723
22724static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
22725 { /* Generated from TF test vectors */
22726 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22727 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22728 .klen = 16,
22729 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22730 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22731 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22732 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22733 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22734 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22735 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22736 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22737 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22738 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22739 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22740 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22741 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22742 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22743 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22744 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22745 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22746 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22747 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22748 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22749 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22750 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22751 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22752 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22753 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22754 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22755 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22756 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22757 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22758 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22759 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22760 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22761 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22762 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22763 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22764 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22765 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22766 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22767 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22768 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22769 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22770 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22771 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22772 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22773 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22774 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22775 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22776 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22777 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22778 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22779 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22780 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22781 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22782 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22783 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22784 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22785 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22786 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22787 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22788 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22789 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22790 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22791 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22792 .ilen = 496,
22793 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
22794 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
22795 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
22796 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
22797 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
22798 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
22799 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
22800 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
22801 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
22802 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
22803 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
22804 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
22805 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
22806 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
22807 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
22808 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
22809 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
22810 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
22811 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
22812 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
22813 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
22814 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
22815 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
22816 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
22817 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
22818 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
22819 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
22820 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
22821 "\x90\x12\x37\x49\x27\x98\x69\x18"
22822 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
22823 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
22824 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
22825 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
22826 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
22827 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
22828 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
22829 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
22830 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
22831 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
22832 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
22833 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
22834 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
22835 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
22836 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
22837 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
22838 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
22839 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
22840 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
22841 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
22842 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
22843 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
22844 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
22845 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
22846 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
22847 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
22848 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
22849 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
22850 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
22851 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
22852 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
22853 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
22854 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
22855 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022856 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022857 .np = 3,
22858 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022859 },
22860};
22861
22862static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
22863 { /* Generated from TF test vectors */
22864 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22865 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22866 .klen = 16,
22867 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22868 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
22869 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
22870 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
22871 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
22872 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
22873 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
22874 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
22875 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
22876 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
22877 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
22878 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
22879 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
22880 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
22881 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
22882 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
22883 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
22884 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
22885 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
22886 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
22887 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
22888 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
22889 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
22890 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
22891 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
22892 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
22893 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
22894 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
22895 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
22896 "\x90\x12\x37\x49\x27\x98\x69\x18"
22897 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
22898 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
22899 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
22900 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
22901 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
22902 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
22903 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
22904 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
22905 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
22906 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
22907 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
22908 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
22909 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
22910 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
22911 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
22912 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
22913 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
22914 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
22915 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
22916 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
22917 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
22918 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
22919 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
22920 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
22921 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
22922 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
22923 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
22924 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
22925 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
22926 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
22927 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
22928 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
22929 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
22930 .ilen = 496,
22931 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22932 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22933 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22934 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22935 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22936 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22937 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22938 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22939 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22940 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22941 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22942 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22943 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22944 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22945 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22946 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22947 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22948 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22949 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22950 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22951 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22952 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22953 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22954 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22955 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22956 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22957 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22958 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22959 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22960 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22961 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22962 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22963 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22964 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22965 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22966 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22967 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22968 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22969 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22970 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22971 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22972 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22973 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22974 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22975 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22976 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22977 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22978 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22979 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22980 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22981 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22982 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22983 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22984 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22985 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22986 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22987 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22988 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22989 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22990 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22991 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22992 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22993 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022994 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022995 .np = 3,
22996 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022997 },
22998};
22999
23000static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
23001 { /* Generated from TF test vectors */
23002 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23003 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23004 .klen = 16,
23005 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23006 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23007 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023008 "\x3A",
23009 .ilen = 17,
23010 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23011 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23012 "\x0C",
23013 .rlen = 17,
23014 }, { /* Generated from TF test vectors */
23015 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23016 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23017 .klen = 16,
23018 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23019 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23020 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023021 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23022 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23023 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23024 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23025 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23026 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23027 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23028 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23029 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23030 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23031 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23032 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23033 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23034 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23035 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23036 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23037 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23038 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23039 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23040 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23041 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23042 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23043 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23044 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23045 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23046 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23047 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23048 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23049 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23050 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23051 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23052 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23053 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23054 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23055 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23056 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23057 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23058 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23059 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23060 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23061 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23062 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23063 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23064 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23065 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23066 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23067 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23068 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23069 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23070 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23071 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23072 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23073 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23074 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23075 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23076 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23077 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23078 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23079 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23080 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23081 .ilen = 496,
23082 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23083 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23084 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
23085 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
23086 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
23087 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
23088 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
23089 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
23090 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
23091 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
23092 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
23093 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
23094 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
23095 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
23096 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
23097 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
23098 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
23099 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
23100 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
23101 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
23102 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
23103 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
23104 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
23105 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
23106 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
23107 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
23108 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
23109 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
23110 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
23111 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
23112 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
23113 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
23114 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
23115 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
23116 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
23117 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
23118 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
23119 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
23120 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
23121 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
23122 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
23123 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
23124 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
23125 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
23126 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
23127 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
23128 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
23129 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
23130 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
23131 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
23132 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
23133 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
23134 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
23135 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
23136 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
23137 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
23138 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
23139 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
23140 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
23141 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
23142 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23143 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23144 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023145 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023146 .np = 3,
23147 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023148 },
23149};
23150
23151static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
23152 { /* Generated from TF test vectors */
23153 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23154 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23155 .klen = 16,
23156 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23157 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23158 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023159 "\x0C",
23160 .ilen = 17,
23161 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23162 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23163 "\x3A",
23164 .rlen = 17,
23165 }, { /* Generated from TF test vectors */
23166 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23167 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23168 .klen = 16,
23169 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23170 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23171 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023172 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
23173 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
23174 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
23175 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
23176 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
23177 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
23178 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
23179 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
23180 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
23181 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
23182 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
23183 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
23184 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
23185 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
23186 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
23187 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
23188 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
23189 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
23190 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
23191 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
23192 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
23193 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
23194 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
23195 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
23196 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
23197 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
23198 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
23199 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
23200 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
23201 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
23202 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
23203 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
23204 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
23205 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
23206 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
23207 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
23208 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
23209 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
23210 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
23211 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
23212 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
23213 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
23214 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
23215 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
23216 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
23217 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
23218 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
23219 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
23220 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
23221 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
23222 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
23223 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
23224 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
23225 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
23226 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
23227 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
23228 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
23229 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
23230 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23231 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23232 .ilen = 496,
23233 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23234 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23235 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23236 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23237 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23238 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23239 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23240 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23241 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23242 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23243 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23244 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23245 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23246 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23247 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23248 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23249 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23250 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23251 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23252 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23253 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23254 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23255 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23256 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23257 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23258 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23259 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23260 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23261 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23262 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23263 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23264 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23265 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23266 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23267 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23268 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23269 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23270 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23271 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23272 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23273 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23274 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23275 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23276 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23277 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23278 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23279 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23280 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23281 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23282 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23283 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23284 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23285 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23286 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23287 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23288 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23289 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23290 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23291 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23292 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23293 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23294 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23295 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023296 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023297 .np = 3,
23298 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023299 },
23300};
23301
23302/*
23303 * ARC4 test vectors from OpenSSL
23304 */
23305#define ARC4_ENC_TEST_VECTORS 7
23306#define ARC4_DEC_TEST_VECTORS 7
23307
23308static struct cipher_testvec arc4_enc_tv_template[] = {
23309 {
23310 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23311 .klen = 8,
23312 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23313 .ilen = 8,
23314 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
23315 .rlen = 8,
23316 }, {
23317 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23318 .klen = 8,
23319 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23320 .ilen = 8,
23321 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
23322 .rlen = 8,
23323 }, {
23324 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
23325 .klen = 8,
23326 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23327 .ilen = 8,
23328 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
23329 .rlen = 8,
23330 }, {
23331 .key = "\xef\x01\x23\x45",
23332 .klen = 4,
23333 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23334 "\x00\x00\x00\x00\x00\x00\x00\x00"
23335 "\x00\x00\x00\x00",
23336 .ilen = 20,
23337 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23338 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
23339 "\x36\xb6\x78\x58",
23340 .rlen = 20,
23341 }, {
23342 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23343 .klen = 8,
23344 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23345 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23346 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23347 "\x12\x34\x56\x78",
23348 .ilen = 28,
23349 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
23350 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
23351 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
23352 "\x40\x01\x1e\xcf",
23353 .rlen = 28,
23354 }, {
23355 .key = "\xef\x01\x23\x45",
23356 .klen = 4,
23357 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23358 "\x00\x00",
23359 .ilen = 10,
23360 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23361 "\xbd\x61",
23362 .rlen = 10,
23363 }, {
23364 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
23365 "\x00\x00\x00\x00\x00\x00\x00\x00",
23366 .klen = 16,
23367 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
23368 .ilen = 8,
23369 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
23370 .rlen = 8,
23371 },
23372};
23373
23374static struct cipher_testvec arc4_dec_tv_template[] = {
23375 {
23376 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23377 .klen = 8,
23378 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
23379 .ilen = 8,
23380 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23381 .rlen = 8,
23382 }, {
23383 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23384 .klen = 8,
23385 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
23386 .ilen = 8,
23387 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23388 .rlen = 8,
23389 }, {
23390 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
23391 .klen = 8,
23392 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
23393 .ilen = 8,
23394 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23395 .rlen = 8,
23396 }, {
23397 .key = "\xef\x01\x23\x45",
23398 .klen = 4,
23399 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23400 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
23401 "\x36\xb6\x78\x58",
23402 .ilen = 20,
23403 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
23404 "\x00\x00\x00\x00\x00\x00\x00\x00"
23405 "\x00\x00\x00\x00",
23406 .rlen = 20,
23407 }, {
23408 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23409 .klen = 8,
23410 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
23411 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
23412 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
23413 "\x40\x01\x1e\xcf",
23414 .ilen = 28,
23415 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23416 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23417 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23418 "\x12\x34\x56\x78",
23419 .rlen = 28,
23420 }, {
23421 .key = "\xef\x01\x23\x45",
23422 .klen = 4,
23423 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23424 "\xbd\x61",
23425 .ilen = 10,
23426 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
23427 "\x00\x00",
23428 .rlen = 10,
23429 }, {
23430 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
23431 "\x00\x00\x00\x00\x00\x00\x00\x00",
23432 .klen = 16,
23433 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
23434 .ilen = 8,
23435 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
23436 .rlen = 8,
23437 },
23438};
23439
23440/*
23441 * TEA test vectors
23442 */
23443#define TEA_ENC_TEST_VECTORS 4
23444#define TEA_DEC_TEST_VECTORS 4
23445
23446static struct cipher_testvec tea_enc_tv_template[] = {
23447 {
23448 .key = zeroed_string,
23449 .klen = 16,
23450 .input = zeroed_string,
23451 .ilen = 8,
23452 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
23453 .rlen = 8,
23454 }, {
23455 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23456 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23457 .klen = 16,
23458 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23459 .ilen = 8,
23460 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
23461 .rlen = 8,
23462 }, {
23463 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23464 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23465 .klen = 16,
23466 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23467 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23468 .ilen = 16,
23469 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
23470 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
23471 .rlen = 16,
23472 }, {
23473 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23474 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23475 .klen = 16,
23476 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23477 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23478 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23479 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23480 .ilen = 32,
23481 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
23482 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
23483 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
23484 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
23485 .rlen = 32,
23486 }
23487};
23488
23489static struct cipher_testvec tea_dec_tv_template[] = {
23490 {
23491 .key = zeroed_string,
23492 .klen = 16,
23493 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
23494 .ilen = 8,
23495 .result = zeroed_string,
23496 .rlen = 8,
23497 }, {
23498 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23499 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23500 .klen = 16,
23501 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
23502 .ilen = 8,
23503 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23504 .rlen = 8,
23505 }, {
23506 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23507 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23508 .klen = 16,
23509 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
23510 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
23511 .ilen = 16,
23512 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23513 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23514 .rlen = 16,
23515 }, {
23516 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23517 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23518 .klen = 16,
23519 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
23520 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
23521 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
23522 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
23523 .ilen = 32,
23524 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
23525 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23526 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23527 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23528 .rlen = 32,
23529 }
23530};
23531
23532/*
23533 * XTEA test vectors
23534 */
23535#define XTEA_ENC_TEST_VECTORS 4
23536#define XTEA_DEC_TEST_VECTORS 4
23537
23538static struct cipher_testvec xtea_enc_tv_template[] = {
23539 {
23540 .key = zeroed_string,
23541 .klen = 16,
23542 .input = zeroed_string,
23543 .ilen = 8,
23544 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
23545 .rlen = 8,
23546 }, {
23547 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23548 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23549 .klen = 16,
23550 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23551 .ilen = 8,
23552 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
23553 .rlen = 8,
23554 }, {
23555 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23556 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23557 .klen = 16,
23558 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23559 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23560 .ilen = 16,
23561 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
23562 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
23563 .rlen = 16,
23564 }, {
23565 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23566 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23567 .klen = 16,
23568 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23569 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23570 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23571 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23572 .ilen = 32,
23573 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
23574 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
23575 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
23576 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
23577 .rlen = 32,
23578 }
23579};
23580
23581static struct cipher_testvec xtea_dec_tv_template[] = {
23582 {
23583 .key = zeroed_string,
23584 .klen = 16,
23585 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
23586 .ilen = 8,
23587 .result = zeroed_string,
23588 .rlen = 8,
23589 }, {
23590 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23591 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23592 .klen = 16,
23593 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
23594 .ilen = 8,
23595 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23596 .rlen = 8,
23597 }, {
23598 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23599 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23600 .klen = 16,
23601 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
23602 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
23603 .ilen = 16,
23604 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23605 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23606 .rlen = 16,
23607 }, {
23608 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23609 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23610 .klen = 16,
23611 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
23612 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
23613 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
23614 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
23615 .ilen = 32,
23616 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
23617 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23618 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23619 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23620 .rlen = 32,
23621 }
23622};
23623
23624/*
23625 * KHAZAD test vectors.
23626 */
23627#define KHAZAD_ENC_TEST_VECTORS 5
23628#define KHAZAD_DEC_TEST_VECTORS 5
23629
23630static struct cipher_testvec khazad_enc_tv_template[] = {
23631 {
23632 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
23633 "\x00\x00\x00\x00\x00\x00\x00\x00",
23634 .klen = 16,
23635 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23636 .ilen = 8,
23637 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
23638 .rlen = 8,
23639 }, {
23640 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
23641 "\x38\x38\x38\x38\x38\x38\x38\x38",
23642 .klen = 16,
23643 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
23644 .ilen = 8,
23645 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
23646 .rlen = 8,
23647 }, {
23648 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
23649 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23650 .klen = 16,
23651 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23652 .ilen = 8,
23653 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
23654 .rlen = 8,
23655 }, {
23656 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23657 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23658 .klen = 16,
23659 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23660 .ilen = 8,
23661 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23662 .rlen = 8,
23663 }, {
23664 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23665 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23666 .klen = 16,
23667 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23668 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23669 .ilen = 16,
23670 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
23671 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23672 .rlen = 16,
23673 },
23674};
23675
23676static struct cipher_testvec khazad_dec_tv_template[] = {
23677 {
23678 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
23679 "\x00\x00\x00\x00\x00\x00\x00\x00",
23680 .klen = 16,
23681 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
23682 .ilen = 8,
23683 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23684 .rlen = 8,
23685 }, {
23686 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
23687 "\x38\x38\x38\x38\x38\x38\x38\x38",
23688 .klen = 16,
23689 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
23690 .ilen = 8,
23691 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
23692 .rlen = 8,
23693 }, {
23694 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
23695 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23696 .klen = 16,
23697 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
23698 .ilen = 8,
23699 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23700 .rlen = 8,
23701 }, {
23702 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23703 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23704 .klen = 16,
23705 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23706 .ilen = 8,
23707 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23708 .rlen = 8,
23709 }, {
23710 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23711 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23712 .klen = 16,
23713 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
23714 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23715 .ilen = 16,
23716 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23717 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23718 .rlen = 16,
23719 },
23720};
23721
23722/*
23723 * Anubis test vectors.
23724 */
23725
23726#define ANUBIS_ENC_TEST_VECTORS 5
23727#define ANUBIS_DEC_TEST_VECTORS 5
23728#define ANUBIS_CBC_ENC_TEST_VECTORS 2
23729#define ANUBIS_CBC_DEC_TEST_VECTORS 2
23730
23731static struct cipher_testvec anubis_enc_tv_template[] = {
23732 {
23733 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23734 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23735 .klen = 16,
23736 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23737 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23738 .ilen = 16,
23739 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23740 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
23741 .rlen = 16,
23742 }, {
23743
23744 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
23745 "\x03\x03\x03\x03\x03\x03\x03\x03"
23746 "\x03\x03\x03\x03",
23747 .klen = 20,
23748 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
23749 "\x03\x03\x03\x03\x03\x03\x03\x03",
23750 .ilen = 16,
23751 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
23752 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
23753 .rlen = 16,
23754 }, {
23755 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
23756 "\x24\x24\x24\x24\x24\x24\x24\x24"
23757 "\x24\x24\x24\x24\x24\x24\x24\x24"
23758 "\x24\x24\x24\x24",
23759 .klen = 28,
23760 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
23761 "\x24\x24\x24\x24\x24\x24\x24\x24",
23762 .ilen = 16,
23763 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
23764 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
23765 .rlen = 16,
23766 }, {
23767 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
23768 "\x25\x25\x25\x25\x25\x25\x25\x25"
23769 "\x25\x25\x25\x25\x25\x25\x25\x25"
23770 "\x25\x25\x25\x25\x25\x25\x25\x25",
23771 .klen = 32,
23772 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
23773 "\x25\x25\x25\x25\x25\x25\x25\x25",
23774 .ilen = 16,
23775 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
23776 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
23777 .rlen = 16,
23778 }, {
23779 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23780 "\x35\x35\x35\x35\x35\x35\x35\x35"
23781 "\x35\x35\x35\x35\x35\x35\x35\x35"
23782 "\x35\x35\x35\x35\x35\x35\x35\x35"
23783 "\x35\x35\x35\x35\x35\x35\x35\x35",
23784 .klen = 40,
23785 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
23786 "\x35\x35\x35\x35\x35\x35\x35\x35",
23787 .ilen = 16,
23788 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23789 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
23790 .rlen = 16,
23791 },
23792};
23793
23794static struct cipher_testvec anubis_dec_tv_template[] = {
23795 {
23796 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23797 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23798 .klen = 16,
23799 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23800 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
23801 .ilen = 16,
23802 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23803 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23804 .rlen = 16,
23805 }, {
23806
23807 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
23808 "\x03\x03\x03\x03\x03\x03\x03\x03"
23809 "\x03\x03\x03\x03",
23810 .klen = 20,
23811 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
23812 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
23813 .ilen = 16,
23814 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
23815 "\x03\x03\x03\x03\x03\x03\x03\x03",
23816 .rlen = 16,
23817 }, {
23818 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
23819 "\x24\x24\x24\x24\x24\x24\x24\x24"
23820 "\x24\x24\x24\x24\x24\x24\x24\x24"
23821 "\x24\x24\x24\x24",
23822 .klen = 28,
23823 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
23824 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
23825 .ilen = 16,
23826 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
23827 "\x24\x24\x24\x24\x24\x24\x24\x24",
23828 .rlen = 16,
23829 }, {
23830 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
23831 "\x25\x25\x25\x25\x25\x25\x25\x25"
23832 "\x25\x25\x25\x25\x25\x25\x25\x25"
23833 "\x25\x25\x25\x25\x25\x25\x25\x25",
23834 .klen = 32,
23835 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
23836 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
23837 .ilen = 16,
23838 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
23839 "\x25\x25\x25\x25\x25\x25\x25\x25",
23840 .rlen = 16,
23841 }, {
23842 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23843 "\x35\x35\x35\x35\x35\x35\x35\x35"
23844 "\x35\x35\x35\x35\x35\x35\x35\x35"
23845 "\x35\x35\x35\x35\x35\x35\x35\x35"
23846 "\x35\x35\x35\x35\x35\x35\x35\x35",
23847 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23848 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
23849 .klen = 40,
23850 .ilen = 16,
23851 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
23852 "\x35\x35\x35\x35\x35\x35\x35\x35",
23853 .rlen = 16,
23854 },
23855};
23856
23857static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
23858 {
23859 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23860 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23861 .klen = 16,
23862 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23863 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23864 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23865 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23866 .ilen = 32,
23867 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23868 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
23869 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
23870 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
23871 .rlen = 32,
23872 }, {
23873 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23874 "\x35\x35\x35\x35\x35\x35\x35\x35"
23875 "\x35\x35\x35\x35\x35\x35\x35\x35"
23876 "\x35\x35\x35\x35\x35\x35\x35\x35"
23877 "\x35\x35\x35\x35\x35\x35\x35\x35",
23878 .klen = 40,
23879 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
23880 "\x35\x35\x35\x35\x35\x35\x35\x35"
23881 "\x35\x35\x35\x35\x35\x35\x35\x35"
23882 "\x35\x35\x35\x35\x35\x35\x35\x35",
23883 .ilen = 32,
23884 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23885 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
23886 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
23887 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
23888 .rlen = 32,
23889 },
23890};
23891
23892static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
23893 {
23894 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23895 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23896 .klen = 16,
23897 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23898 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
23899 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
23900 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
23901 .ilen = 32,
23902 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23903 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23904 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23905 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23906 .rlen = 32,
23907 }, {
23908 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23909 "\x35\x35\x35\x35\x35\x35\x35\x35"
23910 "\x35\x35\x35\x35\x35\x35\x35\x35"
23911 "\x35\x35\x35\x35\x35\x35\x35\x35"
23912 "\x35\x35\x35\x35\x35\x35\x35\x35",
23913 .klen = 40,
23914 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23915 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
23916 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
23917 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
23918 .ilen = 32,
23919 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
23920 "\x35\x35\x35\x35\x35\x35\x35\x35"
23921 "\x35\x35\x35\x35\x35\x35\x35\x35"
23922 "\x35\x35\x35\x35\x35\x35\x35\x35",
23923 .rlen = 32,
23924 },
23925};
23926
23927/*
23928 * XETA test vectors
23929 */
23930#define XETA_ENC_TEST_VECTORS 4
23931#define XETA_DEC_TEST_VECTORS 4
23932
23933static struct cipher_testvec xeta_enc_tv_template[] = {
23934 {
23935 .key = zeroed_string,
23936 .klen = 16,
23937 .input = zeroed_string,
23938 .ilen = 8,
23939 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
23940 .rlen = 8,
23941 }, {
23942 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23943 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23944 .klen = 16,
23945 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23946 .ilen = 8,
23947 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
23948 .rlen = 8,
23949 }, {
23950 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23951 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23952 .klen = 16,
23953 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23954 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23955 .ilen = 16,
23956 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
23957 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
23958 .rlen = 16,
23959 }, {
23960 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23961 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23962 .klen = 16,
23963 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23964 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23965 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23966 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23967 .ilen = 32,
23968 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
23969 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
23970 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
23971 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
23972 .rlen = 32,
23973 }
23974};
23975
23976static struct cipher_testvec xeta_dec_tv_template[] = {
23977 {
23978 .key = zeroed_string,
23979 .klen = 16,
23980 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
23981 .ilen = 8,
23982 .result = zeroed_string,
23983 .rlen = 8,
23984 }, {
23985 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23986 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23987 .klen = 16,
23988 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
23989 .ilen = 8,
23990 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23991 .rlen = 8,
23992 }, {
23993 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23994 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23995 .klen = 16,
23996 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
23997 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
23998 .ilen = 16,
23999 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24000 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24001 .rlen = 16,
24002 }, {
24003 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24004 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24005 .klen = 16,
24006 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
24007 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
24008 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
24009 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
24010 .ilen = 32,
24011 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24012 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24013 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24014 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24015 .rlen = 32,
24016 }
24017};
24018
24019/*
24020 * FCrypt test vectors
24021 */
24022#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
24023#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
24024
24025static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
24026 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24027 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24028 .klen = 8,
24029 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24030 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24031 .ilen = 8,
24032 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24033 .rlen = 8,
24034 }, {
24035 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24036 .klen = 8,
24037 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24038 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24039 .ilen = 8,
24040 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24041 .rlen = 8,
24042 }, { /* From Arla */
24043 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24044 .klen = 8,
24045 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24046 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24047 .ilen = 48,
24048 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24049 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24050 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24051 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24052 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24053 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24054 .rlen = 48,
24055 }, {
24056 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24057 .klen = 8,
24058 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24059 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24060 .ilen = 48,
24061 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24062 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24063 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24064 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24065 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24066 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24067 .rlen = 48,
24068 }, { /* split-page version */
24069 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24070 .klen = 8,
24071 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24072 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24073 .ilen = 48,
24074 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24075 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24076 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24077 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24078 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24079 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24080 .rlen = 48,
24081 .np = 2,
24082 .tap = { 20, 28 },
24083 }
24084};
24085
24086static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
24087 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24088 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24089 .klen = 8,
24090 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24091 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24092 .ilen = 8,
24093 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24094 .rlen = 8,
24095 }, {
24096 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24097 .klen = 8,
24098 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24099 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24100 .ilen = 8,
24101 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24102 .rlen = 8,
24103 }, { /* From Arla */
24104 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24105 .klen = 8,
24106 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24107 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24108 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24109 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24110 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24111 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24112 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24113 .ilen = 48,
24114 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24115 .rlen = 48,
24116 }, {
24117 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24118 .klen = 8,
24119 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24120 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24121 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24122 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24123 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24124 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24125 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24126 .ilen = 48,
24127 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24128 .rlen = 48,
24129 }, { /* split-page version */
24130 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24131 .klen = 8,
24132 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24133 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24134 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24135 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24136 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24137 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24138 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24139 .ilen = 48,
24140 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24141 .rlen = 48,
24142 .np = 2,
24143 .tap = { 20, 28 },
24144 }
24145};
24146
24147/*
24148 * CAMELLIA test vectors.
24149 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024150#define CAMELLIA_ENC_TEST_VECTORS 4
24151#define CAMELLIA_DEC_TEST_VECTORS 4
24152#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
24153#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
24154#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
24155#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
24156#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
24157#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
24158#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
24159#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080024160
24161static struct cipher_testvec camellia_enc_tv_template[] = {
24162 {
24163 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24164 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24165 .klen = 16,
24166 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24167 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24168 .ilen = 16,
24169 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
24170 "\x08\x57\x06\x56\x48\xea\xbe\x43",
24171 .rlen = 16,
24172 }, {
24173 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24174 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24175 "\x00\x11\x22\x33\x44\x55\x66\x77",
24176 .klen = 24,
24177 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24178 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24179 .ilen = 16,
24180 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
24181 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
24182 .rlen = 16,
24183 }, {
24184 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24185 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24186 "\x00\x11\x22\x33\x44\x55\x66\x77"
24187 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
24188 .klen = 32,
24189 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24190 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24191 .ilen = 16,
24192 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
24193 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
24194 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024195 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024196 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
24197 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
24198 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
24199 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
24200 .klen = 32,
24201 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24202 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24203 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24204 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24205 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024206 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24207 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24208 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24209 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24210 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24211 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24212 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24213 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24214 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24215 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24216 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24217 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24218 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24219 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24220 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24221 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24222 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24223 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24224 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24225 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24226 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24227 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24228 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24229 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24230 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24231 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24232 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24233 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24234 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24235 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24236 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24237 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24238 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24239 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24240 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24241 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24242 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24243 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24244 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24245 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24246 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24247 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24248 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24249 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24250 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24251 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24252 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24253 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24254 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24255 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24256 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24257 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24258 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24259 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24260 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24261 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024262 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24263 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24264 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24265 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24266 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24267 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24268 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24269 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24270 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24271 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24272 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24273 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24274 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24275 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24276 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24277 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24278 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24279 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24280 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24281 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24282 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24283 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24284 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24285 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24286 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24287 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24288 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24289 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24290 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24291 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24292 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24293 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24294 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24295 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24296 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24297 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24298 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24299 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24300 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24301 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24302 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24303 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24304 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24305 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24306 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24307 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24308 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24309 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24310 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24311 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24312 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24313 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24314 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24315 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24316 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24317 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24318 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24319 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24320 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24321 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24322 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24323 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24324 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24325 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24326 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24327 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024328 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
24329 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
24330 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
24331 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
24332 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024333 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
24334 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
24335 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
24336 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
24337 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
24338 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
24339 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
24340 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
24341 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
24342 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
24343 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
24344 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
24345 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
24346 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
24347 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
24348 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
24349 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
24350 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
24351 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
24352 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
24353 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
24354 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
24355 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
24356 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
24357 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
24358 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
24359 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
24360 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
24361 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
24362 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
24363 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
24364 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
24365 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
24366 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
24367 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
24368 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
24369 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
24370 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
24371 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
24372 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
24373 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
24374 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
24375 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
24376 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
24377 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
24378 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
24379 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
24380 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
24381 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
24382 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
24383 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
24384 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
24385 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
24386 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
24387 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
24388 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024389 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
24390 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
24391 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
24392 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
24393 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
24394 "\xED\x28\x39\xE9\x63\xED\x41\x70"
24395 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
24396 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
24397 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
24398 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
24399 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
24400 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
24401 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
24402 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
24403 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
24404 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
24405 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
24406 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
24407 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
24408 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
24409 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
24410 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
24411 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
24412 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
24413 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
24414 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
24415 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
24416 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
24417 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
24418 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
24419 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
24420 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
24421 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
24422 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
24423 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
24424 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
24425 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
24426 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
24427 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
24428 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
24429 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
24430 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
24431 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
24432 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
24433 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
24434 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
24435 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
24436 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
24437 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
24438 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
24439 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
24440 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
24441 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
24442 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
24443 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
24444 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
24445 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
24446 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
24447 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
24448 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
24449 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
24450 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
24451 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
24452 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
24453 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
24454 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024455 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024456 .np = 3,
24457 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024458 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024459};
24460
24461static struct cipher_testvec camellia_dec_tv_template[] = {
24462 {
24463 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24464 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24465 .klen = 16,
24466 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
24467 "\x08\x57\x06\x56\x48\xea\xbe\x43",
24468 .ilen = 16,
24469 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24470 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24471 .rlen = 16,
24472 }, {
24473 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24474 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24475 "\x00\x11\x22\x33\x44\x55\x66\x77",
24476 .klen = 24,
24477 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
24478 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
24479 .ilen = 16,
24480 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24481 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24482 .rlen = 16,
24483 }, {
24484 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24485 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24486 "\x00\x11\x22\x33\x44\x55\x66\x77"
24487 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
24488 .klen = 32,
24489 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
24490 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
24491 .ilen = 16,
24492 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24493 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24494 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024495 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024496 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
24497 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
24498 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
24499 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
24500 .klen = 32,
24501 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
24502 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
24503 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
24504 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
24505 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024506 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
24507 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
24508 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
24509 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
24510 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
24511 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
24512 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
24513 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
24514 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
24515 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
24516 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
24517 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
24518 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
24519 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
24520 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
24521 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
24522 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
24523 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
24524 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
24525 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
24526 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
24527 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
24528 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
24529 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
24530 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
24531 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
24532 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
24533 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
24534 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
24535 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
24536 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
24537 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
24538 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
24539 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
24540 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
24541 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
24542 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
24543 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
24544 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
24545 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
24546 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
24547 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
24548 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
24549 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
24550 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
24551 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
24552 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
24553 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
24554 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
24555 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
24556 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
24557 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
24558 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
24559 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
24560 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
24561 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024562 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
24563 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
24564 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
24565 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
24566 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
24567 "\xED\x28\x39\xE9\x63\xED\x41\x70"
24568 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
24569 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
24570 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
24571 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
24572 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
24573 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
24574 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
24575 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
24576 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
24577 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
24578 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
24579 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
24580 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
24581 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
24582 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
24583 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
24584 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
24585 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
24586 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
24587 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
24588 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
24589 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
24590 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
24591 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
24592 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
24593 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
24594 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
24595 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
24596 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
24597 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
24598 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
24599 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
24600 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
24601 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
24602 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
24603 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
24604 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
24605 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
24606 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
24607 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
24608 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
24609 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
24610 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
24611 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
24612 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
24613 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
24614 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
24615 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
24616 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
24617 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
24618 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
24619 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
24620 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
24621 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
24622 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
24623 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
24624 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
24625 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
24626 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
24627 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024628 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24629 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24630 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24631 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24632 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024633 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24634 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24635 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24636 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24637 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24638 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24639 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24640 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24641 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24642 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24643 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24644 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24645 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24646 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24647 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24648 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24649 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24650 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24651 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24652 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24653 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24654 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24655 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24656 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24657 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24658 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24659 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24660 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24661 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24662 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24663 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24664 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24665 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24666 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24667 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24668 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24669 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24670 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24671 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24672 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24673 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24674 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24675 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24676 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24677 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24678 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24679 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24680 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24681 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24682 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24683 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24684 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24685 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24686 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24687 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24688 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024689 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24690 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24691 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24692 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24693 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24694 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24695 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24696 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24697 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24698 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24699 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24700 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24701 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24702 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24703 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24704 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24705 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24706 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24707 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24708 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24709 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24710 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24711 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24712 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24713 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24714 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24715 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24716 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24717 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24718 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24719 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24720 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24721 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24722 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24723 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24724 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24725 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24726 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24727 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24728 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24729 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24730 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24731 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24732 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24733 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24734 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24735 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24736 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24737 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24738 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24739 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24740 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24741 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24742 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24743 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24744 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24745 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24746 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24747 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24748 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24749 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24750 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24751 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24752 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24753 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24754 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024755 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024756 .np = 3,
24757 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024758 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024759};
24760
24761static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
24762 {
24763 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
24764 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
24765 .klen = 16,
24766 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
24767 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
24768 .input = "Single block msg",
24769 .ilen = 16,
24770 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
24771 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
24772 .rlen = 16,
24773 }, {
24774 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
24775 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
24776 .klen = 16,
24777 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
24778 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
24779 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
24780 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24781 "\x10\x11\x12\x13\x14\x15\x16\x17"
24782 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
24783 .ilen = 32,
24784 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
24785 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
24786 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
24787 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
24788 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024789 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024790 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24791 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
24792 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
24793 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
24794 .klen = 32,
24795 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
24796 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
24797 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24798 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24799 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24800 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24801 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024802 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24803 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24804 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24805 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24806 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24807 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24808 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24809 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24810 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24811 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24812 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24813 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24814 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24815 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24816 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24817 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24818 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24819 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24820 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24821 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24822 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24823 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24824 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24825 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24826 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24827 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24828 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24829 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24830 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24831 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24832 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24833 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24834 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24835 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24836 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24837 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24838 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24839 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24840 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24841 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24842 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24843 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24844 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24845 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24846 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24847 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24848 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24849 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24850 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24851 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24852 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24853 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24854 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24855 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24856 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24857 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024858 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24859 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24860 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24861 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24862 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24863 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24864 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24865 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24866 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24867 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24868 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24869 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24870 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24871 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24872 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24873 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24874 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24875 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24876 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24877 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24878 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24879 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24880 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24881 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24882 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24883 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24884 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24885 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24886 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24887 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24888 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24889 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24890 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24891 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24892 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24893 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24894 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24895 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24896 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24897 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24898 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24899 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24900 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24901 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24902 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24903 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24904 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24905 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24906 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24907 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24908 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24909 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24910 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24911 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24912 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24913 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24914 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24915 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24916 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24917 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24918 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24919 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24920 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24921 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24922 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24923 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024924 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
24925 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
24926 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
24927 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
24928 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024929 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
24930 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
24931 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
24932 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
24933 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
24934 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
24935 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
24936 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
24937 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
24938 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
24939 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
24940 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
24941 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
24942 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
24943 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
24944 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
24945 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
24946 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
24947 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
24948 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
24949 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
24950 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
24951 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
24952 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
24953 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
24954 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
24955 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
24956 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
24957 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
24958 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
24959 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
24960 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
24961 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
24962 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
24963 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
24964 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
24965 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
24966 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
24967 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
24968 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
24969 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
24970 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
24971 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
24972 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
24973 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
24974 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
24975 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
24976 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
24977 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
24978 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
24979 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
24980 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
24981 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
24982 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
24983 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
24984 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024985 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
24986 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
24987 "\x21\x41\x56\x72\x13\xE1\x86\x07"
24988 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
24989 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
24990 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
24991 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
24992 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
24993 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
24994 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
24995 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
24996 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
24997 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
24998 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
24999 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
25000 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
25001 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
25002 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
25003 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
25004 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
25005 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
25006 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
25007 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
25008 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
25009 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
25010 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
25011 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
25012 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
25013 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
25014 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
25015 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
25016 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
25017 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
25018 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
25019 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
25020 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
25021 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
25022 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
25023 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
25024 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
25025 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
25026 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
25027 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
25028 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
25029 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
25030 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
25031 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
25032 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
25033 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
25034 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
25035 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
25036 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
25037 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
25038 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
25039 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
25040 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
25041 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
25042 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
25043 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
25044 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
25045 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
25046 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
25047 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
25048 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
25049 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
25050 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025051 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025052 .np = 3,
25053 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025054 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025055};
25056
25057static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
25058 {
25059 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25060 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25061 .klen = 16,
25062 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25063 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25064 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25065 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25066 .ilen = 16,
25067 .result = "Single block msg",
25068 .rlen = 16,
25069 }, {
25070 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25071 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25072 .klen = 16,
25073 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25074 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25075 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25076 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25077 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25078 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25079 .ilen = 32,
25080 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
25081 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25082 "\x10\x11\x12\x13\x14\x15\x16\x17"
25083 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25084 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025085 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025086 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25087 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25088 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25089 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25090 .klen = 32,
25091 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25092 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25093 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
25094 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
25095 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
25096 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
25097 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025098 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
25099 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
25100 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
25101 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
25102 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
25103 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
25104 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
25105 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
25106 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
25107 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
25108 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
25109 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
25110 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
25111 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
25112 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
25113 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
25114 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
25115 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
25116 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
25117 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
25118 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
25119 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
25120 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
25121 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
25122 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
25123 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
25124 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
25125 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
25126 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
25127 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
25128 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
25129 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
25130 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
25131 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
25132 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
25133 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
25134 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
25135 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
25136 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
25137 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
25138 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
25139 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
25140 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
25141 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
25142 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
25143 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
25144 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
25145 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
25146 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
25147 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
25148 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
25149 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
25150 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
25151 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
25152 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
25153 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025154 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
25155 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
25156 "\x21\x41\x56\x72\x13\xE1\x86\x07"
25157 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
25158 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
25159 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
25160 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
25161 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
25162 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
25163 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
25164 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
25165 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
25166 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
25167 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
25168 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
25169 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
25170 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
25171 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
25172 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
25173 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
25174 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
25175 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
25176 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
25177 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
25178 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
25179 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
25180 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
25181 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
25182 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
25183 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
25184 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
25185 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
25186 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
25187 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
25188 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
25189 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
25190 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
25191 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
25192 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
25193 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
25194 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
25195 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
25196 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
25197 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
25198 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
25199 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
25200 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
25201 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
25202 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
25203 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
25204 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
25205 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
25206 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
25207 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
25208 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
25209 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
25210 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
25211 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
25212 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
25213 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
25214 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
25215 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
25216 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
25217 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
25218 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
25219 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025220 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25221 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25222 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25223 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25224 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025225 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25226 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25227 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25228 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25229 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25230 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25231 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25232 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25233 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25234 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25235 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25236 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25237 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25238 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25239 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25240 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25241 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25242 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25243 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25244 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25245 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25246 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25247 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25248 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25249 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25250 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25251 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25252 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25253 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25254 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25255 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25256 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25257 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25258 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25259 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25260 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25261 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25262 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25263 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25264 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25265 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25266 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25267 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25268 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25269 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25270 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25271 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25272 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25273 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25274 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25275 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25276 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25277 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25278 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25279 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25280 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025281 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25282 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25283 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25284 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25285 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25286 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25287 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25288 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25289 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25290 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25291 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25292 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25293 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25294 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25295 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25296 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25297 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25298 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25299 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25300 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25301 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25302 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25303 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25304 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25305 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25306 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25307 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25308 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25309 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25310 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25311 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25312 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25313 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25314 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25315 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25316 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25317 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25318 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25319 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25320 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25321 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25322 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25323 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25324 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25325 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25326 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25327 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25328 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25329 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25330 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25331 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25332 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25333 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25334 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25335 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25336 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25337 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25338 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25339 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25340 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25341 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25342 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25343 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25344 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25345 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25346 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025347 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025348 .np = 3,
25349 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025350 },
25351};
25352
25353static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
25354 { /* Generated with Crypto++ */
25355 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25356 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25357 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25358 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25359 .klen = 32,
25360 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25361 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25362 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25363 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25364 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25365 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25366 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025367 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25368 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25369 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25370 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25371 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25372 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25373 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25374 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25375 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25376 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25377 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25378 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25379 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25380 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25381 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25382 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25383 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25384 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25385 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25386 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25387 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25388 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25389 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25390 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25391 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25392 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25393 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25394 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25395 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25396 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25397 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25398 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25399 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25400 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25401 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25402 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25403 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25404 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25405 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25406 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25407 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25408 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25409 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25410 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25411 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25412 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25413 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25414 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25415 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25416 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25417 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25418 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25419 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25420 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25421 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25422 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25423 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25424 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025425 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
25426 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
25427 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
25428 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
25429 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025430 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
25431 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
25432 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
25433 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
25434 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
25435 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
25436 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
25437 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
25438 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
25439 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
25440 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
25441 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
25442 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
25443 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
25444 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
25445 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
25446 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
25447 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
25448 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
25449 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
25450 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
25451 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
25452 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
25453 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
25454 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
25455 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
25456 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
25457 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
25458 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
25459 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
25460 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
25461 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
25462 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
25463 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
25464 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
25465 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
25466 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
25467 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
25468 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
25469 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
25470 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
25471 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
25472 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
25473 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
25474 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
25475 "\x76\x44\x45\xF3\x24\x11\x57\x98"
25476 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
25477 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
25478 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
25479 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
25480 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
25481 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
25482 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
25483 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
25484 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
25485 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
25486 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
25487 .rlen = 496,
25488 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025489 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25490 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25491 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25492 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25493 .klen = 32,
25494 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25495 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25496 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25497 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25498 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25499 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25500 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25501 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025502 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25503 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25504 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25505 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25506 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25507 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25508 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25509 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25510 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25511 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25512 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25513 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25514 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25515 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25516 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25517 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25518 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25519 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25520 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25521 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25522 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25523 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25524 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25525 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25526 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25527 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25528 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25529 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25530 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25531 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25532 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25533 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25534 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25535 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25536 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25537 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25538 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25539 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25540 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25541 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25542 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25543 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25544 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25545 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25546 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25547 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25548 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25549 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25550 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25551 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25552 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25553 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25554 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25555 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25556 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25557 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025558 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25559 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25560 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25561 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25562 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25563 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25564 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25565 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25566 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25567 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25568 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25569 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25570 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25571 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25572 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25573 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25574 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25575 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25576 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25577 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25578 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25579 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25580 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25581 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25582 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25583 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25584 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25585 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25586 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25587 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25588 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25589 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25590 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25591 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25592 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25593 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25594 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25595 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25596 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25597 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25598 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25599 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25600 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25601 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25602 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25603 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25604 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25605 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25606 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25607 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25608 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25609 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25610 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25611 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25612 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25613 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25614 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25615 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25616 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25617 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25618 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25619 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25620 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25621 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
25622 "\xE4\x7B\x12",
25623 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025624 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
25625 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
25626 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
25627 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
25628 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
25629 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025630 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
25631 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
25632 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
25633 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
25634 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
25635 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
25636 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
25637 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
25638 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
25639 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
25640 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
25641 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
25642 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
25643 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
25644 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
25645 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
25646 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
25647 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
25648 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
25649 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
25650 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
25651 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
25652 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
25653 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
25654 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
25655 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
25656 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
25657 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
25658 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
25659 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
25660 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
25661 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
25662 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
25663 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
25664 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
25665 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
25666 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
25667 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
25668 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
25669 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
25670 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
25671 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
25672 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
25673 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
25674 "\x76\x44\x45\xF3\x24\x11\x57\x98"
25675 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
25676 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
25677 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
25678 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
25679 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
25680 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
25681 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
25682 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
25683 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
25684 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
25685 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025686 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
25687 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
25688 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
25689 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
25690 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
25691 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
25692 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
25693 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
25694 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
25695 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
25696 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
25697 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
25698 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
25699 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
25700 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
25701 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
25702 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
25703 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
25704 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
25705 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
25706 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
25707 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
25708 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
25709 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
25710 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
25711 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
25712 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
25713 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
25714 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
25715 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
25716 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
25717 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
25718 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
25719 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
25720 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
25721 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
25722 "\x00\x70\x12\x56\x56\x50\xAD\x14"
25723 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
25724 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
25725 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
25726 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
25727 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
25728 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
25729 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
25730 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
25731 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
25732 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
25733 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
25734 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
25735 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
25736 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
25737 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
25738 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
25739 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
25740 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
25741 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
25742 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
25743 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
25744 "\x74\x28\x9D\x05\x30\x20\x62\x41"
25745 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
25746 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
25747 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
25748 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
25749 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
25750 "\xF1\x6B\xD9",
25751 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025752 .also_non_np = 1,
25753 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025754 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030025755 }, { /* Generated with Crypto++ */
25756 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25757 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25758 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25759 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25760 .klen = 32,
25761 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
25762 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
25763 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25764 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25765 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25766 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25767 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25768 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25769 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25770 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25771 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25772 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25773 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25774 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25775 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25776 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25777 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25778 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25779 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25780 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25781 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25782 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25783 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25784 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25785 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25786 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25787 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25788 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25789 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25790 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25791 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25792 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25793 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25794 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25795 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25796 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25797 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25798 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25799 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25800 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25801 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25802 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25803 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25804 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25805 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25806 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25807 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25808 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25809 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25810 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25811 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25812 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25813 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25814 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25815 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25816 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25817 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25818 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25819 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25820 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25821 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25822 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25823 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025824 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25825 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25826 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25827 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25828 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25829 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25830 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25831 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25832 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25833 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25834 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25835 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25836 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25837 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25838 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25839 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25840 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25841 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25842 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25843 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25844 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25845 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25846 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25847 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25848 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25849 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25850 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25851 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25852 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25853 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25854 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25855 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25856 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25857 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25858 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25859 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25860 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25861 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25862 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25863 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25864 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25865 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25866 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25867 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25868 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25869 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25870 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25871 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25872 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25873 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25874 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25875 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25876 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25877 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25878 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25879 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25880 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25881 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25882 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25883 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25884 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25885 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25886 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25887 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25888 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25889 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030025890 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
25891 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
25892 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
25893 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
25894 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
25895 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
25896 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
25897 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
25898 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
25899 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
25900 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
25901 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
25902 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
25903 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
25904 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
25905 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
25906 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
25907 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
25908 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
25909 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
25910 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
25911 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
25912 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
25913 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
25914 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
25915 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
25916 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
25917 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
25918 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
25919 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
25920 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
25921 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
25922 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
25923 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
25924 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
25925 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
25926 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
25927 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
25928 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
25929 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
25930 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
25931 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
25932 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
25933 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
25934 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
25935 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
25936 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
25937 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
25938 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
25939 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
25940 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
25941 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
25942 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
25943 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
25944 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
25945 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
25946 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
25947 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
25948 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
25949 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
25950 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025951 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
25952 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
25953 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
25954 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
25955 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
25956 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
25957 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
25958 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
25959 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
25960 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
25961 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
25962 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
25963 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
25964 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
25965 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
25966 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
25967 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
25968 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
25969 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
25970 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
25971 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
25972 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
25973 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
25974 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
25975 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
25976 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
25977 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
25978 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
25979 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
25980 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
25981 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
25982 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
25983 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
25984 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
25985 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
25986 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
25987 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
25988 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
25989 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
25990 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
25991 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
25992 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
25993 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
25994 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
25995 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
25996 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
25997 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
25998 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
25999 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
26000 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
26001 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
26002 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
26003 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
26004 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
26005 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
26006 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
26007 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
26008 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
26009 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
26010 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
26011 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
26012 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
26013 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
26014 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
26015 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
26016 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026017 },
26018};
26019
26020static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
26021 { /* Generated with Crypto++ */
26022 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26023 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26024 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26025 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26026 .klen = 32,
26027 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26028 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26029 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26030 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26031 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26032 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26033 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026034 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26035 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26036 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26037 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26038 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26039 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26040 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26041 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26042 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26043 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26044 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26045 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26046 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26047 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26048 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26049 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26050 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26051 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26052 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26053 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26054 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26055 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26056 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26057 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26058 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26059 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26060 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26061 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26062 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26063 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26064 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26065 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26066 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26067 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26068 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26069 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26070 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26071 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26072 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26073 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26074 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26075 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26076 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26077 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26078 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26079 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26080 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26081 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26082 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26083 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26084 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26085 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26086 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26087 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26088 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26089 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26090 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26091 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026092 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26093 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26094 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26095 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26096 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026097 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26098 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26099 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26100 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26101 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26102 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26103 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26104 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26105 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26106 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26107 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26108 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26109 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26110 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26111 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26112 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26113 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26114 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26115 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26116 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26117 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26118 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26119 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26120 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26121 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26122 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26123 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26124 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26125 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26126 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26127 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26128 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26129 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26130 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26131 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26132 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26133 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26134 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26135 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26136 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26137 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26138 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26139 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26140 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26141 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26142 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26143 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26144 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26145 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26146 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26147 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26148 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26149 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26150 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26151 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26152 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26153 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26154 .rlen = 496,
26155 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026156 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26157 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26158 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26159 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26160 .klen = 32,
26161 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26162 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26163 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26164 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26165 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26166 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26167 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
26168 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026169 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26170 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26171 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26172 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26173 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26174 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26175 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26176 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26177 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26178 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26179 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26180 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26181 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26182 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26183 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26184 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26185 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26186 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26187 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26188 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26189 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26190 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26191 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26192 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26193 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26194 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26195 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26196 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26197 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26198 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26199 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26200 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26201 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26202 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26203 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26204 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26205 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26206 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26207 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26208 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26209 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26210 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26211 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26212 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26213 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26214 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26215 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26216 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26217 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26218 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26219 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26220 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26221 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26222 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26223 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26224 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026225 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
26226 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
26227 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
26228 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
26229 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
26230 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
26231 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
26232 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
26233 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
26234 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
26235 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
26236 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
26237 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
26238 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
26239 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
26240 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
26241 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
26242 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
26243 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
26244 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
26245 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
26246 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
26247 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
26248 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
26249 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
26250 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
26251 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
26252 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
26253 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
26254 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
26255 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
26256 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
26257 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
26258 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
26259 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
26260 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
26261 "\x00\x70\x12\x56\x56\x50\xAD\x14"
26262 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
26263 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
26264 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
26265 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
26266 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
26267 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
26268 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
26269 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
26270 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
26271 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
26272 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
26273 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
26274 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
26275 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
26276 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
26277 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
26278 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
26279 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
26280 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
26281 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
26282 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
26283 "\x74\x28\x9D\x05\x30\x20\x62\x41"
26284 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
26285 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
26286 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
26287 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
26288 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
26289 "\xF1\x6B\xD9",
26290 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026291 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26292 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26293 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26294 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26295 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26296 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026297 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26298 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26299 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26300 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26301 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26302 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26303 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26304 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26305 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26306 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26307 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26308 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26309 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26310 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26311 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26312 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26313 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26314 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26315 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26316 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26317 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26318 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26319 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26320 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26321 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26322 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26323 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26324 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26325 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26326 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26327 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26328 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26329 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26330 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26331 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26332 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26333 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26334 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26335 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26336 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26337 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26338 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26339 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26340 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26341 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26342 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26343 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26344 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26345 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26346 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26347 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26348 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26349 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26350 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26351 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26352 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026353 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26354 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26355 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26356 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26357 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26358 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26359 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26360 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26361 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26362 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26363 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26364 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26365 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26366 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26367 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26368 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26369 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26370 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26371 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26372 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26373 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26374 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26375 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26376 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26377 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26378 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26379 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26380 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26381 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26382 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26383 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26384 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26385 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26386 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26387 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26388 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26389 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26390 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26391 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26392 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26393 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26394 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26395 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26396 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26397 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26398 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26399 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26400 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26401 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26402 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26403 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26404 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26405 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26406 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26407 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26408 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26409 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26410 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26411 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26412 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26413 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26414 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26415 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26416 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
26417 "\xE4\x7B\x12",
26418 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026419 .also_non_np = 1,
26420 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026421 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026422 }, { /* Generated with Crypto++ */
26423 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26424 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26425 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26426 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26427 .klen = 32,
26428 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
26429 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
26430 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
26431 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
26432 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
26433 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
26434 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
26435 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
26436 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
26437 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
26438 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
26439 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
26440 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
26441 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
26442 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
26443 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
26444 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
26445 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
26446 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
26447 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
26448 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
26449 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
26450 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
26451 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
26452 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
26453 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
26454 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
26455 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
26456 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
26457 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
26458 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
26459 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
26460 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
26461 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
26462 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
26463 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
26464 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
26465 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
26466 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
26467 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
26468 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
26469 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
26470 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
26471 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
26472 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
26473 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
26474 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
26475 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
26476 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
26477 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
26478 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
26479 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
26480 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
26481 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
26482 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
26483 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
26484 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
26485 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
26486 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
26487 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
26488 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
26489 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
26490 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026491 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
26492 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
26493 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
26494 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
26495 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
26496 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
26497 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
26498 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
26499 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
26500 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
26501 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
26502 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
26503 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
26504 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
26505 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
26506 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
26507 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
26508 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
26509 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
26510 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
26511 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
26512 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
26513 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
26514 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
26515 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
26516 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
26517 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
26518 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
26519 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
26520 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
26521 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
26522 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
26523 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
26524 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
26525 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
26526 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
26527 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
26528 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
26529 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
26530 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
26531 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
26532 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
26533 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
26534 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
26535 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
26536 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
26537 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
26538 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
26539 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
26540 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
26541 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
26542 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
26543 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
26544 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
26545 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
26546 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
26547 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
26548 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
26549 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
26550 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
26551 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
26552 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
26553 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
26554 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
26555 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
26556 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026557 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26558 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26559 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26560 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26561 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26562 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26563 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26564 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26565 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26566 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26567 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26568 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26569 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26570 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26571 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26572 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26573 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26574 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26575 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26576 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26577 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26578 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26579 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26580 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26581 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26582 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26583 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26584 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26585 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26586 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26587 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26588 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26589 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26590 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26591 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26592 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26593 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26594 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26595 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26596 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26597 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26598 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26599 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26600 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26601 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26602 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26603 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26604 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26605 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26606 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26607 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26608 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26609 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26610 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26611 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26612 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26613 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26614 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26615 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26616 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26617 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026618 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26619 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26620 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26621 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26622 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26623 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26624 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26625 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26626 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26627 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26628 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26629 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26630 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26631 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26632 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26633 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26634 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26635 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26636 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26637 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26638 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26639 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26640 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26641 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26642 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26643 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26644 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26645 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26646 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26647 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26648 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26649 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26650 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26651 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26652 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26653 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26654 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26655 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26656 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26657 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26658 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26659 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26660 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26661 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26662 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26663 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26664 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26665 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26666 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26667 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26668 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26669 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26670 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26671 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26672 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26673 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26674 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26675 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26676 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26677 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26678 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26679 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26680 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26681 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26682 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26683 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026684 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026685};
26686
26687static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
26688 /* Generated from AES-LRW test vectors */
26689 {
26690 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
26691 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
26692 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
26693 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
26694 .klen = 32,
26695 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26696 "\x00\x00\x00\x00\x00\x00\x00\x01",
26697 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26698 "\x38\x39\x41\x42\x43\x44\x45\x46",
26699 .ilen = 16,
26700 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
26701 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
26702 .rlen = 16,
26703 }, {
26704 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
26705 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
26706 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
26707 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
26708 .klen = 32,
26709 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26710 "\x00\x00\x00\x00\x00\x00\x00\x02",
26711 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26712 "\x38\x39\x41\x42\x43\x44\x45\x46",
26713 .ilen = 16,
26714 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
26715 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
26716 .rlen = 16,
26717 }, {
26718 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
26719 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
26720 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
26721 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
26722 .klen = 32,
26723 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26724 "\x00\x00\x00\x02\x00\x00\x00\x00",
26725 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26726 "\x38\x39\x41\x42\x43\x44\x45\x46",
26727 .ilen = 16,
26728 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
26729 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
26730 .rlen = 16,
26731 }, {
26732 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
26733 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
26734 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
26735 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
26736 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
26737 .klen = 40,
26738 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26739 "\x00\x00\x00\x00\x00\x00\x00\x01",
26740 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26741 "\x38\x39\x41\x42\x43\x44\x45\x46",
26742 .ilen = 16,
26743 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
26744 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
26745 .rlen = 16,
26746 }, {
26747 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
26748 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
26749 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
26750 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
26751 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
26752 .klen = 40,
26753 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26754 "\x00\x00\x00\x02\x00\x00\x00\x00",
26755 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26756 "\x38\x39\x41\x42\x43\x44\x45\x46",
26757 .ilen = 16,
26758 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
26759 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
26760 .rlen = 16,
26761 }, {
26762 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
26763 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
26764 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
26765 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
26766 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
26767 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
26768 .klen = 48,
26769 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26770 "\x00\x00\x00\x00\x00\x00\x00\x01",
26771 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26772 "\x38\x39\x41\x42\x43\x44\x45\x46",
26773 .ilen = 16,
26774 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
26775 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
26776 .rlen = 16,
26777 }, {
26778 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
26779 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
26780 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
26781 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
26782 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
26783 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
26784 .klen = 48,
26785 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26786 "\x00\x00\x00\x02\x00\x00\x00\x00",
26787 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26788 "\x38\x39\x41\x42\x43\x44\x45\x46",
26789 .ilen = 16,
26790 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
26791 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
26792 .rlen = 16,
26793 }, {
26794 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
26795 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
26796 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
26797 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
26798 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
26799 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
26800 .klen = 48,
26801 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26802 "\x00\x00\x00\x00\x00\x00\x00\x01",
26803 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
26804 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
26805 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
26806 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
26807 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
26808 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
26809 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
26810 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
26811 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
26812 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
26813 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
26814 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
26815 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
26816 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
26817 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
26818 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
26819 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
26820 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
26821 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
26822 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
26823 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
26824 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
26825 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
26826 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
26827 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
26828 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
26829 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
26830 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
26831 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
26832 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
26833 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
26834 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
26835 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
26836 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
26837 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
26838 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
26839 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
26840 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
26841 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
26842 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
26843 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
26844 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
26845 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
26846 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
26847 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
26848 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
26849 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
26850 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
26851 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
26852 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
26853 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
26854 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
26855 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
26856 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
26857 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
26858 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
26859 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
26860 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
26861 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
26862 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
26863 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
26864 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
26865 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
26866 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
26867 .ilen = 512,
26868 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
26869 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
26870 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
26871 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
26872 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
26873 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
26874 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
26875 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
26876 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
26877 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
26878 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
26879 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
26880 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
26881 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
26882 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
26883 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
26884 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
26885 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
26886 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
26887 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
26888 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
26889 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
26890 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
26891 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
26892 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
26893 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
26894 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
26895 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
26896 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
26897 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
26898 "\xed\x14\xa9\x57\x19\x63\x40\x04"
26899 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
26900 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
26901 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
26902 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
26903 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
26904 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
26905 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
26906 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
26907 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
26908 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
26909 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
26910 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
26911 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
26912 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
26913 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
26914 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
26915 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
26916 "\x35\xa5\x83\x04\x84\x01\x99\x56"
26917 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
26918 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
26919 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
26920 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
26921 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
26922 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
26923 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
26924 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
26925 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
26926 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
26927 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
26928 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
26929 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
26930 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
26931 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
26932 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026933 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026934 .np = 3,
26935 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026936 },
26937};
26938
26939static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
26940 /* Generated from AES-LRW test vectors */
26941 /* same as enc vectors with input and result reversed */
26942 {
26943 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
26944 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
26945 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
26946 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
26947 .klen = 32,
26948 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26949 "\x00\x00\x00\x00\x00\x00\x00\x01",
26950 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
26951 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
26952 .ilen = 16,
26953 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26954 "\x38\x39\x41\x42\x43\x44\x45\x46",
26955 .rlen = 16,
26956 }, {
26957 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
26958 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
26959 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
26960 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
26961 .klen = 32,
26962 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26963 "\x00\x00\x00\x00\x00\x00\x00\x02",
26964 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
26965 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
26966 .ilen = 16,
26967 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26968 "\x38\x39\x41\x42\x43\x44\x45\x46",
26969 .rlen = 16,
26970 }, {
26971 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
26972 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
26973 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
26974 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
26975 .klen = 32,
26976 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26977 "\x00\x00\x00\x02\x00\x00\x00\x00",
26978 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
26979 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
26980 .ilen = 16,
26981 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26982 "\x38\x39\x41\x42\x43\x44\x45\x46",
26983 .rlen = 16,
26984 }, {
26985 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
26986 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
26987 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
26988 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
26989 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
26990 .klen = 40,
26991 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26992 "\x00\x00\x00\x00\x00\x00\x00\x01",
26993 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
26994 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
26995 .ilen = 16,
26996 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26997 "\x38\x39\x41\x42\x43\x44\x45\x46",
26998 .rlen = 16,
26999 }, {
27000 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27001 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27002 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27003 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27004 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27005 .klen = 40,
27006 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27007 "\x00\x00\x00\x02\x00\x00\x00\x00",
27008 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27009 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27010 .ilen = 16,
27011 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27012 "\x38\x39\x41\x42\x43\x44\x45\x46",
27013 .rlen = 16,
27014 }, {
27015 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27016 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27017 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27018 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27019 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27020 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27021 .klen = 48,
27022 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27023 "\x00\x00\x00\x00\x00\x00\x00\x01",
27024 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27025 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27026 .ilen = 16,
27027 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27028 "\x38\x39\x41\x42\x43\x44\x45\x46",
27029 .rlen = 16,
27030 }, {
27031 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27032 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27033 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27034 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27035 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27036 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27037 .klen = 48,
27038 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27039 "\x00\x00\x00\x02\x00\x00\x00\x00",
27040 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27041 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27042 .ilen = 16,
27043 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27044 "\x38\x39\x41\x42\x43\x44\x45\x46",
27045 .rlen = 16,
27046 }, {
27047 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27048 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27049 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27050 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27051 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27052 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27053 .klen = 48,
27054 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27055 "\x00\x00\x00\x00\x00\x00\x00\x01",
27056 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27057 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27058 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27059 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27060 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27061 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27062 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27063 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27064 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27065 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27066 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27067 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27068 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27069 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27070 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27071 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27072 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27073 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27074 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27075 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27076 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27077 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27078 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27079 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27080 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27081 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27082 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27083 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27084 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27085 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27086 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27087 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27088 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27089 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27090 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27091 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27092 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27093 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27094 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27095 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27096 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27097 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27098 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27099 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27100 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27101 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27102 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27103 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27104 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27105 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27106 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27107 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
27108 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
27109 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
27110 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
27111 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
27112 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
27113 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
27114 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
27115 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
27116 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
27117 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
27118 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
27119 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
27120 .ilen = 512,
27121 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27122 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27123 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27124 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27125 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27126 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27127 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27128 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27129 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27130 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27131 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27132 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27133 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27134 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27135 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27136 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27137 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27138 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27139 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27140 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27141 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27142 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27143 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27144 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27145 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27146 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
27147 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
27148 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
27149 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
27150 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
27151 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
27152 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
27153 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
27154 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
27155 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
27156 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
27157 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
27158 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
27159 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
27160 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
27161 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
27162 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
27163 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
27164 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
27165 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
27166 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
27167 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
27168 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
27169 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
27170 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
27171 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
27172 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
27173 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
27174 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
27175 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
27176 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
27177 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
27178 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
27179 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
27180 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
27181 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
27182 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
27183 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
27184 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
27185 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027186 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027187 .np = 3,
27188 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027189 },
27190};
27191
27192static struct cipher_testvec camellia_xts_enc_tv_template[] = {
27193 /* Generated from AES-XTS test vectors */
27194 {
27195 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
27196 "\x00\x00\x00\x00\x00\x00\x00\x00"
27197 "\x00\x00\x00\x00\x00\x00\x00\x00"
27198 "\x00\x00\x00\x00\x00\x00\x00\x00",
27199 .klen = 32,
27200 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27201 "\x00\x00\x00\x00\x00\x00\x00\x00",
27202 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
27203 "\x00\x00\x00\x00\x00\x00\x00\x00"
27204 "\x00\x00\x00\x00\x00\x00\x00\x00"
27205 "\x00\x00\x00\x00\x00\x00\x00\x00",
27206 .ilen = 32,
27207 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
27208 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
27209 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
27210 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
27211 .rlen = 32,
27212 }, {
27213 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
27214 "\x11\x11\x11\x11\x11\x11\x11\x11"
27215 "\x22\x22\x22\x22\x22\x22\x22\x22"
27216 "\x22\x22\x22\x22\x22\x22\x22\x22",
27217 .klen = 32,
27218 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27219 "\x00\x00\x00\x00\x00\x00\x00\x00",
27220 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
27221 "\x44\x44\x44\x44\x44\x44\x44\x44"
27222 "\x44\x44\x44\x44\x44\x44\x44\x44"
27223 "\x44\x44\x44\x44\x44\x44\x44\x44",
27224 .ilen = 32,
27225 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
27226 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
27227 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
27228 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
27229 .rlen = 32,
27230 }, {
27231 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
27232 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
27233 "\x22\x22\x22\x22\x22\x22\x22\x22"
27234 "\x22\x22\x22\x22\x22\x22\x22\x22",
27235 .klen = 32,
27236 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27237 "\x00\x00\x00\x00\x00\x00\x00\x00",
27238 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
27239 "\x44\x44\x44\x44\x44\x44\x44\x44"
27240 "\x44\x44\x44\x44\x44\x44\x44\x44"
27241 "\x44\x44\x44\x44\x44\x44\x44\x44",
27242 .ilen = 32,
27243 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
27244 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
27245 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
27246 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
27247 .rlen = 32,
27248 }, {
27249 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27250 "\x23\x53\x60\x28\x74\x71\x35\x26"
27251 "\x31\x41\x59\x26\x53\x58\x97\x93"
27252 "\x23\x84\x62\x64\x33\x83\x27\x95",
27253 .klen = 32,
27254 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27255 "\x00\x00\x00\x00\x00\x00\x00\x00",
27256 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27257 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27258 "\x10\x11\x12\x13\x14\x15\x16\x17"
27259 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27260 "\x20\x21\x22\x23\x24\x25\x26\x27"
27261 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27262 "\x30\x31\x32\x33\x34\x35\x36\x37"
27263 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27264 "\x40\x41\x42\x43\x44\x45\x46\x47"
27265 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27266 "\x50\x51\x52\x53\x54\x55\x56\x57"
27267 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27268 "\x60\x61\x62\x63\x64\x65\x66\x67"
27269 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27270 "\x70\x71\x72\x73\x74\x75\x76\x77"
27271 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27272 "\x80\x81\x82\x83\x84\x85\x86\x87"
27273 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27274 "\x90\x91\x92\x93\x94\x95\x96\x97"
27275 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27276 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27277 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27278 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27279 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27280 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27281 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27282 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27283 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27284 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27285 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27286 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27287 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27288 "\x00\x01\x02\x03\x04\x05\x06\x07"
27289 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27290 "\x10\x11\x12\x13\x14\x15\x16\x17"
27291 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27292 "\x20\x21\x22\x23\x24\x25\x26\x27"
27293 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27294 "\x30\x31\x32\x33\x34\x35\x36\x37"
27295 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27296 "\x40\x41\x42\x43\x44\x45\x46\x47"
27297 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27298 "\x50\x51\x52\x53\x54\x55\x56\x57"
27299 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27300 "\x60\x61\x62\x63\x64\x65\x66\x67"
27301 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27302 "\x70\x71\x72\x73\x74\x75\x76\x77"
27303 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27304 "\x80\x81\x82\x83\x84\x85\x86\x87"
27305 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27306 "\x90\x91\x92\x93\x94\x95\x96\x97"
27307 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27308 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27309 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27310 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27311 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27312 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27313 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27314 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27315 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27316 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27317 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27318 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27319 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27320 .ilen = 512,
27321 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
27322 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
27323 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
27324 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
27325 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
27326 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
27327 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
27328 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
27329 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
27330 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
27331 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
27332 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
27333 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
27334 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
27335 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
27336 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
27337 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
27338 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
27339 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
27340 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
27341 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
27342 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
27343 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
27344 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
27345 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
27346 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
27347 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
27348 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
27349 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
27350 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
27351 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
27352 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
27353 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
27354 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
27355 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
27356 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
27357 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
27358 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
27359 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
27360 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
27361 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
27362 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
27363 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
27364 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
27365 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
27366 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
27367 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
27368 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
27369 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
27370 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
27371 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
27372 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
27373 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
27374 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
27375 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
27376 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
27377 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
27378 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
27379 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
27380 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
27381 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
27382 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
27383 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
27384 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
27385 .rlen = 512,
27386 }, {
27387 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27388 "\x23\x53\x60\x28\x74\x71\x35\x26"
27389 "\x62\x49\x77\x57\x24\x70\x93\x69"
27390 "\x99\x59\x57\x49\x66\x96\x76\x27"
27391 "\x31\x41\x59\x26\x53\x58\x97\x93"
27392 "\x23\x84\x62\x64\x33\x83\x27\x95"
27393 "\x02\x88\x41\x97\x16\x93\x99\x37"
27394 "\x51\x05\x82\x09\x74\x94\x45\x92",
27395 .klen = 64,
27396 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
27397 "\x00\x00\x00\x00\x00\x00\x00\x00",
27398 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27399 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27400 "\x10\x11\x12\x13\x14\x15\x16\x17"
27401 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27402 "\x20\x21\x22\x23\x24\x25\x26\x27"
27403 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27404 "\x30\x31\x32\x33\x34\x35\x36\x37"
27405 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27406 "\x40\x41\x42\x43\x44\x45\x46\x47"
27407 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27408 "\x50\x51\x52\x53\x54\x55\x56\x57"
27409 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27410 "\x60\x61\x62\x63\x64\x65\x66\x67"
27411 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27412 "\x70\x71\x72\x73\x74\x75\x76\x77"
27413 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27414 "\x80\x81\x82\x83\x84\x85\x86\x87"
27415 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27416 "\x90\x91\x92\x93\x94\x95\x96\x97"
27417 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27418 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27419 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27420 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27421 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27422 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27423 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27424 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27425 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27426 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27427 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27428 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27429 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27430 "\x00\x01\x02\x03\x04\x05\x06\x07"
27431 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27432 "\x10\x11\x12\x13\x14\x15\x16\x17"
27433 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27434 "\x20\x21\x22\x23\x24\x25\x26\x27"
27435 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27436 "\x30\x31\x32\x33\x34\x35\x36\x37"
27437 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27438 "\x40\x41\x42\x43\x44\x45\x46\x47"
27439 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27440 "\x50\x51\x52\x53\x54\x55\x56\x57"
27441 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27442 "\x60\x61\x62\x63\x64\x65\x66\x67"
27443 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27444 "\x70\x71\x72\x73\x74\x75\x76\x77"
27445 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27446 "\x80\x81\x82\x83\x84\x85\x86\x87"
27447 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27448 "\x90\x91\x92\x93\x94\x95\x96\x97"
27449 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27450 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27451 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27452 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27453 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27454 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27455 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27456 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27457 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27458 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27459 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27460 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27461 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27462 .ilen = 512,
27463 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
27464 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
27465 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
27466 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
27467 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
27468 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
27469 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
27470 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
27471 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
27472 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
27473 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
27474 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
27475 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
27476 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
27477 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
27478 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
27479 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
27480 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
27481 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
27482 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
27483 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
27484 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
27485 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
27486 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
27487 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
27488 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
27489 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
27490 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
27491 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
27492 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
27493 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
27494 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
27495 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
27496 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
27497 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
27498 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
27499 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
27500 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
27501 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
27502 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
27503 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
27504 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
27505 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
27506 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
27507 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
27508 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
27509 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
27510 "\x21\x17\xf8\x59\x15\x24\x64\x22"
27511 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
27512 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
27513 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
27514 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
27515 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
27516 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
27517 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
27518 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
27519 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
27520 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
27521 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
27522 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
27523 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
27524 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
27525 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
27526 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
27527 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027528 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027529 .np = 3,
27530 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027531 },
27532};
27533
27534static struct cipher_testvec camellia_xts_dec_tv_template[] = {
27535 /* Generated from AES-XTS test vectors */
27536 /* same as enc vectors with input and result reversed */
27537 {
27538 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
27539 "\x00\x00\x00\x00\x00\x00\x00\x00"
27540 "\x00\x00\x00\x00\x00\x00\x00\x00"
27541 "\x00\x00\x00\x00\x00\x00\x00\x00",
27542 .klen = 32,
27543 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27544 "\x00\x00\x00\x00\x00\x00\x00\x00",
27545 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
27546 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
27547 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
27548 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
27549 .ilen = 32,
27550 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
27551 "\x00\x00\x00\x00\x00\x00\x00\x00"
27552 "\x00\x00\x00\x00\x00\x00\x00\x00"
27553 "\x00\x00\x00\x00\x00\x00\x00\x00",
27554 .rlen = 32,
27555 }, {
27556 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
27557 "\x11\x11\x11\x11\x11\x11\x11\x11"
27558 "\x22\x22\x22\x22\x22\x22\x22\x22"
27559 "\x22\x22\x22\x22\x22\x22\x22\x22",
27560 .klen = 32,
27561 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27562 "\x00\x00\x00\x00\x00\x00\x00\x00",
27563 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
27564 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
27565 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
27566 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
27567 .ilen = 32,
27568 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
27569 "\x44\x44\x44\x44\x44\x44\x44\x44"
27570 "\x44\x44\x44\x44\x44\x44\x44\x44"
27571 "\x44\x44\x44\x44\x44\x44\x44\x44",
27572 .rlen = 32,
27573 }, {
27574 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
27575 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
27576 "\x22\x22\x22\x22\x22\x22\x22\x22"
27577 "\x22\x22\x22\x22\x22\x22\x22\x22",
27578 .klen = 32,
27579 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27580 "\x00\x00\x00\x00\x00\x00\x00\x00",
27581 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
27582 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
27583 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
27584 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
27585 .ilen = 32,
27586 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
27587 "\x44\x44\x44\x44\x44\x44\x44\x44"
27588 "\x44\x44\x44\x44\x44\x44\x44\x44"
27589 "\x44\x44\x44\x44\x44\x44\x44\x44",
27590 .rlen = 32,
27591 }, {
27592 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27593 "\x23\x53\x60\x28\x74\x71\x35\x26"
27594 "\x31\x41\x59\x26\x53\x58\x97\x93"
27595 "\x23\x84\x62\x64\x33\x83\x27\x95",
27596 .klen = 32,
27597 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27598 "\x00\x00\x00\x00\x00\x00\x00\x00",
27599 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
27600 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
27601 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
27602 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
27603 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
27604 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
27605 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
27606 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
27607 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
27608 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
27609 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
27610 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
27611 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
27612 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
27613 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
27614 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
27615 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
27616 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
27617 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
27618 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
27619 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
27620 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
27621 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
27622 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
27623 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
27624 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
27625 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
27626 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
27627 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
27628 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
27629 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
27630 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
27631 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
27632 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
27633 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
27634 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
27635 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
27636 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
27637 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
27638 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
27639 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
27640 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
27641 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
27642 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
27643 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
27644 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
27645 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
27646 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
27647 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
27648 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
27649 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
27650 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
27651 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
27652 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
27653 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
27654 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
27655 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
27656 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
27657 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
27658 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
27659 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
27660 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
27661 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
27662 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
27663 .ilen = 512,
27664 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27665 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27666 "\x10\x11\x12\x13\x14\x15\x16\x17"
27667 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27668 "\x20\x21\x22\x23\x24\x25\x26\x27"
27669 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27670 "\x30\x31\x32\x33\x34\x35\x36\x37"
27671 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27672 "\x40\x41\x42\x43\x44\x45\x46\x47"
27673 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27674 "\x50\x51\x52\x53\x54\x55\x56\x57"
27675 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27676 "\x60\x61\x62\x63\x64\x65\x66\x67"
27677 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27678 "\x70\x71\x72\x73\x74\x75\x76\x77"
27679 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27680 "\x80\x81\x82\x83\x84\x85\x86\x87"
27681 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27682 "\x90\x91\x92\x93\x94\x95\x96\x97"
27683 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27684 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27685 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27686 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27687 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27688 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27689 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27690 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27691 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27692 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27693 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27694 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27695 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27696 "\x00\x01\x02\x03\x04\x05\x06\x07"
27697 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27698 "\x10\x11\x12\x13\x14\x15\x16\x17"
27699 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27700 "\x20\x21\x22\x23\x24\x25\x26\x27"
27701 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27702 "\x30\x31\x32\x33\x34\x35\x36\x37"
27703 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27704 "\x40\x41\x42\x43\x44\x45\x46\x47"
27705 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27706 "\x50\x51\x52\x53\x54\x55\x56\x57"
27707 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27708 "\x60\x61\x62\x63\x64\x65\x66\x67"
27709 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27710 "\x70\x71\x72\x73\x74\x75\x76\x77"
27711 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27712 "\x80\x81\x82\x83\x84\x85\x86\x87"
27713 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27714 "\x90\x91\x92\x93\x94\x95\x96\x97"
27715 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27716 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27717 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27718 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27719 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27720 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27721 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27722 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27723 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27724 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27725 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27726 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27727 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27728 .rlen = 512,
27729 }, {
27730 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27731 "\x23\x53\x60\x28\x74\x71\x35\x26"
27732 "\x62\x49\x77\x57\x24\x70\x93\x69"
27733 "\x99\x59\x57\x49\x66\x96\x76\x27"
27734 "\x31\x41\x59\x26\x53\x58\x97\x93"
27735 "\x23\x84\x62\x64\x33\x83\x27\x95"
27736 "\x02\x88\x41\x97\x16\x93\x99\x37"
27737 "\x51\x05\x82\x09\x74\x94\x45\x92",
27738 .klen = 64,
27739 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
27740 "\x00\x00\x00\x00\x00\x00\x00\x00",
27741 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
27742 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
27743 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
27744 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
27745 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
27746 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
27747 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
27748 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
27749 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
27750 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
27751 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
27752 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
27753 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
27754 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
27755 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
27756 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
27757 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
27758 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
27759 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
27760 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
27761 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
27762 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
27763 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
27764 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
27765 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
27766 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
27767 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
27768 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
27769 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
27770 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
27771 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
27772 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
27773 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
27774 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
27775 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
27776 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
27777 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
27778 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
27779 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
27780 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
27781 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
27782 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
27783 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
27784 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
27785 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
27786 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
27787 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
27788 "\x21\x17\xf8\x59\x15\x24\x64\x22"
27789 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
27790 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
27791 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
27792 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
27793 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
27794 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
27795 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
27796 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
27797 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
27798 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
27799 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
27800 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
27801 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
27802 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
27803 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
27804 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
27805 .ilen = 512,
27806 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27807 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27808 "\x10\x11\x12\x13\x14\x15\x16\x17"
27809 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27810 "\x20\x21\x22\x23\x24\x25\x26\x27"
27811 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27812 "\x30\x31\x32\x33\x34\x35\x36\x37"
27813 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27814 "\x40\x41\x42\x43\x44\x45\x46\x47"
27815 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27816 "\x50\x51\x52\x53\x54\x55\x56\x57"
27817 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27818 "\x60\x61\x62\x63\x64\x65\x66\x67"
27819 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27820 "\x70\x71\x72\x73\x74\x75\x76\x77"
27821 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27822 "\x80\x81\x82\x83\x84\x85\x86\x87"
27823 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27824 "\x90\x91\x92\x93\x94\x95\x96\x97"
27825 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27826 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27827 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27828 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27829 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27830 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27831 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27832 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27833 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27834 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27835 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27836 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27837 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27838 "\x00\x01\x02\x03\x04\x05\x06\x07"
27839 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27840 "\x10\x11\x12\x13\x14\x15\x16\x17"
27841 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27842 "\x20\x21\x22\x23\x24\x25\x26\x27"
27843 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27844 "\x30\x31\x32\x33\x34\x35\x36\x37"
27845 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27846 "\x40\x41\x42\x43\x44\x45\x46\x47"
27847 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27848 "\x50\x51\x52\x53\x54\x55\x56\x57"
27849 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27850 "\x60\x61\x62\x63\x64\x65\x66\x67"
27851 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27852 "\x70\x71\x72\x73\x74\x75\x76\x77"
27853 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27854 "\x80\x81\x82\x83\x84\x85\x86\x87"
27855 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27856 "\x90\x91\x92\x93\x94\x95\x96\x97"
27857 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27858 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27859 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27860 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27861 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27862 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27863 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27864 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27865 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27866 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27867 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27868 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27869 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27870 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027871 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027872 .np = 3,
27873 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027874 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027875};
27876
27877/*
27878 * SEED test vectors
27879 */
27880#define SEED_ENC_TEST_VECTORS 4
27881#define SEED_DEC_TEST_VECTORS 4
27882
27883static struct cipher_testvec seed_enc_tv_template[] = {
27884 {
27885 .key = zeroed_string,
27886 .klen = 16,
27887 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27888 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27889 .ilen = 16,
27890 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
27891 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
27892 .rlen = 16,
27893 }, {
27894 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27895 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27896 .klen = 16,
27897 .input = zeroed_string,
27898 .ilen = 16,
27899 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
27900 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
27901 .rlen = 16,
27902 }, {
27903 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
27904 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
27905 .klen = 16,
27906 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
27907 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
27908 .ilen = 16,
27909 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
27910 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
27911 .rlen = 16,
27912 }, {
27913 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
27914 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
27915 .klen = 16,
27916 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
27917 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
27918 .ilen = 16,
27919 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
27920 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
27921 .rlen = 16,
27922 }
27923};
27924
27925static struct cipher_testvec seed_dec_tv_template[] = {
27926 {
27927 .key = zeroed_string,
27928 .klen = 16,
27929 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
27930 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
27931 .ilen = 16,
27932 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27933 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27934 .rlen = 16,
27935 }, {
27936 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27937 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27938 .klen = 16,
27939 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
27940 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
27941 .ilen = 16,
27942 .result = zeroed_string,
27943 .rlen = 16,
27944 }, {
27945 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
27946 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
27947 .klen = 16,
27948 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
27949 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
27950 .ilen = 16,
27951 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
27952 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
27953 .rlen = 16,
27954 }, {
27955 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
27956 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
27957 .klen = 16,
27958 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
27959 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
27960 .ilen = 16,
27961 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
27962 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
27963 .rlen = 16,
27964 }
27965};
27966
27967#define SALSA20_STREAM_ENC_TEST_VECTORS 5
27968static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
27969 /*
27970 * Testvectors from verified.test-vectors submitted to ECRYPT.
27971 * They are truncated to size 39, 64, 111, 129 to test a variety
27972 * of input length.
27973 */
27974 { /* Set 3, vector 0 */
27975 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27976 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
27977 .klen = 16,
27978 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
27979 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
27980 "\x00\x00\x00\x00\x00\x00\x00\x00"
27981 "\x00\x00\x00\x00\x00\x00\x00\x00"
27982 "\x00\x00\x00\x00\x00\x00\x00\x00"
27983 "\x00\x00\x00\x00\x00\x00\x00",
27984 .ilen = 39,
27985 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
27986 "\x68\x02\x41\x0C\x68\x86\x88\x89"
27987 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
27988 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
27989 "\x58\x3F\x52\x79\x70\xEB\xC1",
27990 .rlen = 39,
27991 }, { /* Set 5, vector 0 */
27992 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
27993 "\x00\x00\x00\x00\x00\x00\x00\x00",
27994 .klen = 16,
27995 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
27996 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
27997 "\x00\x00\x00\x00\x00\x00\x00\x00"
27998 "\x00\x00\x00\x00\x00\x00\x00\x00"
27999 "\x00\x00\x00\x00\x00\x00\x00\x00"
28000 "\x00\x00\x00\x00\x00\x00\x00\x00"
28001 "\x00\x00\x00\x00\x00\x00\x00\x00"
28002 "\x00\x00\x00\x00\x00\x00\x00\x00"
28003 "\x00\x00\x00\x00\x00\x00\x00\x00",
28004 .ilen = 64,
28005 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
28006 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
28007 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
28008 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
28009 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
28010 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
28011 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
28012 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
28013 .rlen = 64,
28014 }, { /* Set 3, vector 27 */
28015 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
28016 "\x23\x24\x25\x26\x27\x28\x29\x2A"
28017 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
28018 "\x33\x34\x35\x36\x37\x38\x39\x3A",
28019 .klen = 32,
28020 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
28021 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28022 "\x00\x00\x00\x00\x00\x00\x00\x00"
28023 "\x00\x00\x00\x00\x00\x00\x00\x00"
28024 "\x00\x00\x00\x00\x00\x00\x00\x00"
28025 "\x00\x00\x00\x00\x00\x00\x00\x00"
28026 "\x00\x00\x00\x00\x00\x00\x00\x00"
28027 "\x00\x00\x00\x00\x00\x00\x00\x00"
28028 "\x00\x00\x00\x00\x00\x00\x00\x00"
28029 "\x00\x00\x00\x00\x00\x00\x00\x00"
28030 "\x00\x00\x00\x00\x00\x00\x00\x00"
28031 "\x00\x00\x00\x00\x00\x00\x00\x00"
28032 "\x00\x00\x00\x00\x00\x00\x00\x00"
28033 "\x00\x00\x00\x00\x00\x00\x00\x00"
28034 "\x00\x00\x00\x00\x00\x00\x00",
28035 .ilen = 111,
28036 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
28037 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
28038 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
28039 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
28040 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
28041 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
28042 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
28043 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
28044 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
28045 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
28046 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
28047 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
28048 "\x95\x46\x45\x54\xE9\x75\x03\x08"
28049 "\x44\xAF\xE5\x8A\x81\x12\x09",
28050 .rlen = 111,
28051 }, { /* Set 5, vector 27 */
28052 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28053 "\x00\x00\x00\x00\x00\x00\x00\x00"
28054 "\x00\x00\x00\x00\x00\x00\x00\x00"
28055 "\x00\x00\x00\x00\x00\x00\x00\x00",
28056 .klen = 32,
28057 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
28058 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28059 "\x00\x00\x00\x00\x00\x00\x00\x00"
28060 "\x00\x00\x00\x00\x00\x00\x00\x00"
28061 "\x00\x00\x00\x00\x00\x00\x00\x00"
28062 "\x00\x00\x00\x00\x00\x00\x00\x00"
28063 "\x00\x00\x00\x00\x00\x00\x00\x00"
28064 "\x00\x00\x00\x00\x00\x00\x00\x00"
28065 "\x00\x00\x00\x00\x00\x00\x00\x00"
28066 "\x00\x00\x00\x00\x00\x00\x00\x00"
28067 "\x00\x00\x00\x00\x00\x00\x00\x00"
28068 "\x00\x00\x00\x00\x00\x00\x00\x00"
28069 "\x00\x00\x00\x00\x00\x00\x00\x00"
28070 "\x00\x00\x00\x00\x00\x00\x00\x00"
28071 "\x00\x00\x00\x00\x00\x00\x00\x00"
28072 "\x00\x00\x00\x00\x00\x00\x00\x00"
28073 "\x00\x00\x00\x00\x00\x00\x00\x00"
28074 "\x00",
28075 .ilen = 129,
28076 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
28077 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
28078 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
28079 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
28080 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
28081 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
28082 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
28083 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
28084 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
28085 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
28086 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
28087 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
28088 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
28089 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
28090 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
28091 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
28092 "\x5A",
28093 .rlen = 129,
28094 }, { /* large test vector generated using Crypto++ */
28095 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28096 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28097 "\x10\x11\x12\x13\x14\x15\x16\x17"
28098 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
28099 .klen = 32,
28100 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28101 "\x00\x00\x00\x00\x00\x00\x00\x00",
28102 .input =
28103 "\x00\x01\x02\x03\x04\x05\x06\x07"
28104 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28105 "\x10\x11\x12\x13\x14\x15\x16\x17"
28106 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28107 "\x20\x21\x22\x23\x24\x25\x26\x27"
28108 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28109 "\x30\x31\x32\x33\x34\x35\x36\x37"
28110 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28111 "\x40\x41\x42\x43\x44\x45\x46\x47"
28112 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28113 "\x50\x51\x52\x53\x54\x55\x56\x57"
28114 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28115 "\x60\x61\x62\x63\x64\x65\x66\x67"
28116 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28117 "\x70\x71\x72\x73\x74\x75\x76\x77"
28118 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28119 "\x80\x81\x82\x83\x84\x85\x86\x87"
28120 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28121 "\x90\x91\x92\x93\x94\x95\x96\x97"
28122 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28123 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28124 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28125 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28126 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28127 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28128 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28129 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28130 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28131 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28132 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28133 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28134 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28135 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
28136 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
28137 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
28138 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
28139 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
28140 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
28141 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
28142 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
28143 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
28144 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
28145 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
28146 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
28147 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
28148 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
28149 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
28150 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
28151 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
28152 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
28153 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
28154 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
28155 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
28156 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
28157 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
28158 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
28159 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
28160 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
28161 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
28162 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
28163 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
28164 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
28165 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
28166 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
28167 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
28168 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
28169 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
28170 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
28171 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
28172 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
28173 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
28174 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
28175 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
28176 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
28177 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
28178 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
28179 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
28180 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
28181 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
28182 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
28183 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
28184 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
28185 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
28186 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
28187 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
28188 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
28189 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
28190 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
28191 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
28192 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
28193 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
28194 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
28195 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
28196 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
28197 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
28198 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
28199 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
28200 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
28201 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
28202 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
28203 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
28204 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
28205 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
28206 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
28207 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
28208 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
28209 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
28210 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
28211 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
28212 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
28213 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
28214 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
28215 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
28216 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
28217 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
28218 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
28219 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
28220 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
28221 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
28222 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
28223 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
28224 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
28225 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
28226 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
28227 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
28228 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
28229 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
28230 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
28231 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
28232 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
28233 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
28234 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
28235 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
28236 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
28237 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
28238 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
28239 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
28240 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
28241 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
28242 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
28243 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
28244 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
28245 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
28246 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
28247 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
28248 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
28249 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
28250 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
28251 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
28252 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
28253 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
28254 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
28255 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
28256 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
28257 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
28258 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
28259 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
28260 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
28261 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
28262 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
28263 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
28264 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
28265 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
28266 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
28267 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
28268 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
28269 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
28270 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
28271 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
28272 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
28273 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
28274 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
28275 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
28276 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
28277 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
28278 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
28279 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
28280 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
28281 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
28282 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
28283 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
28284 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
28285 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
28286 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
28287 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
28288 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
28289 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
28290 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
28291 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
28292 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
28293 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
28294 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
28295 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
28296 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
28297 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
28298 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
28299 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
28300 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
28301 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
28302 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
28303 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
28304 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
28305 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
28306 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
28307 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
28308 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
28309 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
28310 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
28311 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
28312 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
28313 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
28314 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
28315 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
28316 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
28317 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
28318 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
28319 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
28320 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
28321 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
28322 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
28323 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
28324 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
28325 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
28326 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
28327 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
28328 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
28329 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
28330 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
28331 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
28332 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
28333 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
28334 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
28335 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
28336 "\x38\x47\x56\x65\x74\x83\x92\xa1"
28337 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
28338 "\x28\x37\x46\x55\x64\x73\x82\x91"
28339 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
28340 "\x18\x27\x36\x45\x54\x63\x72\x81"
28341 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
28342 "\x08\x17\x26\x35\x44\x53\x62\x71"
28343 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
28344 "\xf8\x07\x16\x25\x34\x43\x52\x61"
28345 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
28346 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
28347 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
28348 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
28349 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
28350 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
28351 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
28352 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
28353 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
28354 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
28355 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
28356 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
28357 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
28358 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
28359 "\x00\x11\x22\x33\x44\x55\x66\x77"
28360 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
28361 "\x10\x21\x32\x43\x54\x65\x76\x87"
28362 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
28363 "\x20\x31\x42\x53\x64\x75\x86\x97"
28364 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
28365 "\x30\x41\x52\x63\x74\x85\x96\xa7"
28366 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
28367 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
28368 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
28369 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
28370 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
28371 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
28372 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
28373 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
28374 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
28375 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
28376 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
28377 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
28378 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
28379 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
28380 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
28381 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
28382 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
28383 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
28384 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
28385 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
28386 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
28387 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
28388 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
28389 "\xf0\x01\x12\x23\x34\x45\x56\x67"
28390 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
28391 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
28392 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
28393 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
28394 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
28395 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
28396 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
28397 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
28398 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
28399 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
28400 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
28401 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
28402 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
28403 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
28404 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
28405 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
28406 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
28407 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
28408 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
28409 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
28410 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
28411 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
28412 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
28413 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
28414 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
28415 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
28416 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
28417 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
28418 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
28419 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
28420 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
28421 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
28422 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
28423 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
28424 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
28425 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
28426 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
28427 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
28428 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
28429 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
28430 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
28431 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
28432 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
28433 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
28434 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
28435 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
28436 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
28437 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
28438 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
28439 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
28440 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
28441 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
28442 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
28443 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
28444 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
28445 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
28446 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
28447 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
28448 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
28449 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
28450 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
28451 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
28452 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
28453 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
28454 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
28455 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
28456 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
28457 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
28458 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
28459 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
28460 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
28461 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
28462 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
28463 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
28464 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
28465 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
28466 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
28467 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
28468 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
28469 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
28470 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
28471 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
28472 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
28473 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
28474 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
28475 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
28476 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
28477 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
28478 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
28479 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
28480 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
28481 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
28482 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
28483 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
28484 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
28485 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
28486 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
28487 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
28488 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
28489 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
28490 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
28491 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
28492 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
28493 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
28494 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
28495 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
28496 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
28497 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
28498 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
28499 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
28500 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
28501 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
28502 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
28503 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
28504 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
28505 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
28506 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
28507 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
28508 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
28509 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
28510 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
28511 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
28512 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
28513 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
28514 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
28515 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
28516 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
28517 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
28518 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
28519 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
28520 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
28521 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
28522 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
28523 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
28524 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
28525 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
28526 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
28527 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
28528 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
28529 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
28530 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
28531 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
28532 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
28533 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
28534 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
28535 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
28536 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
28537 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
28538 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
28539 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
28540 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
28541 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
28542 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
28543 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
28544 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
28545 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
28546 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
28547 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
28548 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
28549 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
28550 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
28551 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
28552 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
28553 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
28554 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
28555 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
28556 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
28557 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
28558 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
28559 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
28560 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
28561 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
28562 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
28563 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
28564 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
28565 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
28566 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
28567 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
28568 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
28569 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
28570 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
28571 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
28572 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
28573 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
28574 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
28575 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
28576 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
28577 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
28578 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
28579 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
28580 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
28581 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
28582 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
28583 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
28584 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
28585 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
28586 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
28587 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
28588 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
28589 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
28590 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
28591 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
28592 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
28593 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
28594 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
28595 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
28596 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
28597 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
28598 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
28599 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
28600 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
28601 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
28602 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
28603 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
28604 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
28605 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
28606 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
28607 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
28608 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
28609 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
28610 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
28611 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
28612 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
28613 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
28614 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
28615 "\x00\x21\x42\x63",
28616 .ilen = 4100,
28617 .result =
28618 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
28619 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
28620 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
28621 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
28622 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
28623 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
28624 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
28625 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
28626 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
28627 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
28628 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
28629 "\xbb\xde\x56\x86\xab\x65\x21\x30"
28630 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
28631 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
28632 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
28633 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
28634 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
28635 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
28636 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
28637 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
28638 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
28639 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
28640 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
28641 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
28642 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
28643 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
28644 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
28645 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
28646 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
28647 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
28648 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
28649 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
28650 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
28651 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
28652 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
28653 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
28654 "\x62\x08\x18\x7a\x25\x49\x28\xac"
28655 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
28656 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
28657 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
28658 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
28659 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
28660 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
28661 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
28662 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
28663 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
28664 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
28665 "\x33\xee\x14\x19\x22\x52\x89\xa7"
28666 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
28667 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
28668 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
28669 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
28670 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
28671 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
28672 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
28673 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
28674 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
28675 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
28676 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
28677 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
28678 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
28679 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
28680 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
28681 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
28682 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
28683 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
28684 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
28685 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
28686 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
28687 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
28688 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
28689 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
28690 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
28691 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
28692 "\x49\x97\x33\xab\x36\x14\x0a\x70"
28693 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
28694 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
28695 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
28696 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
28697 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
28698 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
28699 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
28700 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
28701 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
28702 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
28703 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
28704 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
28705 "\xad\x04\x07\xae\x22\x90\x4a\x93"
28706 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
28707 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
28708 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
28709 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
28710 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
28711 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
28712 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
28713 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
28714 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
28715 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
28716 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
28717 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
28718 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
28719 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
28720 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
28721 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
28722 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
28723 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
28724 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
28725 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
28726 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
28727 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
28728 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
28729 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
28730 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
28731 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
28732 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
28733 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
28734 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
28735 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
28736 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
28737 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
28738 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
28739 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
28740 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
28741 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
28742 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
28743 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
28744 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
28745 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
28746 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
28747 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
28748 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
28749 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
28750 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
28751 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
28752 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
28753 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
28754 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
28755 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
28756 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
28757 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
28758 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
28759 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
28760 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
28761 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
28762 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
28763 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
28764 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
28765 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
28766 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
28767 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
28768 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
28769 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
28770 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
28771 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
28772 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
28773 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
28774 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
28775 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
28776 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
28777 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
28778 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
28779 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
28780 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
28781 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
28782 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
28783 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
28784 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
28785 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
28786 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
28787 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
28788 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
28789 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
28790 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
28791 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
28792 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
28793 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
28794 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
28795 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
28796 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
28797 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
28798 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
28799 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
28800 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
28801 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
28802 "\x2e\x53\x49\x97\x94\x33\xae\x40"
28803 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
28804 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
28805 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
28806 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
28807 "\xce\x87\xad\xcc\x72\x05\x00\x29"
28808 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
28809 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
28810 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
28811 "\xac\xc0\x79\x50\x69\xca\x59\x32"
28812 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
28813 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
28814 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
28815 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
28816 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
28817 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
28818 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
28819 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
28820 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
28821 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
28822 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
28823 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
28824 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
28825 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
28826 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
28827 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
28828 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
28829 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
28830 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
28831 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
28832 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
28833 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
28834 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
28835 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
28836 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
28837 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
28838 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
28839 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
28840 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
28841 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
28842 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
28843 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
28844 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
28845 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
28846 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
28847 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
28848 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
28849 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
28850 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
28851 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
28852 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
28853 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
28854 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
28855 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
28856 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
28857 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
28858 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
28859 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
28860 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
28861 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
28862 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
28863 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
28864 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
28865 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
28866 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
28867 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
28868 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
28869 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
28870 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
28871 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
28872 "\x38\x55\xab\x33\x26\xef\x9f\x43"
28873 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
28874 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
28875 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
28876 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
28877 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
28878 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
28879 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
28880 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
28881 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
28882 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
28883 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
28884 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
28885 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
28886 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
28887 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
28888 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
28889 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
28890 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
28891 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
28892 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
28893 "\x62\x36\x43\xb2\x82\x15\x75\x50"
28894 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
28895 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
28896 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
28897 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
28898 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
28899 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
28900 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
28901 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
28902 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
28903 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
28904 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
28905 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
28906 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
28907 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
28908 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
28909 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
28910 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
28911 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
28912 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
28913 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
28914 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
28915 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
28916 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
28917 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
28918 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
28919 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
28920 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
28921 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
28922 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
28923 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
28924 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
28925 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
28926 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
28927 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
28928 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
28929 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
28930 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
28931 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
28932 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
28933 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
28934 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
28935 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
28936 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
28937 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
28938 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
28939 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
28940 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
28941 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
28942 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
28943 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
28944 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
28945 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
28946 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
28947 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
28948 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
28949 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
28950 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
28951 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
28952 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
28953 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
28954 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
28955 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
28956 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
28957 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
28958 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
28959 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
28960 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
28961 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
28962 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
28963 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
28964 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
28965 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
28966 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
28967 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
28968 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
28969 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
28970 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
28971 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
28972 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
28973 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
28974 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
28975 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
28976 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
28977 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
28978 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
28979 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
28980 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
28981 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
28982 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
28983 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
28984 "\x73\x2e\x71\x79\x16\x06\x63\x28"
28985 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
28986 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
28987 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
28988 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
28989 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
28990 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
28991 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
28992 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
28993 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
28994 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
28995 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
28996 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
28997 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
28998 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
28999 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
29000 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
29001 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
29002 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
29003 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
29004 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
29005 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
29006 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
29007 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
29008 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
29009 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
29010 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
29011 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
29012 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
29013 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
29014 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
29015 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
29016 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
29017 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
29018 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
29019 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
29020 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
29021 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
29022 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
29023 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
29024 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
29025 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
29026 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
29027 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
29028 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
29029 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
29030 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
29031 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
29032 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
29033 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
29034 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
29035 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
29036 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
29037 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
29038 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
29039 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
29040 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
29041 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
29042 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
29043 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
29044 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
29045 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
29046 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
29047 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
29048 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
29049 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
29050 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
29051 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
29052 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
29053 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
29054 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
29055 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
29056 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
29057 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
29058 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
29059 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
29060 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
29061 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
29062 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
29063 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
29064 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
29065 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
29066 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
29067 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
29068 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
29069 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
29070 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
29071 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
29072 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
29073 "\x85\x73\x78\x45\x20\x7f\xae\x13"
29074 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
29075 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
29076 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
29077 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
29078 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
29079 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
29080 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
29081 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
29082 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
29083 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
29084 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
29085 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
29086 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
29087 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
29088 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
29089 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
29090 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
29091 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
29092 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
29093 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
29094 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
29095 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
29096 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
29097 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
29098 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
29099 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
29100 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
29101 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
29102 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
29103 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
29104 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
29105 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
29106 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
29107 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
29108 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
29109 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
29110 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
29111 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
29112 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
29113 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
29114 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
29115 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
29116 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
29117 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
29118 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
29119 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
29120 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
29121 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
29122 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
29123 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
29124 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
29125 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
29126 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
29127 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
29128 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
29129 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
29130 "\xaf\xdf\x11\x95",
29131 .rlen = 4100,
29132 .np = 2,
29133 .tap = { 4064, 36 },
29134 },
29135};
29136
Martin Willi3590ebf2015-06-01 13:43:57 +020029137#define CHACHA20_ENC_TEST_VECTORS 3
29138static struct cipher_testvec chacha20_enc_tv_template[] = {
29139 { /* RFC7539 A.2. Test Vector #1 */
29140 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29141 "\x00\x00\x00\x00\x00\x00\x00\x00"
29142 "\x00\x00\x00\x00\x00\x00\x00\x00"
29143 "\x00\x00\x00\x00\x00\x00\x00\x00",
29144 .klen = 32,
29145 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29146 "\x00\x00\x00\x00\x00\x00\x00\x00",
29147 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29148 "\x00\x00\x00\x00\x00\x00\x00\x00"
29149 "\x00\x00\x00\x00\x00\x00\x00\x00"
29150 "\x00\x00\x00\x00\x00\x00\x00\x00"
29151 "\x00\x00\x00\x00\x00\x00\x00\x00"
29152 "\x00\x00\x00\x00\x00\x00\x00\x00"
29153 "\x00\x00\x00\x00\x00\x00\x00\x00"
29154 "\x00\x00\x00\x00\x00\x00\x00\x00",
29155 .ilen = 64,
29156 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
29157 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
29158 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
29159 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
29160 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
29161 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
29162 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
29163 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
29164 .rlen = 64,
29165 }, { /* RFC7539 A.2. Test Vector #2 */
29166 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29167 "\x00\x00\x00\x00\x00\x00\x00\x00"
29168 "\x00\x00\x00\x00\x00\x00\x00\x00"
29169 "\x00\x00\x00\x00\x00\x00\x00\x01",
29170 .klen = 32,
29171 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
29172 "\x00\x00\x00\x00\x00\x00\x00\x02",
29173 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
29174 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
29175 "\x6f\x20\x74\x68\x65\x20\x49\x45"
29176 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
29177 "\x64\x65\x64\x20\x62\x79\x20\x74"
29178 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
29179 "\x69\x62\x75\x74\x6f\x72\x20\x66"
29180 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
29181 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
29182 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
29183 "\x20\x70\x61\x72\x74\x20\x6f\x66"
29184 "\x20\x61\x6e\x20\x49\x45\x54\x46"
29185 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
29186 "\x74\x2d\x44\x72\x61\x66\x74\x20"
29187 "\x6f\x72\x20\x52\x46\x43\x20\x61"
29188 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
29189 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
29190 "\x20\x6d\x61\x64\x65\x20\x77\x69"
29191 "\x74\x68\x69\x6e\x20\x74\x68\x65"
29192 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
29193 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
29194 "\x45\x54\x46\x20\x61\x63\x74\x69"
29195 "\x76\x69\x74\x79\x20\x69\x73\x20"
29196 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
29197 "\x65\x64\x20\x61\x6e\x20\x22\x49"
29198 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
29199 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
29200 "\x22\x2e\x20\x53\x75\x63\x68\x20"
29201 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
29202 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
29203 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
29204 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
29205 "\x74\x73\x20\x69\x6e\x20\x49\x45"
29206 "\x54\x46\x20\x73\x65\x73\x73\x69"
29207 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
29208 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
29209 "\x77\x72\x69\x74\x74\x65\x6e\x20"
29210 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
29211 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
29212 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
29213 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
29214 "\x64\x65\x20\x61\x74\x20\x61\x6e"
29215 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
29216 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
29217 "\x20\x77\x68\x69\x63\x68\x20\x61"
29218 "\x72\x65\x20\x61\x64\x64\x72\x65"
29219 "\x73\x73\x65\x64\x20\x74\x6f",
29220 .ilen = 375,
29221 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
29222 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
29223 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
29224 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
29225 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
29226 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
29227 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
29228 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
29229 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
29230 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
29231 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
29232 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
29233 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
29234 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
29235 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
29236 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
29237 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
29238 "\xd6\x62\xab\x05\x26\x91\xca\x66"
29239 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
29240 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
29241 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
29242 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
29243 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
29244 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
29245 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
29246 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
29247 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
29248 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
29249 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
29250 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
29251 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
29252 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
29253 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
29254 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
29255 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
29256 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
29257 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
29258 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
29259 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
29260 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
29261 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
29262 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
29263 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
29264 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
29265 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
29266 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
29267 "\xc4\xfd\x80\x6c\x22\xf2\x21",
29268 .rlen = 375,
29269 }, { /* RFC7539 A.2. Test Vector #3 */
29270 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
29271 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
29272 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
29273 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
29274 .klen = 32,
29275 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
29276 "\x00\x00\x00\x00\x00\x00\x00\x02",
29277 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
29278 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
29279 "\x6e\x64\x20\x74\x68\x65\x20\x73"
29280 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
29281 "\x76\x65\x73\x0a\x44\x69\x64\x20"
29282 "\x67\x79\x72\x65\x20\x61\x6e\x64"
29283 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
29284 "\x69\x6e\x20\x74\x68\x65\x20\x77"
29285 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
29286 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
29287 "\x65\x72\x65\x20\x74\x68\x65\x20"
29288 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
29289 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
29290 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
29291 "\x72\x61\x74\x68\x73\x20\x6f\x75"
29292 "\x74\x67\x72\x61\x62\x65\x2e",
29293 .ilen = 127,
29294 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
29295 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
29296 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
29297 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
29298 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
29299 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
29300 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
29301 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
29302 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
29303 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
29304 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
29305 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
29306 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
29307 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
29308 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
29309 "\x75\x7a\x79\x7a\xc1\x88\xd1",
29310 .rlen = 127,
29311 },
29312};
29313
Herbert Xuda7f0332008-07-31 17:08:25 +080029314/*
29315 * CTS (Cipher Text Stealing) mode tests
29316 */
29317#define CTS_MODE_ENC_TEST_VECTORS 6
29318#define CTS_MODE_DEC_TEST_VECTORS 6
29319static struct cipher_testvec cts_mode_enc_tv_template[] = {
29320 { /* from rfc3962 */
29321 .klen = 16,
29322 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29323 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29324 .ilen = 17,
29325 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29326 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29327 "\x20",
29328 .rlen = 17,
29329 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
29330 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
29331 "\x97",
29332 }, {
29333 .klen = 16,
29334 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29335 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29336 .ilen = 31,
29337 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29338 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29339 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29340 "\x20\x47\x61\x75\x27\x73\x20",
29341 .rlen = 31,
29342 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
29343 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
29344 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29345 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
29346 }, {
29347 .klen = 16,
29348 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29349 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29350 .ilen = 32,
29351 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29352 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29353 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29354 "\x20\x47\x61\x75\x27\x73\x20\x43",
29355 .rlen = 32,
29356 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29357 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29358 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29359 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
29360 }, {
29361 .klen = 16,
29362 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29363 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29364 .ilen = 47,
29365 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29366 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29367 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29368 "\x20\x47\x61\x75\x27\x73\x20\x43"
29369 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29370 "\x70\x6c\x65\x61\x73\x65\x2c",
29371 .rlen = 47,
29372 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29373 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29374 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
29375 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
29376 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29377 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
29378 }, {
29379 .klen = 16,
29380 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29381 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29382 .ilen = 48,
29383 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29384 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29385 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29386 "\x20\x47\x61\x75\x27\x73\x20\x43"
29387 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29388 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
29389 .rlen = 48,
29390 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29391 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29392 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29393 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
29394 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29395 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
29396 }, {
29397 .klen = 16,
29398 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29399 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29400 .ilen = 64,
29401 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29402 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29403 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29404 "\x20\x47\x61\x75\x27\x73\x20\x43"
29405 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29406 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
29407 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
29408 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
29409 .rlen = 64,
29410 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29411 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29412 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29413 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29414 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
29415 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
29416 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29417 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
29418 }
29419};
29420
29421static struct cipher_testvec cts_mode_dec_tv_template[] = {
29422 { /* from rfc3962 */
29423 .klen = 16,
29424 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29425 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29426 .rlen = 17,
29427 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29428 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29429 "\x20",
29430 .ilen = 17,
29431 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
29432 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
29433 "\x97",
29434 }, {
29435 .klen = 16,
29436 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29437 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29438 .rlen = 31,
29439 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29440 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29441 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29442 "\x20\x47\x61\x75\x27\x73\x20",
29443 .ilen = 31,
29444 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
29445 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
29446 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29447 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
29448 }, {
29449 .klen = 16,
29450 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29451 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29452 .rlen = 32,
29453 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29454 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29455 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29456 "\x20\x47\x61\x75\x27\x73\x20\x43",
29457 .ilen = 32,
29458 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29459 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29460 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29461 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
29462 }, {
29463 .klen = 16,
29464 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29465 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29466 .rlen = 47,
29467 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29468 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29469 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29470 "\x20\x47\x61\x75\x27\x73\x20\x43"
29471 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29472 "\x70\x6c\x65\x61\x73\x65\x2c",
29473 .ilen = 47,
29474 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29475 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29476 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
29477 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
29478 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29479 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
29480 }, {
29481 .klen = 16,
29482 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29483 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29484 .rlen = 48,
29485 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29486 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29487 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29488 "\x20\x47\x61\x75\x27\x73\x20\x43"
29489 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29490 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
29491 .ilen = 48,
29492 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29493 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29494 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29495 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
29496 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29497 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
29498 }, {
29499 .klen = 16,
29500 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29501 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29502 .rlen = 64,
29503 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29504 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29505 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29506 "\x20\x47\x61\x75\x27\x73\x20\x43"
29507 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29508 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
29509 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
29510 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
29511 .ilen = 64,
29512 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29513 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29514 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29515 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29516 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
29517 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
29518 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29519 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
29520 }
29521};
29522
29523/*
29524 * Compression stuff.
29525 */
29526#define COMP_BUF_SIZE 512
29527
29528struct comp_testvec {
29529 int inlen, outlen;
29530 char input[COMP_BUF_SIZE];
29531 char output[COMP_BUF_SIZE];
29532};
29533
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080029534struct pcomp_testvec {
David Howellsf94a3592015-04-28 15:36:30 +010029535 const void *params;
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080029536 unsigned int paramsize;
29537 int inlen, outlen;
29538 char input[COMP_BUF_SIZE];
29539 char output[COMP_BUF_SIZE];
29540};
29541
Herbert Xuda7f0332008-07-31 17:08:25 +080029542/*
29543 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110029544 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080029545 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080029546
Herbert Xuda7f0332008-07-31 17:08:25 +080029547#define DEFLATE_COMP_TEST_VECTORS 2
29548#define DEFLATE_DECOMP_TEST_VECTORS 2
29549
29550static struct comp_testvec deflate_comp_tv_template[] = {
29551 {
29552 .inlen = 70,
29553 .outlen = 38,
29554 .input = "Join us now and share the software "
29555 "Join us now and share the software ",
29556 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29557 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29558 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29559 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29560 "\x71\xbc\x08\x2b\x01\x00",
29561 }, {
29562 .inlen = 191,
29563 .outlen = 122,
29564 .input = "This document describes a compression method based on the DEFLATE"
29565 "compression algorithm. This document defines the application of "
29566 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29567 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29568 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29569 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29570 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29571 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29572 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29573 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29574 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29575 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29576 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29577 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29578 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29579 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29580 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29581 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29582 "\xfa\x02",
29583 },
29584};
29585
29586static struct comp_testvec deflate_decomp_tv_template[] = {
29587 {
29588 .inlen = 122,
29589 .outlen = 191,
29590 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29591 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29592 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29593 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29594 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29595 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29596 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29597 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29598 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29599 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29600 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29601 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29602 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29603 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29604 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29605 "\xfa\x02",
29606 .output = "This document describes a compression method based on the DEFLATE"
29607 "compression algorithm. This document defines the application of "
29608 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29609 }, {
29610 .inlen = 38,
29611 .outlen = 70,
29612 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29613 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29614 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29615 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29616 "\x71\xbc\x08\x2b\x01\x00",
29617 .output = "Join us now and share the software "
29618 "Join us now and share the software ",
29619 },
29620};
29621
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080029622#define ZLIB_COMP_TEST_VECTORS 2
29623#define ZLIB_DECOMP_TEST_VECTORS 2
29624
29625static const struct {
29626 struct nlattr nla;
29627 int val;
29628} deflate_comp_params[] = {
29629 {
29630 .nla = {
29631 .nla_len = NLA_HDRLEN + sizeof(int),
29632 .nla_type = ZLIB_COMP_LEVEL,
29633 },
29634 .val = Z_DEFAULT_COMPRESSION,
29635 }, {
29636 .nla = {
29637 .nla_len = NLA_HDRLEN + sizeof(int),
29638 .nla_type = ZLIB_COMP_METHOD,
29639 },
29640 .val = Z_DEFLATED,
29641 }, {
29642 .nla = {
29643 .nla_len = NLA_HDRLEN + sizeof(int),
29644 .nla_type = ZLIB_COMP_WINDOWBITS,
29645 },
29646 .val = -11,
29647 }, {
29648 .nla = {
29649 .nla_len = NLA_HDRLEN + sizeof(int),
29650 .nla_type = ZLIB_COMP_MEMLEVEL,
29651 },
29652 .val = MAX_MEM_LEVEL,
29653 }, {
29654 .nla = {
29655 .nla_len = NLA_HDRLEN + sizeof(int),
29656 .nla_type = ZLIB_COMP_STRATEGY,
29657 },
29658 .val = Z_DEFAULT_STRATEGY,
29659 }
29660};
29661
29662static const struct {
29663 struct nlattr nla;
29664 int val;
29665} deflate_decomp_params[] = {
29666 {
29667 .nla = {
29668 .nla_len = NLA_HDRLEN + sizeof(int),
29669 .nla_type = ZLIB_DECOMP_WINDOWBITS,
29670 },
29671 .val = -11,
29672 }
29673};
29674
29675static struct pcomp_testvec zlib_comp_tv_template[] = {
29676 {
29677 .params = &deflate_comp_params,
29678 .paramsize = sizeof(deflate_comp_params),
29679 .inlen = 70,
29680 .outlen = 38,
29681 .input = "Join us now and share the software "
29682 "Join us now and share the software ",
29683 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29684 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29685 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29686 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29687 "\x71\xbc\x08\x2b\x01\x00",
29688 }, {
29689 .params = &deflate_comp_params,
29690 .paramsize = sizeof(deflate_comp_params),
29691 .inlen = 191,
29692 .outlen = 122,
29693 .input = "This document describes a compression method based on the DEFLATE"
29694 "compression algorithm. This document defines the application of "
29695 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29696 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29697 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29698 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29699 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29700 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29701 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29702 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29703 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29704 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29705 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29706 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29707 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29708 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29709 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29710 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29711 "\xfa\x02",
29712 },
29713};
29714
29715static struct pcomp_testvec zlib_decomp_tv_template[] = {
29716 {
29717 .params = &deflate_decomp_params,
29718 .paramsize = sizeof(deflate_decomp_params),
29719 .inlen = 122,
29720 .outlen = 191,
29721 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29722 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29723 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29724 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29725 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29726 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29727 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29728 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29729 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29730 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29731 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29732 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29733 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29734 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29735 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29736 "\xfa\x02",
29737 .output = "This document describes a compression method based on the DEFLATE"
29738 "compression algorithm. This document defines the application of "
29739 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29740 }, {
29741 .params = &deflate_decomp_params,
29742 .paramsize = sizeof(deflate_decomp_params),
29743 .inlen = 38,
29744 .outlen = 70,
29745 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29746 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29747 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29748 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29749 "\x71\xbc\x08\x2b\x01\x00",
29750 .output = "Join us now and share the software "
29751 "Join us now and share the software ",
29752 },
29753};
29754
Herbert Xuda7f0332008-07-31 17:08:25 +080029755/*
29756 * LZO test vectors (null-terminated strings).
29757 */
29758#define LZO_COMP_TEST_VECTORS 2
29759#define LZO_DECOMP_TEST_VECTORS 2
29760
29761static struct comp_testvec lzo_comp_tv_template[] = {
29762 {
29763 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029764 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080029765 .input = "Join us now and share the software "
29766 "Join us now and share the software ",
29767 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029768 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
29769 "\x64\x20\x73\x68\x61\x72\x65\x20"
29770 "\x74\x68\x65\x20\x73\x6f\x66\x74"
29771 "\x77\x70\x01\x32\x88\x00\x0c\x65"
29772 "\x20\x74\x68\x65\x20\x73\x6f\x66"
29773 "\x74\x77\x61\x72\x65\x20\x11\x00"
29774 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080029775 }, {
29776 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029777 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080029778 .input = "This document describes a compression method based on the LZO "
29779 "compression algorithm. This document defines the application of "
29780 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029781 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080029782 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
29783 "\x64\x65\x73\x63\x72\x69\x62\x65"
29784 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
29785 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
29786 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
29787 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029788 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
29789 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
29790 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
29791 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
29792 "\x73\x20\x74\x06\x05\x61\x70\x70"
29793 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
29794 "\x66\x88\x02\x60\x09\x27\xf0\x00"
29795 "\x0c\x20\x75\x73\x65\x64\x20\x69"
29796 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
29797 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080029798 },
29799};
29800
29801static struct comp_testvec lzo_decomp_tv_template[] = {
29802 {
29803 .inlen = 133,
29804 .outlen = 159,
29805 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
29806 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
29807 "\x64\x65\x73\x63\x72\x69\x62\x65"
29808 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
29809 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
29810 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
29811 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
29812 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
29813 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
29814 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
29815 "\x68\x69\x73\x2a\x54\x01\x02\x66"
29816 "\x69\x6e\x65\x73\x94\x06\x05\x61"
29817 "\x70\x70\x6c\x69\x63\x61\x74\x76"
29818 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
29819 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
29820 "\x20\x69\x6e\x20\x55\x42\x49\x46"
29821 "\x53\x2e\x11\x00\x00",
29822 .output = "This document describes a compression method based on the LZO "
29823 "compression algorithm. This document defines the application of "
29824 "the LZO algorithm used in UBIFS.",
29825 }, {
29826 .inlen = 46,
29827 .outlen = 70,
29828 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
29829 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
29830 "\x64\x20\x73\x68\x61\x72\x65\x20"
29831 "\x74\x68\x65\x20\x73\x6f\x66\x74"
29832 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
29833 "\x3d\x88\x00\x11\x00\x00",
29834 .output = "Join us now and share the software "
29835 "Join us now and share the software ",
29836 },
29837};
29838
29839/*
29840 * Michael MIC test vectors from IEEE 802.11i
29841 */
29842#define MICHAEL_MIC_TEST_VECTORS 6
29843
29844static struct hash_testvec michael_mic_tv_template[] = {
29845 {
29846 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
29847 .ksize = 8,
29848 .plaintext = zeroed_string,
29849 .psize = 0,
29850 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
29851 },
29852 {
29853 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
29854 .ksize = 8,
29855 .plaintext = "M",
29856 .psize = 1,
29857 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
29858 },
29859 {
29860 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
29861 .ksize = 8,
29862 .plaintext = "Mi",
29863 .psize = 2,
29864 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
29865 },
29866 {
29867 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
29868 .ksize = 8,
29869 .plaintext = "Mic",
29870 .psize = 3,
29871 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
29872 },
29873 {
29874 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
29875 .ksize = 8,
29876 .plaintext = "Mich",
29877 .psize = 4,
29878 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
29879 },
29880 {
29881 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
29882 .ksize = 8,
29883 .plaintext = "Michael",
29884 .psize = 7,
29885 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
29886 }
29887};
29888
29889/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020029890 * CRC32 test vectors
29891 */
29892#define CRC32_TEST_VECTORS 14
29893
29894static struct hash_testvec crc32_tv_template[] = {
29895 {
29896 .key = "\x87\xa9\xcb\xed",
29897 .ksize = 4,
29898 .psize = 0,
29899 .digest = "\x87\xa9\xcb\xed",
29900 },
29901 {
29902 .key = "\xff\xff\xff\xff",
29903 .ksize = 4,
29904 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
29905 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
29906 "\x11\x12\x13\x14\x15\x16\x17\x18"
29907 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
29908 "\x21\x22\x23\x24\x25\x26\x27\x28",
29909 .psize = 40,
29910 .digest = "\x3a\xdf\x4b\xb0",
29911 },
29912 {
29913 .key = "\xff\xff\xff\xff",
29914 .ksize = 4,
29915 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
29916 "\x31\x32\x33\x34\x35\x36\x37\x38"
29917 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
29918 "\x41\x42\x43\x44\x45\x46\x47\x48"
29919 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
29920 .psize = 40,
29921 .digest = "\xa9\x7a\x7f\x7b",
29922 },
29923 {
29924 .key = "\xff\xff\xff\xff",
29925 .ksize = 4,
29926 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
29927 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
29928 "\x61\x62\x63\x64\x65\x66\x67\x68"
29929 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
29930 "\x71\x72\x73\x74\x75\x76\x77\x78",
29931 .psize = 40,
29932 .digest = "\xba\xd3\xf8\x1c",
29933 },
29934 {
29935 .key = "\xff\xff\xff\xff",
29936 .ksize = 4,
29937 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
29938 "\x81\x82\x83\x84\x85\x86\x87\x88"
29939 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
29940 "\x91\x92\x93\x94\x95\x96\x97\x98"
29941 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
29942 .psize = 40,
29943 .digest = "\xa8\xa9\xc2\x02",
29944 },
29945 {
29946 .key = "\xff\xff\xff\xff",
29947 .ksize = 4,
29948 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
29949 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
29950 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
29951 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
29952 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
29953 .psize = 40,
29954 .digest = "\x27\xf0\x57\xe2",
29955 },
29956 {
29957 .key = "\xff\xff\xff\xff",
29958 .ksize = 4,
29959 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
29960 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
29961 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
29962 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
29963 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
29964 .psize = 40,
29965 .digest = "\x49\x78\x10\x08",
29966 },
29967 {
29968 .key = "\x80\xea\xd3\xf1",
29969 .ksize = 4,
29970 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
29971 "\x31\x32\x33\x34\x35\x36\x37\x38"
29972 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
29973 "\x41\x42\x43\x44\x45\x46\x47\x48"
29974 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
29975 .psize = 40,
29976 .digest = "\x9a\xb1\xdc\xf0",
29977 },
29978 {
29979 .key = "\xf3\x4a\x1d\x5d",
29980 .ksize = 4,
29981 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
29982 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
29983 "\x61\x62\x63\x64\x65\x66\x67\x68"
29984 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
29985 "\x71\x72\x73\x74\x75\x76\x77\x78",
29986 .psize = 40,
29987 .digest = "\xb4\x97\xcc\xd4",
29988 },
29989 {
29990 .key = "\x2e\x80\x04\x59",
29991 .ksize = 4,
29992 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
29993 "\x81\x82\x83\x84\x85\x86\x87\x88"
29994 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
29995 "\x91\x92\x93\x94\x95\x96\x97\x98"
29996 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
29997 .psize = 40,
29998 .digest = "\x67\x9b\xfa\x79",
29999 },
30000 {
30001 .key = "\xa6\xcc\x19\x85",
30002 .ksize = 4,
30003 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30004 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30005 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30006 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30007 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30008 .psize = 40,
30009 .digest = "\x24\xb5\x16\xef",
30010 },
30011 {
30012 .key = "\x41\xfc\xfe\x2d",
30013 .ksize = 4,
30014 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30015 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30016 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30017 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30018 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30019 .psize = 40,
30020 .digest = "\x15\x94\x80\x39",
30021 },
30022 {
30023 .key = "\xff\xff\xff\xff",
30024 .ksize = 4,
30025 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30026 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30027 "\x11\x12\x13\x14\x15\x16\x17\x18"
30028 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30029 "\x21\x22\x23\x24\x25\x26\x27\x28"
30030 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30031 "\x31\x32\x33\x34\x35\x36\x37\x38"
30032 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30033 "\x41\x42\x43\x44\x45\x46\x47\x48"
30034 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30035 "\x51\x52\x53\x54\x55\x56\x57\x58"
30036 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30037 "\x61\x62\x63\x64\x65\x66\x67\x68"
30038 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30039 "\x71\x72\x73\x74\x75\x76\x77\x78"
30040 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30041 "\x81\x82\x83\x84\x85\x86\x87\x88"
30042 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30043 "\x91\x92\x93\x94\x95\x96\x97\x98"
30044 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30045 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30046 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30047 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30048 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30049 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30050 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30051 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30052 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30053 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30054 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30055 .psize = 240,
30056 .digest = "\x6c\xc6\x56\xde",
30057 .np = 2,
30058 .tap = { 31, 209 }
30059 }, {
30060 .key = "\xff\xff\xff\xff",
30061 .ksize = 4,
30062 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
30063 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
30064 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
30065 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
30066 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
30067 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
30068 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
30069 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
30070 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
30071 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
30072 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
30073 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
30074 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
30075 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
30076 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
30077 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
30078 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
30079 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
30080 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
30081 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
30082 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
30083 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
30084 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
30085 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
30086 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
30087 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
30088 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
30089 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
30090 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
30091 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
30092 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
30093 "\x47\xde\x75\x0c\x80\x17\xae\x22"
30094 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
30095 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
30096 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
30097 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
30098 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
30099 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
30100 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
30101 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
30102 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
30103 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
30104 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
30105 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
30106 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
30107 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
30108 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
30109 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
30110 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
30111 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
30112 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
30113 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
30114 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
30115 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
30116 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
30117 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
30118 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
30119 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
30120 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
30121 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
30122 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
30123 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
30124 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
30125 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
30126 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
30127 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
30128 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
30129 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
30130 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
30131 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
30132 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
30133 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
30134 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
30135 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
30136 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
30137 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
30138 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
30139 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
30140 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
30141 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
30142 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
30143 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
30144 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
30145 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
30146 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
30147 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
30148 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
30149 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
30150 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
30151 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
30152 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
30153 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
30154 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
30155 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
30156 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
30157 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
30158 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
30159 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
30160 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
30161 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
30162 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
30163 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
30164 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
30165 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
30166 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
30167 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
30168 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
30169 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
30170 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
30171 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
30172 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
30173 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
30174 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
30175 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
30176 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
30177 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
30178 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
30179 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
30180 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
30181 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
30182 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
30183 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
30184 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
30185 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
30186 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
30187 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
30188 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
30189 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
30190 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
30191 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
30192 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
30193 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
30194 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
30195 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
30196 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
30197 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
30198 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
30199 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
30200 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
30201 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
30202 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
30203 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
30204 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
30205 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
30206 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
30207 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
30208 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
30209 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
30210 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
30211 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
30212 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
30213 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
30214 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
30215 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
30216 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
30217 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
30218 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
30219 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
30220 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
30221 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
30222 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
30223 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
30224 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
30225 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
30226 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
30227 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
30228 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
30229 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
30230 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
30231 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
30232 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
30233 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
30234 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
30235 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
30236 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
30237 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
30238 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
30239 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
30240 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
30241 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
30242 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
30243 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
30244 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
30245 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
30246 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
30247 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
30248 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
30249 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
30250 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
30251 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
30252 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
30253 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
30254 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
30255 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
30256 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
30257 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
30258 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
30259 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
30260 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
30261 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
30262 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
30263 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
30264 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
30265 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
30266 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
30267 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
30268 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
30269 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
30270 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
30271 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
30272 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
30273 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
30274 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
30275 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
30276 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
30277 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
30278 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
30279 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
30280 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
30281 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
30282 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
30283 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
30284 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
30285 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
30286 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
30287 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
30288 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
30289 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
30290 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
30291 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
30292 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
30293 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
30294 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
30295 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
30296 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
30297 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
30298 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
30299 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
30300 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
30301 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
30302 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
30303 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
30304 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
30305 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
30306 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
30307 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
30308 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
30309 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
30310 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
30311 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
30312 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
30313 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
30314 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
30315 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
30316 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
30317 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
30318 .psize = 2048,
30319 .digest = "\xfb\x3a\x7a\xda",
30320 }
30321};
30322
30323/*
Herbert Xuda7f0332008-07-31 17:08:25 +080030324 * CRC32C test vectors
30325 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020030326#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080030327
30328static struct hash_testvec crc32c_tv_template[] = {
30329 {
30330 .psize = 0,
30331 .digest = "\x00\x00\x00\x00",
30332 },
30333 {
30334 .key = "\x87\xa9\xcb\xed",
30335 .ksize = 4,
30336 .psize = 0,
30337 .digest = "\x78\x56\x34\x12",
30338 },
30339 {
30340 .key = "\xff\xff\xff\xff",
30341 .ksize = 4,
30342 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30343 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30344 "\x11\x12\x13\x14\x15\x16\x17\x18"
30345 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30346 "\x21\x22\x23\x24\x25\x26\x27\x28",
30347 .psize = 40,
30348 .digest = "\x7f\x15\x2c\x0e",
30349 },
30350 {
30351 .key = "\xff\xff\xff\xff",
30352 .ksize = 4,
30353 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30354 "\x31\x32\x33\x34\x35\x36\x37\x38"
30355 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30356 "\x41\x42\x43\x44\x45\x46\x47\x48"
30357 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30358 .psize = 40,
30359 .digest = "\xf6\xeb\x80\xe9",
30360 },
30361 {
30362 .key = "\xff\xff\xff\xff",
30363 .ksize = 4,
30364 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30365 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30366 "\x61\x62\x63\x64\x65\x66\x67\x68"
30367 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30368 "\x71\x72\x73\x74\x75\x76\x77\x78",
30369 .psize = 40,
30370 .digest = "\xed\xbd\x74\xde",
30371 },
30372 {
30373 .key = "\xff\xff\xff\xff",
30374 .ksize = 4,
30375 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30376 "\x81\x82\x83\x84\x85\x86\x87\x88"
30377 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30378 "\x91\x92\x93\x94\x95\x96\x97\x98"
30379 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30380 .psize = 40,
30381 .digest = "\x62\xc8\x79\xd5",
30382 },
30383 {
30384 .key = "\xff\xff\xff\xff",
30385 .ksize = 4,
30386 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30387 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30388 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30389 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30390 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30391 .psize = 40,
30392 .digest = "\xd0\x9a\x97\xba",
30393 },
30394 {
30395 .key = "\xff\xff\xff\xff",
30396 .ksize = 4,
30397 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30398 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30399 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30400 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30401 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30402 .psize = 40,
30403 .digest = "\x13\xd9\x29\x2b",
30404 },
30405 {
30406 .key = "\x80\xea\xd3\xf1",
30407 .ksize = 4,
30408 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30409 "\x31\x32\x33\x34\x35\x36\x37\x38"
30410 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30411 "\x41\x42\x43\x44\x45\x46\x47\x48"
30412 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30413 .psize = 40,
30414 .digest = "\x0c\xb5\xe2\xa2",
30415 },
30416 {
30417 .key = "\xf3\x4a\x1d\x5d",
30418 .ksize = 4,
30419 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30420 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30421 "\x61\x62\x63\x64\x65\x66\x67\x68"
30422 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30423 "\x71\x72\x73\x74\x75\x76\x77\x78",
30424 .psize = 40,
30425 .digest = "\xd1\x7f\xfb\xa6",
30426 },
30427 {
30428 .key = "\x2e\x80\x04\x59",
30429 .ksize = 4,
30430 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30431 "\x81\x82\x83\x84\x85\x86\x87\x88"
30432 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30433 "\x91\x92\x93\x94\x95\x96\x97\x98"
30434 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30435 .psize = 40,
30436 .digest = "\x59\x33\xe6\x7a",
30437 },
30438 {
30439 .key = "\xa6\xcc\x19\x85",
30440 .ksize = 4,
30441 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30442 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30443 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30444 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30445 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30446 .psize = 40,
30447 .digest = "\xbe\x03\x01\xd2",
30448 },
30449 {
30450 .key = "\x41\xfc\xfe\x2d",
30451 .ksize = 4,
30452 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30453 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30454 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30455 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30456 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30457 .psize = 40,
30458 .digest = "\x75\xd3\xc5\x24",
30459 },
30460 {
30461 .key = "\xff\xff\xff\xff",
30462 .ksize = 4,
30463 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30464 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30465 "\x11\x12\x13\x14\x15\x16\x17\x18"
30466 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30467 "\x21\x22\x23\x24\x25\x26\x27\x28"
30468 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30469 "\x31\x32\x33\x34\x35\x36\x37\x38"
30470 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30471 "\x41\x42\x43\x44\x45\x46\x47\x48"
30472 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30473 "\x51\x52\x53\x54\x55\x56\x57\x58"
30474 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30475 "\x61\x62\x63\x64\x65\x66\x67\x68"
30476 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30477 "\x71\x72\x73\x74\x75\x76\x77\x78"
30478 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30479 "\x81\x82\x83\x84\x85\x86\x87\x88"
30480 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30481 "\x91\x92\x93\x94\x95\x96\x97\x98"
30482 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30483 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30484 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30485 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30486 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30487 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30488 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30489 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30490 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30491 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30492 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30493 .psize = 240,
30494 .digest = "\x75\xd3\xc5\x24",
30495 .np = 2,
30496 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020030497 }, {
30498 .key = "\xff\xff\xff\xff",
30499 .ksize = 4,
30500 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
30501 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
30502 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
30503 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
30504 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
30505 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
30506 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
30507 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
30508 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
30509 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
30510 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
30511 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
30512 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
30513 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
30514 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
30515 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
30516 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
30517 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
30518 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
30519 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
30520 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
30521 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
30522 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
30523 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
30524 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
30525 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
30526 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
30527 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
30528 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
30529 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
30530 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
30531 "\x47\xde\x75\x0c\x80\x17\xae\x22"
30532 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
30533 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
30534 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
30535 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
30536 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
30537 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
30538 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
30539 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
30540 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
30541 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
30542 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
30543 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
30544 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
30545 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
30546 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
30547 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
30548 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
30549 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
30550 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
30551 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
30552 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
30553 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
30554 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
30555 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
30556 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
30557 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
30558 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
30559 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
30560 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
30561 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
30562 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
30563 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
30564 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
30565 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
30566 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
30567 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
30568 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
30569 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
30570 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
30571 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
30572 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
30573 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
30574 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
30575 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
30576 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
30577 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
30578 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
30579 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
30580 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
30581 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
30582 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
30583 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
30584 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
30585 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
30586 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
30587 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
30588 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
30589 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
30590 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
30591 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
30592 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
30593 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
30594 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
30595 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
30596 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
30597 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
30598 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
30599 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
30600 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
30601 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
30602 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
30603 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
30604 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
30605 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
30606 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
30607 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
30608 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
30609 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
30610 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
30611 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
30612 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
30613 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
30614 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
30615 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
30616 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
30617 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
30618 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
30619 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
30620 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
30621 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
30622 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
30623 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
30624 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
30625 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
30626 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
30627 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
30628 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
30629 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
30630 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
30631 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
30632 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
30633 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
30634 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
30635 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
30636 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
30637 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
30638 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
30639 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
30640 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
30641 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
30642 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
30643 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
30644 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
30645 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
30646 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
30647 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
30648 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
30649 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
30650 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
30651 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
30652 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
30653 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
30654 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
30655 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
30656 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
30657 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
30658 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
30659 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
30660 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
30661 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
30662 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
30663 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
30664 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
30665 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
30666 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
30667 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
30668 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
30669 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
30670 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
30671 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
30672 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
30673 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
30674 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
30675 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
30676 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
30677 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
30678 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
30679 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
30680 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
30681 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
30682 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
30683 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
30684 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
30685 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
30686 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
30687 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
30688 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
30689 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
30690 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
30691 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
30692 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
30693 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
30694 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
30695 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
30696 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
30697 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
30698 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
30699 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
30700 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
30701 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
30702 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
30703 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
30704 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
30705 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
30706 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
30707 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
30708 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
30709 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
30710 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
30711 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
30712 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
30713 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
30714 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
30715 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
30716 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
30717 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
30718 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
30719 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
30720 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
30721 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
30722 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
30723 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
30724 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
30725 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
30726 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
30727 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
30728 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
30729 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
30730 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
30731 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
30732 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
30733 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
30734 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
30735 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
30736 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
30737 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
30738 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
30739 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
30740 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
30741 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
30742 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
30743 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
30744 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
30745 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
30746 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
30747 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
30748 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
30749 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
30750 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
30751 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
30752 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
30753 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
30754 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
30755 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
30756 .psize = 2048,
30757 .digest = "\xec\x26\x4d\x95",
30758 }
Herbert Xuda7f0332008-07-31 17:08:25 +080030759};
30760
Sonic Zhanga482b082012-05-25 17:54:13 +080030761/*
30762 * Blakcifn CRC test vectors
30763 */
30764#define BFIN_CRC_TEST_VECTORS 6
30765
30766static struct hash_testvec bfin_crc_tv_template[] = {
30767 {
30768 .psize = 0,
30769 .digest = "\x00\x00\x00\x00",
30770 },
30771 {
30772 .key = "\x87\xa9\xcb\xed",
30773 .ksize = 4,
30774 .psize = 0,
30775 .digest = "\x87\xa9\xcb\xed",
30776 },
30777 {
30778 .key = "\xff\xff\xff\xff",
30779 .ksize = 4,
30780 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30781 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30782 "\x11\x12\x13\x14\x15\x16\x17\x18"
30783 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30784 "\x21\x22\x23\x24\x25\x26\x27\x28",
30785 .psize = 40,
30786 .digest = "\x84\x0c\x8d\xa2",
30787 },
30788 {
30789 .key = "\xff\xff\xff\xff",
30790 .ksize = 4,
30791 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30792 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30793 "\x11\x12\x13\x14\x15\x16\x17\x18"
30794 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30795 "\x21\x22\x23\x24\x25\x26",
30796 .psize = 38,
30797 .digest = "\x8c\x58\xec\xb7",
30798 },
30799 {
30800 .key = "\xff\xff\xff\xff",
30801 .ksize = 4,
30802 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30803 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30804 "\x11\x12\x13\x14\x15\x16\x17\x18"
30805 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30806 "\x21\x22\x23\x24\x25\x26\x27",
30807 .psize = 39,
30808 .digest = "\xdc\x50\x28\x7b",
30809 },
30810 {
30811 .key = "\xff\xff\xff\xff",
30812 .ksize = 4,
30813 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30814 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30815 "\x11\x12\x13\x14\x15\x16\x17\x18"
30816 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30817 "\x21\x22\x23\x24\x25\x26\x27\x28"
30818 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30819 "\x31\x32\x33\x34\x35\x36\x37\x38"
30820 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30821 "\x41\x42\x43\x44\x45\x46\x47\x48"
30822 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30823 "\x51\x52\x53\x54\x55\x56\x57\x58"
30824 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30825 "\x61\x62\x63\x64\x65\x66\x67\x68"
30826 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30827 "\x71\x72\x73\x74\x75\x76\x77\x78"
30828 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30829 "\x81\x82\x83\x84\x85\x86\x87\x88"
30830 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30831 "\x91\x92\x93\x94\x95\x96\x97\x98"
30832 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30833 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30834 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30835 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30836 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30837 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30838 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30839 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30840 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30841 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30842 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30843 .psize = 240,
30844 .digest = "\x10\x19\x4a\x5c",
30845 .np = 2,
30846 .tap = { 31, 209 }
30847 },
30848
30849};
30850
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020030851#define LZ4_COMP_TEST_VECTORS 1
30852#define LZ4_DECOMP_TEST_VECTORS 1
30853
30854static struct comp_testvec lz4_comp_tv_template[] = {
30855 {
30856 .inlen = 70,
30857 .outlen = 45,
30858 .input = "Join us now and share the software "
30859 "Join us now and share the software ",
30860 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30861 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30862 "\x64\x20\x73\x68\x61\x72\x65\x20"
30863 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30864 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30865 "\x77\x61\x72\x65\x20",
30866 },
30867};
30868
30869static struct comp_testvec lz4_decomp_tv_template[] = {
30870 {
30871 .inlen = 45,
30872 .outlen = 70,
30873 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30874 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30875 "\x64\x20\x73\x68\x61\x72\x65\x20"
30876 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30877 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30878 "\x77\x61\x72\x65\x20",
30879 .output = "Join us now and share the software "
30880 "Join us now and share the software ",
30881 },
30882};
30883
30884#define LZ4HC_COMP_TEST_VECTORS 1
30885#define LZ4HC_DECOMP_TEST_VECTORS 1
30886
30887static struct comp_testvec lz4hc_comp_tv_template[] = {
30888 {
30889 .inlen = 70,
30890 .outlen = 45,
30891 .input = "Join us now and share the software "
30892 "Join us now and share the software ",
30893 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30894 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30895 "\x64\x20\x73\x68\x61\x72\x65\x20"
30896 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30897 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30898 "\x77\x61\x72\x65\x20",
30899 },
30900};
30901
30902static struct comp_testvec lz4hc_decomp_tv_template[] = {
30903 {
30904 .inlen = 45,
30905 .outlen = 70,
30906 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30907 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30908 "\x64\x20\x73\x68\x61\x72\x65\x20"
30909 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30910 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30911 "\x77\x61\x72\x65\x20",
30912 .output = "Join us now and share the software "
30913 "Join us now and share the software ",
30914 },
30915};
30916
Herbert Xuda7f0332008-07-31 17:08:25 +080030917#endif /* _CRYPTO_TESTMGR_H */