blob: 4c2b3e57defa77fd2344a99d1f470eb1b36ac61b [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
LABBE Corentina7eed152015-06-05 11:39:22 +020049/*
50 * cipher_testvec: structure to describe a cipher test
51 * @key: A pointer to a key used by the test
52 * @klen: The length of @key
53 * @iv: A pointer to the IV used by the test
54 * @input: A pointer to data used as input
55 * @ilen The length of data in @input
56 * @result: A pointer to what the test need to produce
57 * @rlen: The length of data in @result
58 * @fail: If set to one, the test need to fail
59 * @wk: Does the test need CRYPTO_TFM_REQ_WEAK_KEY
60 * ( e.g. test needs to fail due to a weak key )
61 * @np: numbers of SG to distribute data in (from 1 to MAX_TAP)
62 * @tap: How to distribute data in @np SGs
63 * @also_non_np: if set to 1, the test will be also done without
64 * splitting data in @np SGs
65 */
66
Herbert Xuda7f0332008-07-31 17:08:25 +080067struct cipher_testvec {
68 char *key;
69 char *iv;
70 char *input;
71 char *result;
72 unsigned short tap[MAX_TAP];
73 int np;
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030074 unsigned char also_non_np;
David Howells09e21782015-04-28 15:36:36 +010075 bool fail;
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 rlen;
80};
81
82struct aead_testvec {
83 char *key;
84 char *iv;
85 char *input;
86 char *assoc;
87 char *result;
88 unsigned char tap[MAX_TAP];
89 unsigned char atap[MAX_TAP];
90 int np;
91 int anp;
David Howells09e21782015-04-28 15:36:36 +010092 bool fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080093 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080094 unsigned char wk; /* weak key flag */
95 unsigned char klen;
96 unsigned short ilen;
97 unsigned short alen;
98 unsigned short rlen;
99};
100
Jarod Wilson7647d6c2009-05-04 19:44:50 +0800101struct cprng_testvec {
102 char *key;
103 char *dt;
104 char *v;
105 char *result;
106 unsigned char klen;
107 unsigned short dtlen;
108 unsigned short vlen;
109 unsigned short rlen;
110 unsigned short loops;
111};
112
Stephan Mueller3332ee22014-05-31 17:24:38 +0200113struct drbg_testvec {
114 unsigned char *entropy;
115 size_t entropylen;
116 unsigned char *entpra;
117 unsigned char *entprb;
118 size_t entprlen;
119 unsigned char *addtla;
120 unsigned char *addtlb;
121 size_t addtllen;
122 unsigned char *pers;
123 size_t perslen;
124 unsigned char *expected;
125 size_t expectedlen;
126};
127
Herbert Xuda7f0332008-07-31 17:08:25 +0800128static char zeroed_string[48];
129
130/*
131 * MD4 test vectors from RFC1320
132 */
133#define MD4_TEST_VECTORS 7
134
135static struct hash_testvec md4_tv_template [] = {
136 {
137 .plaintext = "",
138 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
139 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
140 }, {
141 .plaintext = "a",
142 .psize = 1,
143 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
144 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
145 }, {
146 .plaintext = "abc",
147 .psize = 3,
148 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
149 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
150 }, {
151 .plaintext = "message digest",
152 .psize = 14,
153 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
154 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
155 }, {
156 .plaintext = "abcdefghijklmnopqrstuvwxyz",
157 .psize = 26,
158 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
159 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
160 .np = 2,
161 .tap = { 13, 13 },
162 }, {
163 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
164 .psize = 62,
165 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
166 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
167 }, {
168 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
169 "45678901234567890",
170 .psize = 80,
171 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
172 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
173 },
174};
175
176/*
177 * MD5 test vectors from RFC1321
178 */
179#define MD5_TEST_VECTORS 7
180
181static struct hash_testvec md5_tv_template[] = {
182 {
183 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
184 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
185 }, {
186 .plaintext = "a",
187 .psize = 1,
188 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
189 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
190 }, {
191 .plaintext = "abc",
192 .psize = 3,
193 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
194 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
195 }, {
196 .plaintext = "message digest",
197 .psize = 14,
198 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
199 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
200 }, {
201 .plaintext = "abcdefghijklmnopqrstuvwxyz",
202 .psize = 26,
203 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
204 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
205 .np = 2,
206 .tap = {13, 13}
207 }, {
208 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
209 .psize = 62,
210 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
211 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
212 }, {
213 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
214 "345678901234567890",
215 .psize = 80,
216 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
217 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
218 }
219
220};
221
222/*
223 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
224 */
225#define RMD128_TEST_VECTORS 10
226
227static struct hash_testvec rmd128_tv_template[] = {
228 {
229 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
230 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
231 }, {
232 .plaintext = "a",
233 .psize = 1,
234 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
235 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
236 }, {
237 .plaintext = "abc",
238 .psize = 3,
239 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
240 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
241 }, {
242 .plaintext = "message digest",
243 .psize = 14,
244 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
245 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
246 }, {
247 .plaintext = "abcdefghijklmnopqrstuvwxyz",
248 .psize = 26,
249 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
250 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
251 }, {
252 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
253 "fghijklmnopqrstuvwxyz0123456789",
254 .psize = 62,
255 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
256 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
257 }, {
258 .plaintext = "1234567890123456789012345678901234567890"
259 "1234567890123456789012345678901234567890",
260 .psize = 80,
261 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
262 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
263 }, {
264 .plaintext = "abcdbcdecdefdefgefghfghighij"
265 "hijkijkljklmklmnlmnomnopnopq",
266 .psize = 56,
267 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
268 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
269 .np = 2,
270 .tap = { 28, 28 },
271 }, {
272 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
273 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
274 "lmnopqrsmnopqrstnopqrstu",
275 .psize = 112,
276 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
277 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
278 }, {
279 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
280 .psize = 32,
281 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
282 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
283 }
284};
285
286/*
287 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
288 */
289#define RMD160_TEST_VECTORS 10
290
291static struct hash_testvec rmd160_tv_template[] = {
292 {
293 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
294 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
295 }, {
296 .plaintext = "a",
297 .psize = 1,
298 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
299 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
300 }, {
301 .plaintext = "abc",
302 .psize = 3,
303 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
304 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
305 }, {
306 .plaintext = "message digest",
307 .psize = 14,
308 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
309 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
310 }, {
311 .plaintext = "abcdefghijklmnopqrstuvwxyz",
312 .psize = 26,
313 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
314 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
315 }, {
316 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
317 "fghijklmnopqrstuvwxyz0123456789",
318 .psize = 62,
319 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
320 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
321 }, {
322 .plaintext = "1234567890123456789012345678901234567890"
323 "1234567890123456789012345678901234567890",
324 .psize = 80,
325 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
326 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
327 }, {
328 .plaintext = "abcdbcdecdefdefgefghfghighij"
329 "hijkijkljklmklmnlmnomnopnopq",
330 .psize = 56,
331 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
332 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
333 .np = 2,
334 .tap = { 28, 28 },
335 }, {
336 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
337 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
338 "lmnopqrsmnopqrstnopqrstu",
339 .psize = 112,
340 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
341 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
342 }, {
343 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
344 .psize = 32,
345 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
346 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
347 }
348};
349
350/*
351 * RIPEMD-256 test vectors
352 */
353#define RMD256_TEST_VECTORS 8
354
355static struct hash_testvec rmd256_tv_template[] = {
356 {
357 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
358 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
359 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
360 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
361 }, {
362 .plaintext = "a",
363 .psize = 1,
364 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
365 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
366 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
367 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
368 }, {
369 .plaintext = "abc",
370 .psize = 3,
371 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
372 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
373 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
374 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
375 }, {
376 .plaintext = "message digest",
377 .psize = 14,
378 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
379 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
380 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
381 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
382 }, {
383 .plaintext = "abcdefghijklmnopqrstuvwxyz",
384 .psize = 26,
385 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
386 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
387 "\x78\x96\x11\x8a\x51\x97\x96\x87"
388 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
389 }, {
390 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
391 "fghijklmnopqrstuvwxyz0123456789",
392 .psize = 62,
393 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
394 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
395 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
396 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
397 }, {
398 .plaintext = "1234567890123456789012345678901234567890"
399 "1234567890123456789012345678901234567890",
400 .psize = 80,
401 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
402 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
403 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
404 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
405 }, {
406 .plaintext = "abcdbcdecdefdefgefghfghighij"
407 "hijkijkljklmklmnlmnomnopnopq",
408 .psize = 56,
409 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
410 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
411 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
412 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
413 .np = 2,
414 .tap = { 28, 28 },
415 }
416};
417
418/*
419 * RIPEMD-320 test vectors
420 */
421#define RMD320_TEST_VECTORS 8
422
423static struct hash_testvec rmd320_tv_template[] = {
424 {
425 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
426 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
427 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
428 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
429 }, {
430 .plaintext = "a",
431 .psize = 1,
432 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
433 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
434 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
435 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
436 }, {
437 .plaintext = "abc",
438 .psize = 3,
439 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
440 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
441 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
442 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
443 }, {
444 .plaintext = "message digest",
445 .psize = 14,
446 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
447 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
448 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
449 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
450 }, {
451 .plaintext = "abcdefghijklmnopqrstuvwxyz",
452 .psize = 26,
453 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
454 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
455 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
456 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
457 }, {
458 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
459 "fghijklmnopqrstuvwxyz0123456789",
460 .psize = 62,
461 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
462 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
463 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
464 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
465 }, {
466 .plaintext = "1234567890123456789012345678901234567890"
467 "1234567890123456789012345678901234567890",
468 .psize = 80,
469 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
470 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
471 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
472 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
473 }, {
474 .plaintext = "abcdbcdecdefdefgefghfghighij"
475 "hijkijkljklmklmnlmnomnopnopq",
476 .psize = 56,
477 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
478 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
479 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
480 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
481 .np = 2,
482 .tap = { 28, 28 },
483 }
484};
485
Herbert Xu684115212013-09-07 12:56:26 +1000486#define CRCT10DIF_TEST_VECTORS 3
487static struct hash_testvec crct10dif_tv_template[] = {
488 {
489 .plaintext = "abc",
490 .psize = 3,
491#ifdef __LITTLE_ENDIAN
492 .digest = "\x3b\x44",
493#else
494 .digest = "\x44\x3b",
495#endif
496 }, {
497 .plaintext = "1234567890123456789012345678901234567890"
498 "123456789012345678901234567890123456789",
499 .psize = 79,
500#ifdef __LITTLE_ENDIAN
501 .digest = "\x70\x4b",
502#else
503 .digest = "\x4b\x70",
504#endif
505 }, {
506 .plaintext =
507 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
508 .psize = 56,
509#ifdef __LITTLE_ENDIAN
510 .digest = "\xe3\x9c",
511#else
512 .digest = "\x9c\xe3",
513#endif
514 .np = 2,
515 .tap = { 28, 28 }
516 }
517};
518
Herbert Xuda7f0332008-07-31 17:08:25 +0800519/*
520 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100521 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800522 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300523#define SHA1_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +0800524
525static struct hash_testvec sha1_tv_template[] = {
526 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300527 .plaintext = "",
528 .psize = 0,
529 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
530 "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
531 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800532 .plaintext = "abc",
533 .psize = 3,
534 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
535 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
536 }, {
537 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
538 .psize = 56,
539 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
540 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
541 .np = 2,
542 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100543 }, {
544 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
545 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
546 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
547 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
548 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
549 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
550 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
551 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
552 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
553 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
554 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
555 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
556 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
557 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
558 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
559 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
560 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
561 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
562 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
563 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
564 "\x5a\x90\x11",
565 .psize = 163,
566 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
567 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
568 .np = 4,
569 .tap = { 63, 64, 31, 5 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800570 }, {
571 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
572 .psize = 64,
573 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
574 "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300575 }, {
576 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
577 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
578 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
579 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
580 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
581 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
582 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
583 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
584 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
585 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
586 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
587 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
588 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
589 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
590 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
591 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
592 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
593 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
594 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
595 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
596 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
597 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
598 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
599 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
600 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
601 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
602 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
603 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
604 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
605 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
606 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
607 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
608 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
609 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
610 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
611 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
612 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
613 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
614 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
615 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
616 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
617 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
618 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
619 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
620 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
621 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
622 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
623 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
624 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
625 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
626 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
627 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
628 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
629 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
630 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
631 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
632 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
633 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
634 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
635 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
636 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
637 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
638 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
639 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
640 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
641 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
642 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
643 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
644 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
645 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
646 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
647 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
648 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
649 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
650 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
651 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
652 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
653 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
654 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
655 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
656 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
657 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
658 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
659 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
660 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
661 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
662 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
663 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
664 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
665 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
666 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
667 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
668 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
669 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
670 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
671 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
672 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
673 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
674 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
675 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
676 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
677 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
678 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
679 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
680 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
681 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
682 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
683 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
684 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
685 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
686 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
687 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
688 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
689 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
690 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
691 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
692 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
693 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
694 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
695 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
696 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
697 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
698 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
699 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
700 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
701 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
702 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
703 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
704 .psize = 1023,
705 .digest = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
706 "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
707 "\x30\xd6\xc9\x85",
Herbert Xuda7f0332008-07-31 17:08:25 +0800708 }
709};
710
711
712/*
713 * SHA224 test vectors from from FIPS PUB 180-2
714 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300715#define SHA224_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800716
717static struct hash_testvec sha224_tv_template[] = {
718 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300719 .plaintext = "",
720 .psize = 0,
721 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
722 "\x47\x61\x02\xbb\x28\x82\x34\xc4"
723 "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
724 "\xc5\xb3\xe4\x2f",
725 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800726 .plaintext = "abc",
727 .psize = 3,
728 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
729 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
730 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
731 "\xE3\x6C\x9D\xA7",
732 }, {
733 .plaintext =
734 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
735 .psize = 56,
736 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
737 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
738 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
739 "\x52\x52\x25\x25",
740 .np = 2,
741 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800742 }, {
743 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
744 .psize = 64,
745 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
746 "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
747 "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
748 "\xef\x3b\xcb\x0e",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300749 }, {
750 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
751 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
752 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
753 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
754 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
755 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
756 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
757 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
758 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
759 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
760 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
761 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
762 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
763 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
764 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
765 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
766 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
767 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
768 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
769 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
770 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
771 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
772 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
773 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
774 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
775 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
776 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
777 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
778 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
779 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
780 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
781 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
782 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
783 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
784 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
785 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
786 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
787 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
788 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
789 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
790 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
791 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
792 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
793 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
794 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
795 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
796 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
797 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
798 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
799 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
800 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
801 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
802 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
803 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
804 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
805 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
806 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
807 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
808 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
809 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
810 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
811 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
812 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
813 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
814 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
815 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
816 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
817 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
818 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
819 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
820 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
821 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
822 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
823 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
824 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
825 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
826 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
827 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
828 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
829 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
830 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
831 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
832 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
833 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
834 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
835 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
836 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
837 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
838 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
839 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
840 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
841 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
842 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
843 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
844 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
845 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
846 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
847 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
848 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
849 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
850 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
851 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
852 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
853 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
854 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
855 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
856 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
857 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
858 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
859 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
860 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
861 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
862 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
863 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
864 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
865 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
866 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
867 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
868 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
869 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
870 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
871 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
872 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
873 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
874 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
875 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
876 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
877 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
878 .psize = 1023,
879 .digest = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
880 "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
881 "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
882 "\xe6\xf9\x4f\xcc",
Herbert Xuda7f0332008-07-31 17:08:25 +0800883 }
884};
885
886/*
887 * SHA256 test vectors from from NIST
888 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300889#define SHA256_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +0800890
891static struct hash_testvec sha256_tv_template[] = {
892 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300893 .plaintext = "",
894 .psize = 0,
895 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
896 "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
897 "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
898 "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
899 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +0800900 .plaintext = "abc",
901 .psize = 3,
902 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
903 "\x41\x41\x40\xde\x5d\xae\x22\x23"
904 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
905 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
906 }, {
907 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
908 .psize = 56,
909 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
910 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
911 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
912 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
913 .np = 2,
914 .tap = { 28, 28 }
Ard Biesheuvel45859882014-04-16 20:40:04 +0800915 }, {
916 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
917 .psize = 64,
918 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
919 "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
920 "\xd6\xff\x94\xa3\x72\x91\x85\x66"
921 "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
Jussi Kivilinna950e4e12014-04-12 15:35:29 +0300922 }, {
923 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
924 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
925 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
926 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
927 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
928 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
929 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
930 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
931 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
932 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
933 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
934 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
935 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
936 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
937 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
938 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
939 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
940 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
941 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
942 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
943 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
944 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
945 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
946 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
947 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
948 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
949 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
950 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
951 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
952 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
953 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
954 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
955 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
956 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
957 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
958 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
959 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
960 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
961 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
962 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
963 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
964 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
965 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
966 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
967 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
968 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
969 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
970 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
971 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
972 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
973 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
974 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
975 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
976 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
977 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
978 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
979 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
980 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
981 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
982 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
983 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
984 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
985 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
986 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
987 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
988 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
989 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
990 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
991 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
992 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
993 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
994 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
995 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
996 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
997 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
998 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
999 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1000 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1001 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1002 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1003 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1004 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1005 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1006 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1007 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1008 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1009 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1010 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1011 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1012 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1013 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1014 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1015 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1016 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1017 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1018 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1019 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1020 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1021 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1022 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1023 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1024 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1025 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1026 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1027 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1028 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1029 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1030 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1031 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1032 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1033 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1034 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1035 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1036 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1037 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1038 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1039 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1040 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1041 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1042 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1043 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1044 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1045 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1046 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1047 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1048 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1049 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1050 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1051 .psize = 1023,
1052 .digest = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1053 "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1054 "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1055 "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
Ard Biesheuvel45859882014-04-16 20:40:04 +08001056 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001057};
1058
1059/*
1060 * SHA384 test vectors from from NIST and kerneli
1061 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001062#define SHA384_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001063
1064static struct hash_testvec sha384_tv_template[] = {
1065 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001066 .plaintext = "",
1067 .psize = 0,
1068 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1069 "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1070 "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1071 "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1072 "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1073 "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1074 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001075 .plaintext= "abc",
1076 .psize = 3,
1077 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1078 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1079 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1080 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1081 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1082 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1083 }, {
1084 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1085 .psize = 56,
1086 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1087 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1088 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1089 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1090 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1091 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1092 }, {
1093 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1094 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1095 .psize = 112,
1096 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1097 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1098 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1099 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1100 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1101 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1102 }, {
1103 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1104 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1105 .psize = 104,
1106 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1107 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1108 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1109 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1110 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1111 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1112 .np = 4,
1113 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001114 }, {
1115 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1116 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1117 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1118 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1119 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1120 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1121 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1122 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1123 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1124 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1125 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1126 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1127 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1128 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1129 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1130 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1131 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1132 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1133 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1134 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1135 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1136 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1137 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1138 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1139 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1140 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1141 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1142 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1143 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1144 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1145 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1146 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1147 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1148 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1149 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1150 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1151 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1152 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1153 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1154 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1155 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1156 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1157 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1158 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1159 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1160 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1161 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1162 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1163 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1164 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1165 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1166 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1167 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1168 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1169 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1170 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1171 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1172 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1173 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1174 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1175 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1176 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1177 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1178 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1179 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1180 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1181 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1182 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1183 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1184 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1185 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1186 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1187 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1188 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1189 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1190 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1191 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1192 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1193 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1194 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1195 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1196 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1197 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1198 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1199 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1200 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1201 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1202 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1203 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1204 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1205 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1206 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1207 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1208 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1209 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1210 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1211 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1212 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1213 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1214 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1215 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1216 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1217 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1218 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1219 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1220 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1221 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1222 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1223 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1224 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1225 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1226 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1227 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1228 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1229 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1230 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1231 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1232 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1233 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1234 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1235 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1236 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1237 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1238 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1239 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1240 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1241 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1242 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1243 .psize = 1023,
1244 .digest = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1245 "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1246 "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1247 "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1248 "\x75\x29\x62\x83\xae\x3f\x17\xab"
1249 "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1250 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001251};
1252
1253/*
1254 * SHA512 test vectors from from NIST and kerneli
1255 */
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001256#define SHA512_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +08001257
1258static struct hash_testvec sha512_tv_template[] = {
1259 {
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001260 .plaintext = "",
1261 .psize = 0,
1262 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1263 "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1264 "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1265 "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1266 "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1267 "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1268 "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1269 "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1270 }, {
Herbert Xuda7f0332008-07-31 17:08:25 +08001271 .plaintext = "abc",
1272 .psize = 3,
1273 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1274 "\xcc\x41\x73\x49\xae\x20\x41\x31"
1275 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1276 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1277 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1278 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1279 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1280 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1281 }, {
1282 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1283 .psize = 56,
1284 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1285 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1286 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1287 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1288 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1289 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1290 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1291 "\x54\xec\x63\x12\x38\xca\x34\x45",
1292 }, {
1293 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1294 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1295 .psize = 112,
1296 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1297 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1298 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1299 "\x72\x99\xae\xad\xb6\x88\x90\x18"
1300 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1301 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1302 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1303 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1304 }, {
1305 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1306 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1307 .psize = 104,
1308 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1309 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1310 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1311 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1312 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1313 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1314 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1315 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1316 .np = 4,
1317 .tap = { 26, 26, 26, 26 }
Jussi Kivilinna950e4e12014-04-12 15:35:29 +03001318 }, {
1319 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1320 "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1321 "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1322 "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1323 "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1324 "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1325 "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1326 "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1327 "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1328 "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1329 "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1330 "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1331 "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1332 "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1333 "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1334 "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1335 "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1336 "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1337 "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1338 "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1339 "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1340 "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1341 "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1342 "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1343 "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1344 "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1345 "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1346 "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1347 "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1348 "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1349 "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1350 "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1351 "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1352 "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1353 "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1354 "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1355 "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1356 "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1357 "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1358 "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1359 "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1360 "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1361 "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1362 "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1363 "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1364 "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1365 "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1366 "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1367 "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1368 "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1369 "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1370 "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1371 "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1372 "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1373 "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1374 "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1375 "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1376 "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1377 "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1378 "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1379 "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1380 "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1381 "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1382 "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1383 "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1384 "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1385 "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1386 "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1387 "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1388 "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1389 "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1390 "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1391 "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1392 "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1393 "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1394 "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1395 "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1396 "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1397 "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1398 "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1399 "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1400 "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1401 "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1402 "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1403 "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1404 "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1405 "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1406 "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1407 "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1408 "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1409 "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1410 "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1411 "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1412 "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1413 "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1414 "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1415 "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1416 "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1417 "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1418 "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1419 "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1420 "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1421 "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1422 "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1423 "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1424 "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1425 "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1426 "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1427 "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1428 "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1429 "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1430 "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1431 "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1432 "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1433 "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1434 "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1435 "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1436 "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1437 "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1438 "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1439 "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1440 "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1441 "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1442 "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1443 "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1444 "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1445 "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1446 "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1447 .psize = 1023,
1448 .digest = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1449 "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1450 "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1451 "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1452 "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1453 "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1454 "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1455 "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1456 }
Herbert Xuda7f0332008-07-31 17:08:25 +08001457};
1458
1459
1460/*
1461 * WHIRLPOOL test vectors from Whirlpool package
1462 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1463 * submission
1464 */
1465#define WP512_TEST_VECTORS 8
1466
1467static struct hash_testvec wp512_tv_template[] = {
1468 {
1469 .plaintext = "",
1470 .psize = 0,
1471 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1472 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1473 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1474 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1475 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1476 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1477 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1478 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1479
1480
1481 }, {
1482 .plaintext = "a",
1483 .psize = 1,
1484 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1485 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1486 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1487 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1488 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1489 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1490 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1491 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1492 }, {
1493 .plaintext = "abc",
1494 .psize = 3,
1495 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1496 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1497 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1498 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1499 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1500 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1501 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1502 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1503 }, {
1504 .plaintext = "message digest",
1505 .psize = 14,
1506 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1507 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1508 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1509 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1510 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1511 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1512 "\x92\xED\x92\x00\x52\x83\x8F\x33"
1513 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1514 }, {
1515 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1516 .psize = 26,
1517 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1518 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1519 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1520 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1521 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1522 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1523 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1524 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1525 }, {
1526 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1527 "abcdefghijklmnopqrstuvwxyz0123456789",
1528 .psize = 62,
1529 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1530 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1531 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1532 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1533 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1534 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1535 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1536 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1537 }, {
1538 .plaintext = "1234567890123456789012345678901234567890"
1539 "1234567890123456789012345678901234567890",
1540 .psize = 80,
1541 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1542 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1543 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1544 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1545 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1546 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1547 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1548 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1549 }, {
1550 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1551 .psize = 32,
1552 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1553 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1554 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1555 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1556 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1557 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1558 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1559 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1560 },
1561};
1562
1563#define WP384_TEST_VECTORS 8
1564
1565static struct hash_testvec wp384_tv_template[] = {
1566 {
1567 .plaintext = "",
1568 .psize = 0,
1569 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1570 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1571 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1572 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1573 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1574 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1575
1576
1577 }, {
1578 .plaintext = "a",
1579 .psize = 1,
1580 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1581 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1582 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1583 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1584 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1585 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1586 }, {
1587 .plaintext = "abc",
1588 .psize = 3,
1589 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1590 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1591 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1592 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1593 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1594 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1595 }, {
1596 .plaintext = "message digest",
1597 .psize = 14,
1598 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1599 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1600 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1601 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1602 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1603 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1604 }, {
1605 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1606 .psize = 26,
1607 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1608 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1609 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1610 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1611 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1612 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1613 }, {
1614 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1615 "abcdefghijklmnopqrstuvwxyz0123456789",
1616 .psize = 62,
1617 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1618 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1619 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1620 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1621 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1622 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1623 }, {
1624 .plaintext = "1234567890123456789012345678901234567890"
1625 "1234567890123456789012345678901234567890",
1626 .psize = 80,
1627 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1628 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1629 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1630 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1631 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1632 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1633 }, {
1634 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1635 .psize = 32,
1636 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1637 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1638 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1639 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1640 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1641 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1642 },
1643};
1644
1645#define WP256_TEST_VECTORS 8
1646
1647static struct hash_testvec wp256_tv_template[] = {
1648 {
1649 .plaintext = "",
1650 .psize = 0,
1651 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1652 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1653 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1654 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1655
1656
1657 }, {
1658 .plaintext = "a",
1659 .psize = 1,
1660 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1661 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1662 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1663 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1664 }, {
1665 .plaintext = "abc",
1666 .psize = 3,
1667 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1668 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1669 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1670 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1671 }, {
1672 .plaintext = "message digest",
1673 .psize = 14,
1674 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1675 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1676 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1677 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
1678 }, {
1679 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1680 .psize = 26,
1681 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1682 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1683 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1684 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
1685 }, {
1686 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1687 "abcdefghijklmnopqrstuvwxyz0123456789",
1688 .psize = 62,
1689 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1690 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1691 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1692 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
1693 }, {
1694 .plaintext = "1234567890123456789012345678901234567890"
1695 "1234567890123456789012345678901234567890",
1696 .psize = 80,
1697 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1698 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1699 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1700 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
1701 }, {
1702 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1703 .psize = 32,
1704 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1705 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1706 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1707 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
1708 },
1709};
1710
1711/*
1712 * TIGER test vectors from Tiger website
1713 */
1714#define TGR192_TEST_VECTORS 6
1715
1716static struct hash_testvec tgr192_tv_template[] = {
1717 {
1718 .plaintext = "",
1719 .psize = 0,
1720 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1721 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1722 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
1723 }, {
1724 .plaintext = "abc",
1725 .psize = 3,
1726 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1727 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1728 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
1729 }, {
1730 .plaintext = "Tiger",
1731 .psize = 5,
1732 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1733 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1734 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
1735 }, {
1736 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1737 .psize = 64,
1738 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1739 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1740 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
1741 }, {
1742 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1743 .psize = 64,
1744 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1745 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1746 "\x57\x89\x65\x65\x97\x5f\x91\x97",
1747 }, {
1748 .plaintext = "Tiger - A Fast New Hash Function, "
1749 "by Ross Anderson and Eli Biham, "
1750 "proceedings of Fast Software Encryption 3, "
1751 "Cambridge, 1996.",
1752 .psize = 125,
1753 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1754 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1755 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
1756 },
1757};
1758
1759#define TGR160_TEST_VECTORS 6
1760
1761static struct hash_testvec tgr160_tv_template[] = {
1762 {
1763 .plaintext = "",
1764 .psize = 0,
1765 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1766 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1767 "\xf3\x73\xde\x2d",
1768 }, {
1769 .plaintext = "abc",
1770 .psize = 3,
1771 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1772 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1773 "\x93\x5f\x7b\x95",
1774 }, {
1775 .plaintext = "Tiger",
1776 .psize = 5,
1777 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1778 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1779 "\x37\x79\x0c\x11",
1780 }, {
1781 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1782 .psize = 64,
1783 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1784 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1785 "\xb5\x86\x44\x50",
1786 }, {
1787 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1788 .psize = 64,
1789 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1790 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1791 "\x57\x89\x65\x65",
1792 }, {
1793 .plaintext = "Tiger - A Fast New Hash Function, "
1794 "by Ross Anderson and Eli Biham, "
1795 "proceedings of Fast Software Encryption 3, "
1796 "Cambridge, 1996.",
1797 .psize = 125,
1798 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1799 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1800 "\xdd\x68\x15\x1d",
1801 },
1802};
1803
1804#define TGR128_TEST_VECTORS 6
1805
1806static struct hash_testvec tgr128_tv_template[] = {
1807 {
1808 .plaintext = "",
1809 .psize = 0,
1810 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1811 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1812 }, {
1813 .plaintext = "abc",
1814 .psize = 3,
1815 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1816 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1817 }, {
1818 .plaintext = "Tiger",
1819 .psize = 5,
1820 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1821 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1822 }, {
1823 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1824 .psize = 64,
1825 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1826 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1827 }, {
1828 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1829 .psize = 64,
1830 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1831 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1832 }, {
1833 .plaintext = "Tiger - A Fast New Hash Function, "
1834 "by Ross Anderson and Eli Biham, "
1835 "proceedings of Fast Software Encryption 3, "
1836 "Cambridge, 1996.",
1837 .psize = 125,
1838 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1839 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1840 },
1841};
1842
Harald Freudenberger445a8e02015-05-21 17:34:31 +02001843#define GHASH_TEST_VECTORS 6
Youquan, Song507069c2009-11-23 20:23:04 +08001844
1845static struct hash_testvec ghash_tv_template[] =
1846{
1847 {
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001848 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
1849 "\xff\xca\xff\x95\xf8\x30\xf0\x61",
Youquan, Song507069c2009-11-23 20:23:04 +08001850 .ksize = 16,
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001851 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
1852 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
Youquan, Song507069c2009-11-23 20:23:04 +08001853 .psize = 16,
1854 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1855 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
Ard Biesheuvel6c9e3dc2014-06-12 17:01:50 +02001856 }, {
1857 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1858 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1859 .ksize = 16,
1860 .plaintext = "what do ya want for nothing?",
1861 .psize = 28,
1862 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
1863 "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
1864 .np = 2,
1865 .tap = {14, 14}
1866 }, {
1867 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1868 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1869 .ksize = 16,
1870 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1871 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1872 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1873 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1874 .psize = 50,
1875 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
1876 "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
1877 }, {
1878 .key = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1879 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1880 .ksize = 16,
1881 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1882 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1883 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1884 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1885 .psize = 50,
1886 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
1887 "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
1888 }, {
1889 .key = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
1890 "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1891 .ksize = 16,
1892 .plaintext = "Test With Truncation",
1893 .psize = 20,
1894 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
1895 "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
Harald Freudenberger445a8e02015-05-21 17:34:31 +02001896 }, {
1897 .key = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
1898 "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
1899 .ksize = 16,
1900 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
1901 "\x65\x72\x20\x4c\x61\x75\x73\x63"
1902 "\x68\x65\x6e\x20\x75\x6e\x64\x20"
1903 "\x53\x74\x61\x75\x6e\x65\x6e\x20"
1904 "\x73\x65\x69\x20\x73\x74\x69\x6c"
1905 "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
1906 "\x69\x6e\x20\x74\x69\x65\x66\x74"
1907 "\x69\x65\x66\x65\x73\x20\x4c\x65"
1908 "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
1909 "\x73\x20\x64\x75\x20\x77\x65\x69"
1910 "\xc3\x9f\x74\x20\x77\x61\x73\x20"
1911 "\x64\x65\x72\x20\x57\x69\x6e\x64"
1912 "\x20\x64\x69\x72\x20\x77\x69\x6c"
1913 "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
1914 "\x63\x68\x20\x64\x69\x65\x20\x42"
1915 "\x69\x72\x6b\x65\x6e\x20\x62\x65"
1916 "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
1917 "\x64\x20\x77\x65\x6e\x6e\x20\x64"
1918 "\x69\x72\x20\x65\x69\x6e\x6d\x61"
1919 "\x6c\x20\x64\x61\x73\x20\x53\x63"
1920 "\x68\x77\x65\x69\x67\x65\x6e\x20"
1921 "\x73\x70\x72\x61\x63\x68\x2c\x0a"
1922 "\x6c\x61\x73\x73\x20\x64\x65\x69"
1923 "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
1924 "\x20\x62\x65\x73\x69\x65\x67\x65"
1925 "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
1926 "\x20\x48\x61\x75\x63\x68\x65\x20"
1927 "\x67\x69\x62\x74\x20\x64\x69\x63"
1928 "\x68\x2c\x20\x67\x69\x62\x20\x6e"
1929 "\x61\x63\x68\x2c\x0a\x65\x72\x20"
1930 "\x77\x69\x72\x64\x20\x64\x69\x63"
1931 "\x68\x20\x6c\x69\x65\x62\x65\x6e"
1932 "\x20\x75\x6e\x64\x20\x77\x69\x65"
1933 "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
1934 "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
1935 "\x65\x69\x6e\x65\x20\x53\x65\x65"
1936 "\x6c\x65\x20\x73\x65\x69\x74\x20"
1937 "\x77\x65\x69\x74\x2c\x20\x73\x65"
1938 "\x69\x20\x77\x65\x69\x74\x2c\x0a"
1939 "\x64\x61\x73\x73\x20\x64\x69\x72"
1940 "\x20\x64\x61\x73\x20\x4c\x65\x62"
1941 "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
1942 "\x67\x65\x2c\x0a\x62\x72\x65\x69"
1943 "\x74\x65\x20\x64\x69\x63\x68\x20"
1944 "\x77\x69\x65\x20\x65\x69\x6e\x20"
1945 "\x46\x65\x69\x65\x72\x6b\x6c\x65"
1946 "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
1947 "\x20\x64\x69\x65\x20\x73\x69\x6e"
1948 "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
1949 "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
1950 .psize = 400,
1951 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
1952 "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
Youquan, Song507069c2009-11-23 20:23:04 +08001953 },
1954};
1955
Herbert Xuda7f0332008-07-31 17:08:25 +08001956/*
1957 * HMAC-MD5 test vectors from RFC2202
1958 * (These need to be fixed to not use strlen).
1959 */
1960#define HMAC_MD5_TEST_VECTORS 7
1961
1962static struct hash_testvec hmac_md5_tv_template[] =
1963{
1964 {
1965 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1966 .ksize = 16,
1967 .plaintext = "Hi There",
1968 .psize = 8,
1969 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1970 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1971 }, {
1972 .key = "Jefe",
1973 .ksize = 4,
1974 .plaintext = "what do ya want for nothing?",
1975 .psize = 28,
1976 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1977 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1978 .np = 2,
1979 .tap = {14, 14}
1980 }, {
1981 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1982 .ksize = 16,
1983 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1984 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1985 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1986 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1987 .psize = 50,
1988 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1989 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1990 }, {
1991 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1992 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1993 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1994 .ksize = 25,
1995 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1996 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1997 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1998 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1999 .psize = 50,
2000 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2001 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2002 }, {
2003 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2004 .ksize = 16,
2005 .plaintext = "Test With Truncation",
2006 .psize = 20,
2007 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2008 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2009 }, {
2010 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2011 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2012 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2013 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2014 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2015 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2016 "\xaa\xaa",
2017 .ksize = 80,
2018 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2019 .psize = 54,
2020 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2021 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2022 }, {
2023 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2024 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2025 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2026 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2027 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2028 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2029 "\xaa\xaa",
2030 .ksize = 80,
2031 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2032 "Block-Size Data",
2033 .psize = 73,
2034 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2035 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2036 },
2037};
2038
2039/*
2040 * HMAC-RIPEMD128 test vectors from RFC2286
2041 */
2042#define HMAC_RMD128_TEST_VECTORS 7
2043
2044static struct hash_testvec hmac_rmd128_tv_template[] = {
2045 {
2046 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2047 .ksize = 16,
2048 .plaintext = "Hi There",
2049 .psize = 8,
2050 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2051 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2052 }, {
2053 .key = "Jefe",
2054 .ksize = 4,
2055 .plaintext = "what do ya want for nothing?",
2056 .psize = 28,
2057 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2058 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2059 .np = 2,
2060 .tap = { 14, 14 },
2061 }, {
2062 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2063 .ksize = 16,
2064 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2065 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2066 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2067 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2068 .psize = 50,
2069 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2070 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2071 }, {
2072 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2073 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2074 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2075 .ksize = 25,
2076 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2077 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2078 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2079 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2080 .psize = 50,
2081 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2082 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2083 }, {
2084 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2085 .ksize = 16,
2086 .plaintext = "Test With Truncation",
2087 .psize = 20,
2088 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2089 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2090 }, {
2091 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2092 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2093 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2094 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2095 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2096 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2097 "\xaa\xaa",
2098 .ksize = 80,
2099 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2100 .psize = 54,
2101 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2102 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2103 }, {
2104 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2105 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2106 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2107 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2108 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2109 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2110 "\xaa\xaa",
2111 .ksize = 80,
2112 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2113 "Block-Size Data",
2114 .psize = 73,
2115 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2116 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2117 },
2118};
2119
2120/*
2121 * HMAC-RIPEMD160 test vectors from RFC2286
2122 */
2123#define HMAC_RMD160_TEST_VECTORS 7
2124
2125static struct hash_testvec hmac_rmd160_tv_template[] = {
2126 {
2127 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2128 .ksize = 20,
2129 .plaintext = "Hi There",
2130 .psize = 8,
2131 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2132 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2133 }, {
2134 .key = "Jefe",
2135 .ksize = 4,
2136 .plaintext = "what do ya want for nothing?",
2137 .psize = 28,
2138 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2139 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2140 .np = 2,
2141 .tap = { 14, 14 },
2142 }, {
2143 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2144 .ksize = 20,
2145 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2146 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2147 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2148 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2149 .psize = 50,
2150 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2151 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2152 }, {
2153 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2154 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2155 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2156 .ksize = 25,
2157 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2158 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2159 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2160 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2161 .psize = 50,
2162 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2163 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2164 }, {
2165 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2166 .ksize = 20,
2167 .plaintext = "Test With Truncation",
2168 .psize = 20,
2169 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2170 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2171 }, {
2172 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2173 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2174 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2175 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2176 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2177 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2178 "\xaa\xaa",
2179 .ksize = 80,
2180 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2181 .psize = 54,
2182 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2183 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2184 }, {
2185 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2186 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2187 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2188 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2189 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2190 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2191 "\xaa\xaa",
2192 .ksize = 80,
2193 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2194 "Block-Size Data",
2195 .psize = 73,
2196 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2197 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2198 },
2199};
2200
2201/*
2202 * HMAC-SHA1 test vectors from RFC2202
2203 */
2204#define HMAC_SHA1_TEST_VECTORS 7
2205
2206static struct hash_testvec hmac_sha1_tv_template[] = {
2207 {
2208 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2209 .ksize = 20,
2210 .plaintext = "Hi There",
2211 .psize = 8,
2212 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2213 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2214 "\x46\xbe",
2215 }, {
2216 .key = "Jefe",
2217 .ksize = 4,
2218 .plaintext = "what do ya want for nothing?",
2219 .psize = 28,
2220 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2221 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2222 .np = 2,
2223 .tap = { 14, 14 }
2224 }, {
2225 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2226 .ksize = 20,
2227 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2228 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2229 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2230 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2231 .psize = 50,
2232 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2233 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2234 }, {
2235 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2236 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2237 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2238 .ksize = 25,
2239 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2240 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2241 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2242 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2243 .psize = 50,
2244 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2245 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2246 }, {
2247 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2248 .ksize = 20,
2249 .plaintext = "Test With Truncation",
2250 .psize = 20,
2251 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2252 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2253 }, {
2254 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2255 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2256 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2257 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2258 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2259 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2260 "\xaa\xaa",
2261 .ksize = 80,
2262 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2263 .psize = 54,
2264 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2265 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2266 }, {
2267 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2268 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2269 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2270 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2271 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2272 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2273 "\xaa\xaa",
2274 .ksize = 80,
2275 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2276 "Block-Size Data",
2277 .psize = 73,
2278 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2279 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2280 },
2281};
2282
2283
2284/*
2285 * SHA224 HMAC test vectors from RFC4231
2286 */
2287#define HMAC_SHA224_TEST_VECTORS 4
2288
2289static struct hash_testvec hmac_sha224_tv_template[] = {
2290 {
2291 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2292 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2293 "\x0b\x0b\x0b\x0b",
2294 .ksize = 20,
2295 /* ("Hi There") */
2296 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2297 .psize = 8,
2298 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2299 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2300 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2301 "\x53\x68\x4b\x22",
2302 }, {
2303 .key = "Jefe",
2304 .ksize = 4,
2305 /* ("what do ya want for nothing?") */
2306 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2307 "\x79\x61\x20\x77\x61\x6e\x74\x20"
2308 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2309 "\x69\x6e\x67\x3f",
2310 .psize = 28,
2311 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2312 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2313 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2314 "\x8f\xd0\x5e\x44",
2315 .np = 4,
2316 .tap = { 7, 7, 7, 7 }
2317 }, {
2318 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2319 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2320 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2321 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2322 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2323 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2324 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2325 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2326 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2327 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2328 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2329 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2330 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2331 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2332 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2333 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2334 "\xaa\xaa\xaa",
2335 .ksize = 131,
2336 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2337 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2338 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2339 "\x72\x20\x54\x68\x61\x6e\x20\x42"
2340 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2341 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2342 "\x48\x61\x73\x68\x20\x4b\x65\x79"
2343 "\x20\x46\x69\x72\x73\x74",
2344 .psize = 54,
2345 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2346 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2347 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2348 "\x3f\xa6\x87\x0e",
2349 }, {
2350 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2351 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2352 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2353 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2354 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2355 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2356 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2357 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2358 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2359 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2360 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2361 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2362 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2363 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2364 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2365 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2366 "\xaa\xaa\xaa",
2367 .ksize = 131,
2368 /* ("This is a test using a larger than block-size key and a")
2369 (" larger than block-size data. The key needs to be")
2370 (" hashed before being used by the HMAC algorithm.") */
2371 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2372 "\x61\x20\x74\x65\x73\x74\x20\x75"
2373 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2374 "\x61\x72\x67\x65\x72\x20\x74\x68"
2375 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2376 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2377 "\x79\x20\x61\x6e\x64\x20\x61\x20"
2378 "\x6c\x61\x72\x67\x65\x72\x20\x74"
2379 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2380 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2381 "\x61\x74\x61\x2e\x20\x54\x68\x65"
2382 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2383 "\x64\x73\x20\x74\x6f\x20\x62\x65"
2384 "\x20\x68\x61\x73\x68\x65\x64\x20"
2385 "\x62\x65\x66\x6f\x72\x65\x20\x62"
2386 "\x65\x69\x6e\x67\x20\x75\x73\x65"
2387 "\x64\x20\x62\x79\x20\x74\x68\x65"
2388 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2389 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2390 .psize = 152,
2391 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2392 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2393 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2394 "\xf6\xf5\x65\xd1",
2395 },
2396};
2397
2398/*
2399 * HMAC-SHA256 test vectors from
2400 * draft-ietf-ipsec-ciph-sha-256-01.txt
2401 */
2402#define HMAC_SHA256_TEST_VECTORS 10
2403
2404static struct hash_testvec hmac_sha256_tv_template[] = {
2405 {
2406 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2407 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2408 "\x11\x12\x13\x14\x15\x16\x17\x18"
2409 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2410 .ksize = 32,
2411 .plaintext = "abc",
2412 .psize = 3,
2413 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2414 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2415 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2416 "\x92\x75\x90\x21\xcf\xab\x81\x81",
2417 }, {
2418 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2419 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2420 "\x11\x12\x13\x14\x15\x16\x17\x18"
2421 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2422 .ksize = 32,
2423 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2424 .psize = 56,
2425 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2426 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2427 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2428 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2429 }, {
2430 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2431 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2432 "\x11\x12\x13\x14\x15\x16\x17\x18"
2433 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2434 .ksize = 32,
2435 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2436 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2437 .psize = 112,
2438 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2439 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2440 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2441 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2442 }, {
2443 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2444 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2445 "\x0b\x0b\x0b\x0b\x0b\x0b",
2446 .ksize = 32,
2447 .plaintext = "Hi There",
2448 .psize = 8,
2449 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2450 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2451 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2452 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2453 }, {
2454 .key = "Jefe",
2455 .ksize = 4,
2456 .plaintext = "what do ya want for nothing?",
2457 .psize = 28,
2458 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2459 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2460 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2461 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2462 .np = 2,
2463 .tap = { 14, 14 }
2464 }, {
2465 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2466 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2467 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2468 .ksize = 32,
2469 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2470 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2471 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2472 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2473 .psize = 50,
2474 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2475 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2476 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2477 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2478 }, {
2479 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
2480 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2481 "\x11\x12\x13\x14\x15\x16\x17\x18"
2482 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2483 "\x21\x22\x23\x24\x25",
2484 .ksize = 37,
2485 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2486 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2487 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2488 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2489 .psize = 50,
2490 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2491 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2492 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2493 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2494 }, {
2495 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2496 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2497 "\x0c\x0c\x0c\x0c\x0c\x0c",
2498 .ksize = 32,
2499 .plaintext = "Test With Truncation",
2500 .psize = 20,
2501 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2502 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2503 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2504 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2505 }, {
2506 .key = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2510 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2511 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2512 "\xaa\xaa",
2513 .ksize = 80,
2514 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2515 .psize = 54,
2516 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2517 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2518 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2519 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2520 }, {
2521 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2522 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2523 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2524 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2525 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2526 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2527 "\xaa\xaa",
2528 .ksize = 80,
2529 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2530 "One Block-Size Data",
2531 .psize = 73,
2532 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2533 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2534 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2535 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2536 },
2537};
2538
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03002539#define CMAC_AES_TEST_VECTORS 6
2540
2541static struct hash_testvec aes_cmac128_tv_template[] = {
2542 { /* From NIST Special Publication 800-38B, AES-128 */
2543 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2544 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2545 .plaintext = zeroed_string,
2546 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2547 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2548 .psize = 0,
2549 .ksize = 16,
2550 }, {
2551 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2552 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2553 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2554 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2555 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2556 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2557 .psize = 16,
2558 .ksize = 16,
2559 }, {
2560 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2561 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2562 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2563 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2564 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2565 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2566 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2567 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2568 "\x30\xca\x32\x61\x14\x97\xc8\x27",
2569 .psize = 40,
2570 .ksize = 16,
2571 }, {
2572 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2573 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2574 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2575 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2576 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2577 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2578 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2579 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2580 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2581 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2582 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2583 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2584 .psize = 64,
2585 .ksize = 16,
2586 }, { /* From NIST Special Publication 800-38B, AES-256 */
2587 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2588 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2589 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2590 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2591 .plaintext = zeroed_string,
2592 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2593 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2594 .psize = 0,
2595 .ksize = 32,
2596 }, {
2597 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2598 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2599 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2600 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2601 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2602 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2603 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2604 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2605 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2606 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2607 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2608 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2609 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2610 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2611 .psize = 64,
2612 .ksize = 32,
2613 }
2614};
2615
2616#define CMAC_DES3_EDE_TEST_VECTORS 4
2617
2618static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2619/*
2620 * From NIST Special Publication 800-38B, Three Key TDEA
2621 * Corrected test vectors from:
2622 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2623 */
2624 {
2625 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2626 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2627 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2628 .plaintext = zeroed_string,
2629 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2630 .psize = 0,
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 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2638 .psize = 8,
2639 .ksize = 24,
2640 }, {
2641 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2642 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2643 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2644 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2645 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2646 "\xae\x2d\x8a\x57",
2647 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2648 .psize = 20,
2649 .ksize = 24,
2650 }, {
2651 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2652 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2653 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2654 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2655 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2656 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2657 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2658 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2659 .psize = 32,
2660 .ksize = 24,
2661 }
2662};
2663
Herbert Xuda7f0332008-07-31 17:08:25 +08002664#define XCBC_AES_TEST_VECTORS 6
2665
2666static struct hash_testvec aes_xcbc128_tv_template[] = {
2667 {
2668 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2669 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2670 .plaintext = zeroed_string,
2671 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
2672 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
2673 .psize = 0,
2674 .ksize = 16,
2675 }, {
2676 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2677 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2678 .plaintext = "\x00\x01\x02",
2679 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
2680 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
2681 .psize = 3,
2682 .ksize = 16,
2683 } , {
2684 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2685 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2686 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2687 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2688 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
2689 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
2690 .psize = 16,
2691 .ksize = 16,
2692 }, {
2693 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2694 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2695 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2696 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2697 "\x10\x11\x12\x13",
2698 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
2699 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
2700 .tap = { 10, 10 },
2701 .psize = 20,
2702 .np = 2,
2703 .ksize = 16,
2704 }, {
2705 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2706 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2707 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2708 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2709 "\x10\x11\x12\x13\x14\x15\x16\x17"
2710 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
2711 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
2712 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
2713 .psize = 32,
2714 .ksize = 16,
2715 }, {
2716 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2717 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2718 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2719 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2720 "\x10\x11\x12\x13\x14\x15\x16\x17"
2721 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
2722 "\x20\x21",
2723 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
2724 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
2725 .tap = { 17, 17 },
2726 .psize = 34,
2727 .np = 2,
2728 .ksize = 16,
2729 }
2730};
2731
Salman Qaziba1ee072012-10-05 14:24:14 -07002732#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08002733static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10002734 '\x02', '\x03', '\x02', '\x02',
2735 '\x02', '\x04', '\x01', '\x07',
2736 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08002737static char vmac_string2[128] = {'a', 'b', 'c',};
2738static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
2739 'a', 'b', 'c', 'a', 'b', 'c',
2740 'a', 'b', 'c', 'a', 'b', 'c',
2741 'a', 'b', 'c', 'a', 'b', 'c',
2742 'a', 'b', 'c', 'a', 'b', 'c',
2743 'a', 'b', 'c', 'a', 'b', 'c',
2744 'a', 'b', 'c', 'a', 'b', 'c',
2745 'a', 'b', 'c', 'a', 'b', 'c',
2746 };
2747
Salman Qaziba1ee072012-10-05 14:24:14 -07002748static char vmac_string4[17] = {'b', 'c', 'e', 'f',
2749 'i', 'j', 'l', 'm',
2750 'o', 'p', 'r', 's',
2751 't', 'u', 'w', 'x', 'z'};
2752
2753static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
2754 'o', 'l', 'k', ']', '%',
2755 '9', '2', '7', '!', 'A'};
2756
2757static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
2758 'i', '!', '#', 'w', '0',
2759 'z', '/', '4', 'A', 'n'};
2760
Shane Wangf1939f72009-09-02 20:05:22 +10002761static struct hash_testvec aes_vmac128_tv_template[] = {
2762 {
Shane Wang304a2042010-03-18 20:22:55 +08002763 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2764 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2765 .plaintext = NULL,
2766 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
2767 .psize = 0,
2768 .ksize = 16,
2769 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10002770 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2771 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08002772 .plaintext = vmac_string1,
2773 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
2774 .psize = 128,
2775 .ksize = 16,
2776 }, {
2777 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2778 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2779 .plaintext = vmac_string2,
2780 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
2781 .psize = 128,
2782 .ksize = 16,
2783 }, {
2784 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2785 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2786 .plaintext = vmac_string3,
2787 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
2788 .psize = 128,
2789 .ksize = 16,
2790 }, {
2791 .key = "abcdefghijklmnop",
2792 .plaintext = NULL,
2793 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
2794 .psize = 0,
2795 .ksize = 16,
2796 }, {
2797 .key = "abcdefghijklmnop",
2798 .plaintext = vmac_string1,
2799 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
2800 .psize = 128,
2801 .ksize = 16,
2802 }, {
2803 .key = "abcdefghijklmnop",
2804 .plaintext = vmac_string2,
2805 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
2806 .psize = 128,
2807 .ksize = 16,
2808 }, {
2809 .key = "abcdefghijklmnop",
2810 .plaintext = vmac_string3,
2811 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10002812 .psize = 128,
2813 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07002814 }, {
2815 .key = "a09b5cd!f#07K\x00\x00\x00",
2816 .plaintext = vmac_string4,
2817 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
2818 .psize = sizeof(vmac_string4),
2819 .ksize = 16,
2820 }, {
2821 .key = "a09b5cd!f#07K\x00\x00\x00",
2822 .plaintext = vmac_string5,
2823 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
2824 .psize = sizeof(vmac_string5),
2825 .ksize = 16,
2826 }, {
2827 .key = "a09b5cd!f#07K\x00\x00\x00",
2828 .plaintext = vmac_string6,
2829 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
2830 .psize = sizeof(vmac_string6),
2831 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10002832 },
2833};
2834
Herbert Xuda7f0332008-07-31 17:08:25 +08002835/*
2836 * SHA384 HMAC test vectors from RFC4231
2837 */
2838
2839#define HMAC_SHA384_TEST_VECTORS 4
2840
2841static struct hash_testvec hmac_sha384_tv_template[] = {
2842 {
2843 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2844 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2845 "\x0b\x0b\x0b\x0b",
2846 .ksize = 20,
2847 .plaintext = "Hi There",
2848 .psize = 8,
2849 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
2850 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
2851 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
2852 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
2853 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
2854 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
2855 }, {
2856 .key = "Jefe",
2857 .ksize = 4,
2858 .plaintext = "what do ya want for nothing?",
2859 .psize = 28,
2860 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
2861 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
2862 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
2863 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
2864 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
2865 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
2866 .np = 4,
2867 .tap = { 7, 7, 7, 7 }
2868 }, {
2869 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2870 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2871 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2872 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2873 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2874 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2875 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2876 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2877 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2878 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2879 "\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",
2886 .ksize = 131,
2887 .plaintext = "Test Using Larger Than Block-Siz"
2888 "e Key - Hash Key First",
2889 .psize = 54,
2890 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
2891 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
2892 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
2893 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
2894 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
2895 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
2896 }, {
2897 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2898 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2899 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2900 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2901 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2902 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2903 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2904 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2905 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2906 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2907 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2908 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2909 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2910 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2911 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2912 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2913 "\xaa\xaa\xaa",
2914 .ksize = 131,
2915 .plaintext = "This is a test u"
2916 "sing a larger th"
2917 "an block-size ke"
2918 "y and a larger t"
2919 "han block-size d"
2920 "ata. The key nee"
2921 "ds to be hashed "
2922 "before being use"
2923 "d by the HMAC al"
2924 "gorithm.",
2925 .psize = 152,
2926 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
2927 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
2928 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
2929 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
2930 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
2931 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
2932 },
2933};
2934
2935/*
2936 * SHA512 HMAC test vectors from RFC4231
2937 */
2938
2939#define HMAC_SHA512_TEST_VECTORS 4
2940
2941static struct hash_testvec hmac_sha512_tv_template[] = {
2942 {
2943 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2944 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2945 "\x0b\x0b\x0b\x0b",
2946 .ksize = 20,
2947 .plaintext = "Hi There",
2948 .psize = 8,
2949 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
2950 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
2951 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
2952 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
2953 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
2954 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
2955 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
2956 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
2957 }, {
2958 .key = "Jefe",
2959 .ksize = 4,
2960 .plaintext = "what do ya want for nothing?",
2961 .psize = 28,
2962 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
2963 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
2964 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
2965 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
2966 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
2967 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
2968 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
2969 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
2970 .np = 4,
2971 .tap = { 7, 7, 7, 7 }
2972 }, {
2973 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2974 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2975 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2976 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2977 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2978 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2979 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2980 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2981 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2982 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2983 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2984 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2985 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2986 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2987 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2988 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2989 "\xaa\xaa\xaa",
2990 .ksize = 131,
2991 .plaintext = "Test Using Large"
2992 "r Than Block-Siz"
2993 "e Key - Hash Key"
2994 " First",
2995 .psize = 54,
2996 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
2997 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
2998 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
2999 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3000 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3001 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3002 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3003 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3004 }, {
3005 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3006 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3007 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3008 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3009 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3010 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3011 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3012 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3013 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3014 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3015 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3016 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3017 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3018 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3019 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3020 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3021 "\xaa\xaa\xaa",
3022 .ksize = 131,
3023 .plaintext =
3024 "This is a test u"
3025 "sing a larger th"
3026 "an block-size ke"
3027 "y and a larger t"
3028 "han block-size d"
3029 "ata. The key nee"
3030 "ds to be hashed "
3031 "before being use"
3032 "d by the HMAC al"
3033 "gorithm.",
3034 .psize = 152,
3035 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3036 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3037 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3038 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3039 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3040 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3041 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3042 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3043 },
3044};
3045
3046/*
Martin Willieee9dc62015-06-01 13:43:59 +02003047 * Poly1305 test vectors from RFC7539 A.3.
3048 */
3049
3050#define POLY1305_TEST_VECTORS 11
3051
3052static struct hash_testvec poly1305_tv_template[] = {
3053 { /* Test Vector #1 */
3054 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3055 "\x00\x00\x00\x00\x00\x00\x00\x00"
3056 "\x00\x00\x00\x00\x00\x00\x00\x00"
3057 "\x00\x00\x00\x00\x00\x00\x00\x00",
3058 .ksize = 32,
3059 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
3060 "\x00\x00\x00\x00\x00\x00\x00\x00"
3061 "\x00\x00\x00\x00\x00\x00\x00\x00"
3062 "\x00\x00\x00\x00\x00\x00\x00\x00"
3063 "\x00\x00\x00\x00\x00\x00\x00\x00"
3064 "\x00\x00\x00\x00\x00\x00\x00\x00"
3065 "\x00\x00\x00\x00\x00\x00\x00\x00"
3066 "\x00\x00\x00\x00\x00\x00\x00\x00",
3067 .psize = 64,
3068 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3069 "\x00\x00\x00\x00\x00\x00\x00\x00",
3070 }, { /* Test Vector #2 */
3071 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3072 "\x00\x00\x00\x00\x00\x00\x00\x00"
3073 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3074 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3075 .ksize = 32,
3076 .plaintext = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3077 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3078 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3079 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3080 "\x64\x65\x64\x20\x62\x79\x20\x74"
3081 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3082 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3083 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3084 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3085 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3086 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3087 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3088 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3089 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3090 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3091 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3092 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3093 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3094 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3095 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3096 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3097 "\x45\x54\x46\x20\x61\x63\x74\x69"
3098 "\x76\x69\x74\x79\x20\x69\x73\x20"
3099 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3100 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3101 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3102 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3103 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3104 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3105 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3106 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3107 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3108 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3109 "\x54\x46\x20\x73\x65\x73\x73\x69"
3110 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3111 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3112 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3113 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3114 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3115 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3116 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3117 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3118 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3119 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3120 "\x20\x77\x68\x69\x63\x68\x20\x61"
3121 "\x72\x65\x20\x61\x64\x64\x72\x65"
3122 "\x73\x73\x65\x64\x20\x74\x6f",
3123 .psize = 375,
3124 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3125 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3126 }, { /* Test Vector #3 */
3127 .key = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3128 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3129 "\x00\x00\x00\x00\x00\x00\x00\x00"
3130 "\x00\x00\x00\x00\x00\x00\x00\x00",
3131 .ksize = 32,
3132 .plaintext = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3133 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3134 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3135 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3136 "\x64\x65\x64\x20\x62\x79\x20\x74"
3137 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3138 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3139 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3140 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3141 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3142 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3143 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3144 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3145 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3146 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3147 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3148 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3149 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3150 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3151 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3152 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3153 "\x45\x54\x46\x20\x61\x63\x74\x69"
3154 "\x76\x69\x74\x79\x20\x69\x73\x20"
3155 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3156 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3157 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3158 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3159 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3160 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3161 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3162 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3163 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3164 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3165 "\x54\x46\x20\x73\x65\x73\x73\x69"
3166 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3167 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3168 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3169 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3170 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3171 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3172 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3173 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3174 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3175 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3176 "\x20\x77\x68\x69\x63\x68\x20\x61"
3177 "\x72\x65\x20\x61\x64\x64\x72\x65"
3178 "\x73\x73\x65\x64\x20\x74\x6f",
3179 .psize = 375,
3180 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3181 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3182 }, { /* Test Vector #4 */
3183 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
3184 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3185 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
3186 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
3187 .ksize = 32,
3188 .plaintext = "\x27\x54\x77\x61\x73\x20\x62\x72"
3189 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3190 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3191 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3192 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3193 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3194 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3195 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3196 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3197 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3198 "\x65\x72\x65\x20\x74\x68\x65\x20"
3199 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3200 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3201 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3202 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3203 "\x74\x67\x72\x61\x62\x65\x2e",
3204 .psize = 127,
3205 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3206 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3207 }, { /* Test Vector #5 */
3208 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3209 "\x00\x00\x00\x00\x00\x00\x00\x00"
3210 "\x00\x00\x00\x00\x00\x00\x00\x00"
3211 "\x00\x00\x00\x00\x00\x00\x00\x00",
3212 .ksize = 32,
3213 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3214 "\xff\xff\xff\xff\xff\xff\xff\xff",
3215 .psize = 16,
3216 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3217 "\x00\x00\x00\x00\x00\x00\x00\x00",
3218 }, { /* Test Vector #6 */
3219 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3220 "\x00\x00\x00\x00\x00\x00\x00\x00"
3221 "\xff\xff\xff\xff\xff\xff\xff\xff"
3222 "\xff\xff\xff\xff\xff\xff\xff\xff",
3223 .ksize = 32,
3224 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3225 "\x00\x00\x00\x00\x00\x00\x00\x00",
3226 .psize = 16,
3227 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3228 "\x00\x00\x00\x00\x00\x00\x00\x00",
3229 }, { /* Test Vector #7 */
3230 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3231 "\x00\x00\x00\x00\x00\x00\x00\x00"
3232 "\x00\x00\x00\x00\x00\x00\x00\x00"
3233 "\x00\x00\x00\x00\x00\x00\x00\x00",
3234 .ksize = 32,
3235 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3236 "\xff\xff\xff\xff\xff\xff\xff\xff"
3237 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3238 "\xff\xff\xff\xff\xff\xff\xff\xff"
3239 "\x11\x00\x00\x00\x00\x00\x00\x00"
3240 "\x00\x00\x00\x00\x00\x00\x00\x00",
3241 .psize = 48,
3242 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3243 "\x00\x00\x00\x00\x00\x00\x00\x00",
3244 }, { /* Test Vector #8 */
3245 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3246 "\x00\x00\x00\x00\x00\x00\x00\x00"
3247 "\x00\x00\x00\x00\x00\x00\x00\x00"
3248 "\x00\x00\x00\x00\x00\x00\x00\x00",
3249 .ksize = 32,
3250 .plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
3251 "\xff\xff\xff\xff\xff\xff\xff\xff"
3252 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3253 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3254 "\x01\x01\x01\x01\x01\x01\x01\x01"
3255 "\x01\x01\x01\x01\x01\x01\x01\x01",
3256 .psize = 48,
3257 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3258 "\x00\x00\x00\x00\x00\x00\x00\x00",
3259 }, { /* Test Vector #9 */
3260 .key = "\x02\x00\x00\x00\x00\x00\x00\x00"
3261 "\x00\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 .ksize = 32,
3265 .plaintext = "\xfd\xff\xff\xff\xff\xff\xff\xff"
3266 "\xff\xff\xff\xff\xff\xff\xff\xff",
3267 .psize = 16,
3268 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3269 "\xff\xff\xff\xff\xff\xff\xff\xff",
3270 }, { /* Test Vector #10 */
3271 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3272 "\x04\x00\x00\x00\x00\x00\x00\x00"
3273 "\x00\x00\x00\x00\x00\x00\x00\x00"
3274 "\x00\x00\x00\x00\x00\x00\x00\x00",
3275 .ksize = 32,
3276 .plaintext = "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3277 "\x00\x00\x00\x00\x00\x00\x00\x00"
3278 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3279 "\x01\x00\x00\x00\x00\x00\x00\x00"
3280 "\x00\x00\x00\x00\x00\x00\x00\x00"
3281 "\x00\x00\x00\x00\x00\x00\x00\x00"
3282 "\x01\x00\x00\x00\x00\x00\x00\x00"
3283 "\x00\x00\x00\x00\x00\x00\x00\x00",
3284 .psize = 64,
3285 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3286 "\x55\x00\x00\x00\x00\x00\x00\x00",
3287 }, { /* Test Vector #11 */
3288 .key = "\x01\x00\x00\x00\x00\x00\x00\x00"
3289 "\x04\x00\x00\x00\x00\x00\x00\x00"
3290 "\x00\x00\x00\x00\x00\x00\x00\x00"
3291 "\x00\x00\x00\x00\x00\x00\x00\x00",
3292 .ksize = 32,
3293 .plaintext = "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3294 "\x00\x00\x00\x00\x00\x00\x00\x00"
3295 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3296 "\x01\x00\x00\x00\x00\x00\x00\x00"
3297 "\x00\x00\x00\x00\x00\x00\x00\x00"
3298 "\x00\x00\x00\x00\x00\x00\x00\x00",
3299 .psize = 48,
3300 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3301 "\x00\x00\x00\x00\x00\x00\x00\x00",
3302 },
3303};
3304
3305/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003306 * DES test vectors.
3307 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003308#define DES_ENC_TEST_VECTORS 11
3309#define DES_DEC_TEST_VECTORS 5
3310#define DES_CBC_ENC_TEST_VECTORS 6
3311#define DES_CBC_DEC_TEST_VECTORS 5
3312#define DES_CTR_ENC_TEST_VECTORS 2
3313#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003314#define DES3_EDE_ENC_TEST_VECTORS 4
3315#define DES3_EDE_DEC_TEST_VECTORS 4
3316#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3317#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3318#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3319#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003320
3321static struct cipher_testvec des_enc_tv_template[] = {
3322 { /* From Applied Cryptography */
3323 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3324 .klen = 8,
3325 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3326 .ilen = 8,
3327 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3328 .rlen = 8,
3329 }, { /* Same key, different plaintext block */
3330 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3331 .klen = 8,
3332 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3333 .ilen = 8,
3334 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3335 .rlen = 8,
3336 }, { /* Sbox test from NBS */
3337 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3338 .klen = 8,
3339 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3340 .ilen = 8,
3341 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3342 .rlen = 8,
3343 }, { /* Three blocks */
3344 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3345 .klen = 8,
3346 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3347 "\x22\x33\x44\x55\x66\x77\x88\x99"
3348 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3349 .ilen = 24,
3350 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3351 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3352 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3353 .rlen = 24,
3354 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003355 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003356 .wk = 1,
3357 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3358 .klen = 8,
3359 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3360 .ilen = 8,
3361 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3362 .rlen = 8,
3363 }, { /* Two blocks -- for testing encryption across pages */
3364 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3365 .klen = 8,
3366 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3367 "\x22\x33\x44\x55\x66\x77\x88\x99",
3368 .ilen = 16,
3369 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3370 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3371 .rlen = 16,
3372 .np = 2,
3373 .tap = { 8, 8 }
3374 }, { /* Four blocks -- for testing encryption with chunking */
3375 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3376 .klen = 8,
3377 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3378 "\x22\x33\x44\x55\x66\x77\x88\x99"
3379 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3380 "\x22\x33\x44\x55\x66\x77\x88\x99",
3381 .ilen = 32,
3382 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3383 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3384 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3385 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3386 .rlen = 32,
3387 .np = 3,
3388 .tap = { 14, 10, 8 }
3389 }, {
3390 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3391 .klen = 8,
3392 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3393 "\x22\x33\x44\x55\x66\x77\x88\x99"
3394 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3395 .ilen = 24,
3396 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3397 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3398 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3399 .rlen = 24,
3400 .np = 4,
3401 .tap = { 2, 1, 3, 18 }
3402 }, {
3403 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3404 .klen = 8,
3405 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3406 "\x22\x33\x44\x55\x66\x77\x88\x99",
3407 .ilen = 16,
3408 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3409 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3410 .rlen = 16,
3411 .np = 5,
3412 .tap = { 2, 2, 2, 2, 8 }
3413 }, {
3414 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3415 .klen = 8,
3416 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3417 .ilen = 8,
3418 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3419 .rlen = 8,
3420 .np = 8,
3421 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003422 }, { /* Generated with Crypto++ */
3423 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3424 .klen = 8,
3425 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3426 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3427 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3428 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3429 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3430 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3431 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3432 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3433 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3434 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3435 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3436 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3437 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3438 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3439 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3440 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3441 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3442 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3443 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3444 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3445 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3446 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3447 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3448 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3449 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3450 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3451 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3452 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3453 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3454 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3455 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3456 .ilen = 248,
3457 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3458 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3459 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3460 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3461 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3462 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3463 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3464 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3465 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3466 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3467 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3468 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3469 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3470 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3471 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3472 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3473 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3474 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3475 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3476 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3477 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3478 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3479 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3480 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3481 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3482 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3483 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3484 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3485 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3486 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3487 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3488 .rlen = 248,
3489 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003490 .np = 3,
3491 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003492 },
3493};
3494
3495static struct cipher_testvec des_dec_tv_template[] = {
3496 { /* From Applied Cryptography */
3497 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3498 .klen = 8,
3499 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3500 .ilen = 8,
3501 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3502 .rlen = 8,
3503 }, { /* Sbox test from NBS */
3504 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3505 .klen = 8,
3506 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3507 .ilen = 8,
3508 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3509 .rlen = 8,
3510 }, { /* Two blocks, for chunking test */
3511 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3512 .klen = 8,
3513 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3514 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3515 .ilen = 16,
3516 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3517 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3518 .rlen = 16,
3519 .np = 2,
3520 .tap = { 8, 8 }
3521 }, {
3522 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3523 .klen = 8,
3524 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3525 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3526 .ilen = 16,
3527 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3528 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3529 .rlen = 16,
3530 .np = 3,
3531 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003532 }, { /* Generated with Crypto++ */
3533 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3534 .klen = 8,
3535 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3536 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3537 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3538 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3539 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3540 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3541 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3542 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3543 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3544 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3545 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3546 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3547 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3548 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3549 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3550 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3551 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3552 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3553 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3554 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3555 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3556 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3557 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3558 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3559 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3560 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3561 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3562 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3563 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3564 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3565 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3566 .ilen = 248,
3567 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3568 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3569 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3570 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3571 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3572 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3573 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3574 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3575 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3576 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3577 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3578 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3579 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3580 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3581 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3582 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3583 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3584 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3585 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3586 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3587 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3588 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3589 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3590 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3591 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3592 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3593 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3594 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3595 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3596 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3597 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3598 .rlen = 248,
3599 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003600 .np = 3,
3601 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003602 },
3603};
3604
3605static struct cipher_testvec des_cbc_enc_tv_template[] = {
3606 { /* From OpenSSL */
3607 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3608 .klen = 8,
3609 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3610 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3611 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3612 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3613 .ilen = 24,
3614 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3615 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3616 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3617 .rlen = 24,
3618 }, { /* FIPS Pub 81 */
3619 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3620 .klen = 8,
3621 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3622 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3623 .ilen = 8,
3624 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3625 .rlen = 8,
3626 }, {
3627 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3628 .klen = 8,
3629 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3630 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3631 .ilen = 8,
3632 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3633 .rlen = 8,
3634 }, {
3635 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3636 .klen = 8,
3637 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3638 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3639 .ilen = 8,
3640 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3641 .rlen = 8,
3642 }, { /* Copy of openssl vector for chunk testing */
3643 /* From OpenSSL */
3644 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3645 .klen = 8,
3646 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3647 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3648 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3649 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3650 .ilen = 24,
3651 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3652 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3653 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3654 .rlen = 24,
3655 .np = 2,
3656 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003657 }, { /* Generated with Crypto++ */
3658 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3659 .klen = 8,
3660 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3661 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3662 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3663 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3664 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3665 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3666 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3667 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3668 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3669 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3670 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3671 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3672 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3673 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3674 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3675 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3676 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3677 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3678 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3679 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3680 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3681 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3682 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3683 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3684 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3685 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3686 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3687 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3688 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3689 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3690 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3691 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3692 .ilen = 248,
3693 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3694 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3695 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3696 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3697 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3698 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3699 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3700 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3701 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3702 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3703 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3704 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3705 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3706 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3707 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3708 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3709 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3710 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3711 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3712 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3713 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3714 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3715 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3716 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3717 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3718 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3719 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3720 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3721 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3722 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3723 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3724 .rlen = 248,
3725 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003726 .np = 3,
3727 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003728 },
3729};
3730
3731static struct cipher_testvec des_cbc_dec_tv_template[] = {
3732 { /* FIPS Pub 81 */
3733 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3734 .klen = 8,
3735 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3736 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3737 .ilen = 8,
3738 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3739 .rlen = 8,
3740 }, {
3741 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3742 .klen = 8,
3743 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3744 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3745 .ilen = 8,
3746 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3747 .rlen = 8,
3748 }, {
3749 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3750 .klen = 8,
3751 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3752 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3753 .ilen = 8,
3754 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3755 .rlen = 8,
3756 }, { /* Copy of above, for chunk testing */
3757 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3758 .klen = 8,
3759 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3760 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3761 .ilen = 8,
3762 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3763 .rlen = 8,
3764 .np = 2,
3765 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003766 }, { /* Generated with Crypto++ */
3767 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3768 .klen = 8,
3769 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3770 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3771 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3772 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3773 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3774 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3775 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3776 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3777 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3778 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3779 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3780 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3781 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3782 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3783 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3784 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3785 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3786 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3787 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3788 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3789 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3790 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3791 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3792 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3793 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3794 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3795 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3796 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3797 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3798 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3799 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3800 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3801 .ilen = 248,
3802 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3803 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3804 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3805 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3806 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3807 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3808 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3809 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3810 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3811 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3812 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3813 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3814 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3815 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3816 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3817 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3818 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3819 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3820 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3821 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3822 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3823 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3824 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3825 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3826 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3827 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3828 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3829 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3830 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3831 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3832 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3833 .rlen = 248,
3834 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003835 .np = 3,
3836 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003837 },
3838};
3839
3840static struct cipher_testvec des_ctr_enc_tv_template[] = {
3841 { /* Generated with Crypto++ */
3842 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3843 .klen = 8,
3844 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3845 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3846 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3847 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3848 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3849 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3850 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3851 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3852 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3853 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3854 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3855 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3856 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3857 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3858 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3859 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3860 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3861 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3862 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3863 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3864 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3865 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3866 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3867 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3868 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3869 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3870 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3871 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3872 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3873 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3874 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3875 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3876 .ilen = 248,
3877 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3878 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3879 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3880 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3881 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3882 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3883 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3884 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3885 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
3886 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
3887 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
3888 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
3889 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
3890 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
3891 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
3892 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
3893 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
3894 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
3895 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
3896 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
3897 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
3898 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
3899 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
3900 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
3901 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
3902 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
3903 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
3904 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
3905 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
3906 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
3907 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
3908 .rlen = 248,
3909 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003910 .np = 3,
3911 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003912 }, { /* Generated with Crypto++ */
3913 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3914 .klen = 8,
3915 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3916 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3917 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3918 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3919 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3920 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3921 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3922 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3923 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3924 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3925 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3926 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3927 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3928 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3929 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3930 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3931 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3932 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3933 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3934 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3935 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3936 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3937 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3938 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3939 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3940 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3941 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3942 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3943 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3944 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3945 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3946 "\xC6\x2F\xBB\x24\x8D\x19\x82",
3947 .ilen = 247,
3948 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
3949 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
3950 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
3951 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
3952 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
3953 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
3954 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
3955 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
3956 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
3957 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
3958 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
3959 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
3960 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
3961 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
3962 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
3963 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
3964 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
3965 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
3966 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
3967 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
3968 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
3969 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
3970 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
3971 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
3972 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
3973 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
3974 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
3975 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
3976 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
3977 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
3978 "\x91\x45\x05\x3E\x58\xBF\x32",
3979 .rlen = 247,
3980 .also_non_np = 1,
3981 .np = 2,
3982 .tap = { 247 - 8, 8 },
3983 },
3984};
3985
3986static struct cipher_testvec des_ctr_dec_tv_template[] = {
3987 { /* Generated with Crypto++ */
3988 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3989 .klen = 8,
3990 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3991 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3992 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3993 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3994 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3995 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3996 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3997 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3998 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3999 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4000 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4001 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4002 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4003 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4004 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4005 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4006 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4007 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4008 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4009 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4010 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4011 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4012 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4013 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4014 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4015 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4016 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4017 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4018 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4019 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4020 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4021 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4022 .ilen = 248,
4023 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4024 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4025 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4026 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4027 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4028 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4029 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4030 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4031 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4032 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4033 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4034 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4035 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4036 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4037 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4038 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4039 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4040 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4041 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4042 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4043 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4044 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4045 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4046 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4047 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4048 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4049 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4050 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4051 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4052 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4053 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4054 .rlen = 248,
4055 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004056 .np = 3,
4057 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004058 }, { /* Generated with Crypto++ */
4059 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4060 .klen = 8,
4061 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4062 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4063 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4064 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4065 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4066 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4067 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4068 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4069 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4070 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4071 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4072 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4073 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4074 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4075 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4076 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4077 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4078 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4079 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4080 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4081 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4082 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4083 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4084 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4085 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4086 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4087 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4088 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4089 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4090 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4091 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4092 "\x91\x45\x05\x3E\x58\xBF\x32",
4093 .ilen = 247,
4094 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4095 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4096 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4097 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4098 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4099 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4100 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4101 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4102 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4103 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4104 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4105 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4106 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4107 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4108 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4109 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4110 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4111 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4112 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4113 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4114 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4115 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4116 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4117 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4118 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4119 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4120 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4121 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4122 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4123 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4124 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4125 .rlen = 247,
4126 .also_non_np = 1,
4127 .np = 2,
4128 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004129 },
4130};
4131
4132static struct cipher_testvec des3_ede_enc_tv_template[] = {
4133 { /* These are from openssl */
4134 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4135 "\x55\x55\x55\x55\x55\x55\x55\x55"
4136 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4137 .klen = 24,
4138 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4139 .ilen = 8,
4140 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4141 .rlen = 8,
4142 }, {
4143 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4144 "\x86\x02\x87\x66\x59\x08\x21\x98"
4145 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4146 .klen = 24,
4147 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4148 .ilen = 8,
4149 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4150 .rlen = 8,
4151 }, {
4152 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4153 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4154 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4155 .klen = 24,
4156 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4157 .ilen = 8,
4158 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4159 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004160 }, { /* Generated with Crypto++ */
4161 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4162 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4163 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4164 .klen = 24,
4165 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4166 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4167 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4168 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4169 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4170 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4171 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4172 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4173 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4174 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4175 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4176 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4177 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4178 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4179 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4180 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4181 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4182 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4183 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4184 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4185 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4186 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4187 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4188 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4189 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4190 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4191 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4192 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4193 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4194 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4195 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4196 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4197 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4198 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4199 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4200 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4201 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4202 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4203 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4204 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4205 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4206 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4207 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4208 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4209 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4210 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4211 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4212 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4213 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4214 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4215 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4216 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4217 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4218 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4219 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4220 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4221 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4222 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4223 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4224 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4225 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4226 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4227 .ilen = 496,
4228 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4229 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4230 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4231 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4232 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4233 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4234 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4235 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4236 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4237 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4238 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4239 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4240 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4241 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4242 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4243 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4244 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4245 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4246 "\x45\x86\x50\x01\x70\x35\x99\x92"
4247 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4248 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4249 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4250 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4251 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4252 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4253 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4254 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4255 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4256 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4257 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4258 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4259 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4260 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4261 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4262 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4263 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4264 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4265 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4266 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4267 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4268 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4269 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4270 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4271 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4272 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4273 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4274 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4275 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4276 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4277 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4278 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4279 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4280 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4281 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4282 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4283 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4284 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4285 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4286 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4287 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4288 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4289 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4290 .rlen = 496,
4291 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004292 .np = 3,
4293 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004294 },
4295};
4296
4297static struct cipher_testvec des3_ede_dec_tv_template[] = {
4298 { /* These are from openssl */
4299 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4300 "\x55\x55\x55\x55\x55\x55\x55\x55"
4301 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4302 .klen = 24,
4303 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4304 .ilen = 8,
4305 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4306 .rlen = 8,
4307 }, {
4308 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4309 "\x86\x02\x87\x66\x59\x08\x21\x98"
4310 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4311 .klen = 24,
4312 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4313 .ilen = 8,
4314 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4315 .rlen = 8,
4316 }, {
4317 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4318 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4319 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4320 .klen = 24,
4321 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4322 .ilen = 8,
4323 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4324 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004325 }, { /* Generated with Crypto++ */
4326 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4327 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4328 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4329 .klen = 24,
4330 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4331 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4332 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4333 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4334 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4335 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4336 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4337 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4338 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4339 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4340 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4341 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4342 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4343 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4344 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4345 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4346 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4347 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4348 "\x45\x86\x50\x01\x70\x35\x99\x92"
4349 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4350 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4351 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4352 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4353 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4354 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4355 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4356 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4357 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4358 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4359 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4360 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4361 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4362 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4363 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4364 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4365 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4366 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4367 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4368 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4369 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4370 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4371 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4372 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4373 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4374 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4375 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4376 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4377 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4378 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4379 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4380 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4381 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4382 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4383 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4384 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4385 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4386 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4387 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4388 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4389 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4390 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4391 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4392 .ilen = 496,
4393 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4394 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4395 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4396 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4397 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4398 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4399 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4400 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4401 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4402 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4403 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4404 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4405 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4406 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4407 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4408 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4409 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4410 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4411 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4412 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4413 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4414 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4415 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4416 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4417 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4418 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4419 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4420 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4421 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4422 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4423 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4424 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4425 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4426 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4427 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4428 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4429 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4430 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4431 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4432 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4433 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4434 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4435 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4436 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4437 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4438 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4439 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4440 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4441 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4442 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4443 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4444 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4445 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4446 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4447 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4448 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4449 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4450 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4451 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4452 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4453 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4454 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4455 .rlen = 496,
4456 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004457 .np = 3,
4458 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004459 },
4460};
4461
4462static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4463 { /* Generated from openssl */
4464 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4465 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4466 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4467 .klen = 24,
4468 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4469 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4470 "\x53\x20\x63\x65\x65\x72\x73\x74"
4471 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4472 "\x20\x79\x65\x53\x72\x63\x74\x65"
4473 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4474 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4475 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4476 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4477 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4478 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4479 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4480 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4481 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4482 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4483 "\x63\x65\x65\x72\x73\x74\x54\x20"
4484 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4485 .ilen = 128,
4486 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4487 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4488 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4489 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4490 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4491 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4492 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4493 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4494 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4495 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4496 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4497 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4498 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4499 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4500 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4501 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4502 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004503 }, { /* Generated with Crypto++ */
4504 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4505 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4506 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4507 .klen = 24,
4508 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4509 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4510 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4511 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4512 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4513 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4514 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4515 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4516 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4517 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4518 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4519 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4520 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4521 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4522 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4523 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4524 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4525 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4526 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4527 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4528 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4529 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4530 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4531 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4532 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4533 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4534 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4535 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4536 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4537 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4538 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4539 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4540 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4541 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4542 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4543 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4544 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4545 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4546 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4547 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4548 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4549 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4550 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4551 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4552 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4553 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4554 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4555 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4556 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4557 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4558 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4559 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4560 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4561 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4562 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4563 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4564 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4565 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4566 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4567 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4568 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4569 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4570 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4571 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4572 .ilen = 496,
4573 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4574 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4575 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4576 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4577 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4578 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4579 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4580 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4581 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4582 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4583 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4584 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4585 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4586 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4587 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4588 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4589 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4590 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4591 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4592 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4593 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4594 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4595 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4596 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4597 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4598 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4599 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4600 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4601 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4602 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4603 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4604 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4605 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4606 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4607 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4608 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4609 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4610 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4611 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4612 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4613 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4614 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4615 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4616 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4617 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4618 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4619 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4620 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4621 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4622 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4623 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4624 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4625 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4626 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4627 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4628 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4629 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4630 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4631 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4632 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4633 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4634 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4635 .rlen = 496,
4636 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004637 .np = 3,
4638 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004639 },
4640};
4641
4642static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4643 { /* Generated from openssl */
4644 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4645 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4646 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4647 .klen = 24,
4648 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4649 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4650 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4651 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4652 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4653 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4654 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4655 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4656 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4657 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4658 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4659 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4660 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4661 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4662 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4663 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4664 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4665 .ilen = 128,
4666 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4667 "\x53\x20\x63\x65\x65\x72\x73\x74"
4668 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4669 "\x20\x79\x65\x53\x72\x63\x74\x65"
4670 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4671 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4672 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4673 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4674 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4675 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4676 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4677 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4678 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4679 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4680 "\x63\x65\x65\x72\x73\x74\x54\x20"
4681 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4682 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004683 }, { /* Generated with Crypto++ */
4684 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4685 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4686 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4687 .klen = 24,
4688 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4689 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4690 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4691 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4692 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4693 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4694 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4695 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4696 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4697 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4698 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4699 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4700 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4701 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4702 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4703 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4704 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4705 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4706 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4707 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4708 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4709 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4710 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4711 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4712 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4713 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4714 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4715 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4716 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4717 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4718 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4719 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4720 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4721 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4722 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4723 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4724 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4725 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4726 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4727 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4728 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4729 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4730 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4731 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4732 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4733 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4734 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4735 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4736 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4737 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4738 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4739 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4740 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4741 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4742 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4743 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4744 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4745 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4746 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4747 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4748 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4749 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4750 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4751 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4752 .ilen = 496,
4753 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4754 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4755 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4756 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4757 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4758 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4759 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4760 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4761 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4762 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4763 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4764 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4765 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4766 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4767 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4768 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4769 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4770 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4771 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4772 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4773 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4774 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4775 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4776 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4777 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4778 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4779 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4780 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4781 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4782 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4783 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4784 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4785 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4786 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4787 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4788 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4789 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4790 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4791 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4792 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4793 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4794 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4795 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4796 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4797 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4798 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4799 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4800 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4801 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4802 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4803 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4804 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4805 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4806 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4807 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4808 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4809 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4810 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4811 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4812 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4813 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4814 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4815 .rlen = 496,
4816 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004817 .np = 3,
4818 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004819 },
4820};
4821
4822static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
4823 { /* Generated with Crypto++ */
4824 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4825 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4826 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4827 .klen = 24,
4828 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4829 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4830 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4831 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4832 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4833 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4834 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4835 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4836 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4837 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4838 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4839 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4840 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4841 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4842 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4843 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4844 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4845 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4846 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4847 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4848 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4849 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4850 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4851 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4852 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4853 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4854 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4855 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4856 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4857 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4858 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4859 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4860 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4861 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4862 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4863 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4864 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4865 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4866 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4867 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4868 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4869 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4870 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4871 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4872 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4873 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4874 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4875 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4876 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4877 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4878 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4879 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4880 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4881 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4882 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4883 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4884 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4885 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4886 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4887 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4888 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4889 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4890 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4891 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4892 .ilen = 496,
4893 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
4894 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
4895 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
4896 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
4897 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
4898 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
4899 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
4900 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
4901 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
4902 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
4903 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
4904 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
4905 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
4906 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
4907 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
4908 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
4909 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
4910 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
4911 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
4912 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
4913 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
4914 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
4915 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
4916 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
4917 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
4918 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
4919 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
4920 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
4921 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
4922 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
4923 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
4924 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
4925 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
4926 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
4927 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
4928 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
4929 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
4930 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
4931 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
4932 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
4933 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
4934 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
4935 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
4936 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
4937 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
4938 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
4939 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
4940 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
4941 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
4942 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
4943 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
4944 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
4945 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
4946 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
4947 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
4948 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
4949 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
4950 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
4951 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
4952 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
4953 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
4954 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
4955 .rlen = 496,
4956 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004957 .np = 3,
4958 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004959 }, { /* Generated with Crypto++ */
4960 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4961 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4962 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4963 .klen = 24,
4964 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4965 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4966 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4967 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4968 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4969 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4970 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4971 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4972 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4973 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4974 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4975 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4976 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4977 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4978 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4979 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4980 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4981 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4982 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4983 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4984 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4985 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4986 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4987 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4988 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4989 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4990 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4991 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4992 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4993 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4994 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4995 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4996 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4997 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4998 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4999 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5000 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5001 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5002 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5003 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5004 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5005 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5006 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5007 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5008 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5009 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5010 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5011 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5012 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5013 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5014 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5015 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5016 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5017 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5018 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5019 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5020 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5021 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5022 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5023 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5024 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5025 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5026 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5027 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5028 "\x2E\xB1\x18",
5029 .ilen = 499,
5030 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5031 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5032 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5033 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5034 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5035 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5036 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5037 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5038 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5039 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5040 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5041 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5042 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5043 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5044 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5045 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5046 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5047 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5048 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5049 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5050 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5051 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5052 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5053 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5054 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5055 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5056 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5057 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5058 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5059 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5060 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5061 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5062 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5063 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5064 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5065 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5066 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5067 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5068 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5069 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5070 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5071 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5072 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5073 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5074 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5075 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5076 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5077 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5078 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5079 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5080 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5081 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5082 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5083 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5084 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5085 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5086 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5087 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5088 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5089 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5090 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5091 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5092 "\xF2\x79\xD9",
5093 .rlen = 499,
5094 .also_non_np = 1,
5095 .np = 2,
5096 .tap = { 499 - 16, 16 },
5097 },
5098};
5099
5100static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5101 { /* Generated with Crypto++ */
5102 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5103 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5104 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5105 .klen = 24,
5106 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5107 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5108 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5109 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5110 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5111 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5112 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5113 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5114 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5115 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5116 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5117 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5118 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5119 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5120 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5121 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5122 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5123 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5124 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5125 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5126 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5127 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5128 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5129 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5130 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5131 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5132 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5133 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5134 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5135 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5136 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5137 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5138 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5139 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5140 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5141 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5142 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5143 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5144 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5145 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5146 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5147 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5148 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5149 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5150 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5151 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5152 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5153 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5154 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5155 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5156 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5157 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5158 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5159 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5160 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5161 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5162 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5163 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5164 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5165 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5166 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5167 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5168 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5169 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5170 .ilen = 496,
5171 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5172 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5173 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5174 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5175 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5176 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5177 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5178 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5179 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5180 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5181 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5182 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5183 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5184 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5185 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5186 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5187 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5188 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5189 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5190 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5191 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5192 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5193 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5194 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5195 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5196 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5197 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5198 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5199 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5200 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5201 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5202 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5203 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5204 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5205 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5206 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5207 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5208 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5209 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5210 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5211 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5212 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5213 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5214 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5215 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5216 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5217 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5218 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5219 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5220 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5221 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5222 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5223 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5224 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5225 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5226 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5227 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5228 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5229 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5230 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5231 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5232 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5233 .rlen = 496,
5234 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005235 .np = 3,
5236 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005237 }, { /* Generated with Crypto++ */
5238 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5239 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5240 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5241 .klen = 24,
5242 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5243 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5244 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5245 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5246 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5247 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5248 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5249 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5250 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5251 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5252 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5253 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5254 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5255 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5256 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5257 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5258 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5259 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5260 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5261 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5262 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5263 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5264 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5265 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5266 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5267 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5268 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5269 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5270 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5271 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5272 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5273 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5274 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5275 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5276 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5277 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5278 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5279 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5280 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5281 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5282 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5283 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5284 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5285 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5286 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5287 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5288 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5289 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5290 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5291 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5292 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5293 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5294 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5295 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5296 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5297 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5298 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5299 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5300 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5301 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5302 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5303 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5304 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5305 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5306 "\xF2\x79\xD9",
5307 .ilen = 499,
5308 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5309 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5310 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5311 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5312 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5313 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5314 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5315 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5316 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5317 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5318 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5319 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5320 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5321 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5322 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5323 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5324 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5325 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5326 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5327 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5328 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5329 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5330 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5331 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5332 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5333 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5334 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5335 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5336 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5337 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5338 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5339 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5340 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5341 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5342 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5343 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5344 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5345 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5346 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5347 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5348 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5349 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5350 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5351 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5352 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5353 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5354 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5355 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5356 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5357 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5358 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5359 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5360 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5361 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5362 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5363 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5364 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5365 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5366 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5367 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5368 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5369 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5370 "\x2E\xB1\x18",
5371 .rlen = 499,
5372 .also_non_np = 1,
5373 .np = 2,
5374 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005375 },
5376};
5377
5378/*
5379 * Blowfish test vectors.
5380 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005381#define BF_ENC_TEST_VECTORS 7
5382#define BF_DEC_TEST_VECTORS 7
5383#define BF_CBC_ENC_TEST_VECTORS 2
5384#define BF_CBC_DEC_TEST_VECTORS 2
5385#define BF_CTR_ENC_TEST_VECTORS 2
5386#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005387
5388static struct cipher_testvec bf_enc_tv_template[] = {
5389 { /* DES test vectors from OpenSSL */
5390 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5391 .klen = 8,
5392 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5393 .ilen = 8,
5394 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5395 .rlen = 8,
5396 }, {
5397 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5398 .klen = 8,
5399 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5400 .ilen = 8,
5401 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5402 .rlen = 8,
5403 }, {
5404 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5405 .klen = 8,
5406 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5407 .ilen = 8,
5408 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5409 .rlen = 8,
5410 }, { /* Vary the keylength... */
5411 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5412 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5413 .klen = 16,
5414 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5415 .ilen = 8,
5416 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5417 .rlen = 8,
5418 }, {
5419 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5420 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5421 "\x00\x11\x22\x33\x44",
5422 .klen = 21,
5423 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5424 .ilen = 8,
5425 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5426 .rlen = 8,
5427 }, { /* Generated with bf488 */
5428 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5429 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5430 "\x00\x11\x22\x33\x44\x55\x66\x77"
5431 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5432 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5433 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5434 "\xff\xff\xff\xff\xff\xff\xff\xff",
5435 .klen = 56,
5436 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5437 .ilen = 8,
5438 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5439 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005440 }, { /* Generated with Crypto++ */
5441 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5442 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5443 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5444 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5445 .klen = 32,
5446 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5447 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5448 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5449 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005450 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5451 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5452 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5453 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5454 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5455 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5456 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5457 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5458 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5459 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5460 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5461 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5462 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5463 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5464 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5465 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5466 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5467 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5468 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5469 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5470 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5471 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5472 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5473 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5474 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5475 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5476 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5477 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5478 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5479 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5480 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5481 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5482 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5483 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5484 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5485 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5486 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5487 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5488 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5489 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5490 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5491 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5492 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5493 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5494 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5495 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5496 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5497 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5498 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5499 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5500 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5501 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5502 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5503 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5504 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5505 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5506 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5507 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5508 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5509 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005510 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5511 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5512 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5513 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005514 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5515 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5516 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5517 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5518 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5519 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5520 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5521 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5522 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5523 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5524 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5525 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5526 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5527 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5528 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5529 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5530 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5531 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5532 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5533 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5534 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5535 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5536 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5537 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5538 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5539 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5540 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5541 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5542 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5543 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5544 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5545 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5546 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5547 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5548 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5549 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5550 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5551 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5552 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5553 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5554 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5555 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5556 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5557 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5558 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5559 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5560 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5561 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5562 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5563 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5564 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5565 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5566 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5567 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5568 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5569 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5570 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5571 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5572 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5573 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005574 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005575 .np = 3,
5576 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005577 },
5578};
5579
5580static struct cipher_testvec bf_dec_tv_template[] = {
5581 { /* DES test vectors from OpenSSL */
5582 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5583 .klen = 8,
5584 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5585 .ilen = 8,
5586 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5587 .rlen = 8,
5588 }, {
5589 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5590 .klen = 8,
5591 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5592 .ilen = 8,
5593 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5594 .rlen = 8,
5595 }, {
5596 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5597 .klen = 8,
5598 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5599 .ilen = 8,
5600 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5601 .rlen = 8,
5602 }, { /* Vary the keylength... */
5603 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5604 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5605 .klen = 16,
5606 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5607 .ilen = 8,
5608 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5609 .rlen = 8,
5610 }, {
5611 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5612 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5613 "\x00\x11\x22\x33\x44",
5614 .klen = 21,
5615 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5616 .ilen = 8,
5617 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5618 .rlen = 8,
5619 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5620 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5621 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5622 "\x00\x11\x22\x33\x44\x55\x66\x77"
5623 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5624 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5625 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5626 "\xff\xff\xff\xff\xff\xff\xff\xff",
5627 .klen = 56,
5628 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5629 .ilen = 8,
5630 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5631 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005632 }, { /* Generated with Crypto++ */
5633 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5634 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5635 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5636 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5637 .klen = 32,
5638 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5639 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5640 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5641 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005642 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5643 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5644 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5645 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5646 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5647 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5648 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5649 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5650 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5651 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5652 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5653 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5654 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5655 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5656 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5657 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5658 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5659 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5660 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5661 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5662 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5663 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5664 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5665 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5666 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5667 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5668 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5669 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5670 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5671 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5672 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5673 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5674 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5675 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5676 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5677 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5678 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5679 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5680 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5681 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5682 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5683 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5684 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5685 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5686 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5687 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5688 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5689 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5690 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5691 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5692 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5693 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5694 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5695 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5696 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5697 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5698 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5699 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5700 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5701 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005702 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5703 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5704 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5705 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005706 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5707 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5708 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5709 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5710 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5711 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5712 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5713 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5714 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5715 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5716 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5717 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5718 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5719 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5720 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5721 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5722 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5723 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5724 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5725 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5726 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5727 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5728 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5729 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5730 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5731 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5732 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5733 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5734 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5735 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5736 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5737 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5738 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5739 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5740 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5741 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5742 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5743 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5744 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5745 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5746 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5747 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5748 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5749 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5750 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5751 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5752 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5753 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5754 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5755 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5756 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5757 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5758 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5759 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5760 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5761 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5762 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5763 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5764 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5765 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005766 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005767 .np = 3,
5768 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005769 },
5770};
5771
5772static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5773 { /* From OpenSSL */
5774 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5775 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5776 .klen = 16,
5777 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5778 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
5779 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5780 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5781 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5782 .ilen = 32,
5783 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5784 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5785 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5786 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5787 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005788 }, { /* Generated with Crypto++ */
5789 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5790 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5791 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5792 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5793 .klen = 32,
5794 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5795 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5796 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5797 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5798 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005799 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5800 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5801 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5802 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5803 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5804 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5805 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5806 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5807 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5808 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5809 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5810 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5811 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5812 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5813 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5814 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5815 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5816 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5817 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5818 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5819 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5820 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5821 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5822 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5823 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5824 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5825 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5826 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5827 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5828 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5829 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5830 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5831 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5832 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5833 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5834 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5835 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5836 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5837 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5838 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5839 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5840 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5841 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5842 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5843 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5844 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5845 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5846 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5847 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5848 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5849 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5850 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5851 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5852 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5853 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5854 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5855 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5856 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5857 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5858 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005859 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5860 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5861 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5862 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005863 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5864 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5865 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5866 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5867 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5868 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5869 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5870 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5871 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5872 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5873 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5874 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5875 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5876 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5877 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5878 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5879 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5880 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5881 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5882 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5883 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5884 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5885 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5886 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5887 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5888 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5889 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5890 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5891 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5892 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5893 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5894 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5895 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5896 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5897 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5898 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5899 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5900 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5901 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5902 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5903 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5904 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5905 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5906 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
5907 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
5908 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
5909 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
5910 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
5911 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
5912 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
5913 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
5914 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
5915 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
5916 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
5917 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
5918 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
5919 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
5920 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
5921 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
5922 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005923 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005924 .np = 3,
5925 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005926 },
5927};
5928
5929static struct cipher_testvec bf_cbc_dec_tv_template[] = {
5930 { /* From OpenSSL */
5931 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5932 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5933 .klen = 16,
5934 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5935 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5936 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5937 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5938 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5939 .ilen = 32,
5940 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
5941 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5942 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5943 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5944 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005945 }, { /* Generated with Crypto++ */
5946 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5947 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5948 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5949 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5950 .klen = 32,
5951 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5952 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5953 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5954 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5955 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005956 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5957 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5958 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5959 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5960 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5961 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5962 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5963 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5964 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5965 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5966 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5967 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5968 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5969 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5970 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5971 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5972 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5973 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5974 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5975 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5976 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5977 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5978 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5979 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5980 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5981 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5982 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5983 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5984 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5985 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5986 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5987 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5988 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5989 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5990 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5991 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5992 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5993 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5994 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5995 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5996 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5997 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5998 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5999 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6000 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6001 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6002 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6003 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6004 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6005 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6006 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6007 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6008 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6009 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6010 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6011 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6012 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6013 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6014 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6015 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006016 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6017 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6018 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6019 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006020 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6021 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6022 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6023 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6024 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6025 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6026 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6027 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6028 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6029 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6030 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6031 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6032 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6033 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6034 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6035 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6036 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6037 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6038 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6039 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6040 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6041 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6042 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6043 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6044 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6045 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6046 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6047 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6048 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6049 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6050 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6051 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6052 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6053 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6054 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6055 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6056 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6057 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6058 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6059 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6060 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6061 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6062 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6063 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6064 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6065 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6066 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6067 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6068 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6069 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6070 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6071 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6072 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6073 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6074 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6075 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6076 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6077 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6078 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6079 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006080 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006081 .np = 3,
6082 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006083 },
6084};
6085
6086static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6087 { /* Generated with Crypto++ */
6088 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6089 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6090 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6091 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6092 .klen = 32,
6093 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6094 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6095 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6096 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6097 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006098 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6099 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6100 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6101 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6102 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6103 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6104 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6105 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6106 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6107 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6108 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6109 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6110 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6111 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6112 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6113 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6114 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6115 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6116 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6117 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6118 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6119 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6120 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6121 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6122 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6123 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6124 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6125 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6126 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6127 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6128 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6129 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6130 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6131 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6132 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6133 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6134 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6135 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6136 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6137 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6138 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6139 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6140 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6141 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6142 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6143 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6144 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6145 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6146 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6147 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6148 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6149 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6150 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6151 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6152 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6153 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6154 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6155 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6156 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6157 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006158 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6159 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6160 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6161 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006162 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6163 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6164 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6165 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6166 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6167 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6168 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6169 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6170 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6171 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6172 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6173 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6174 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6175 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6176 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6177 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6178 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6179 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6180 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6181 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6182 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6183 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6184 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6185 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6186 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6187 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6188 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6189 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6190 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6191 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6192 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6193 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6194 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6195 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6196 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6197 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6198 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6199 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6200 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6201 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6202 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6203 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6204 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6205 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6206 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6207 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6208 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6209 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6210 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6211 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6212 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6213 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6214 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6215 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6216 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6217 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6218 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6219 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6220 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6221 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006222 }, { /* Generated with Crypto++ */
6223 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6224 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6225 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6226 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6227 .klen = 32,
6228 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6229 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6230 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6231 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6232 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6233 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006234 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6235 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6236 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6237 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6238 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6239 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6240 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6241 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6242 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6243 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6244 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6245 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6246 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6247 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6248 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6249 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6250 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6251 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6252 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6253 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6254 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6255 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6256 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6257 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6258 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6259 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6260 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6261 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6262 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6263 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6264 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6265 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6266 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6267 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6268 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6269 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6270 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6271 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6272 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6273 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6274 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6275 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6276 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6277 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6278 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6279 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6280 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6281 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6282 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6283 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6284 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6285 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6286 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6287 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6288 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6289 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6290 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6291 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6292 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006293 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6294 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6295 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6296 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6297 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006298 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6299 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6300 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6301 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6302 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6303 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6304 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6305 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6306 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6307 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6308 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6309 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6310 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6311 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6312 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6313 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6314 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6315 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6316 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6317 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6318 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6319 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6320 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6321 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6322 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6323 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6324 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6325 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6326 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6327 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6328 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6329 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6330 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6331 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6332 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6333 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6334 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6335 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6336 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6337 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6338 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6339 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6340 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6341 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6342 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6343 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6344 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6345 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6346 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6347 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6348 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6349 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6350 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6351 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6352 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6353 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6354 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6355 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6356 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006357 .also_non_np = 1,
6358 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006359 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006360 }, { /* Generated with Crypto++ */
6361 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6362 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6363 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6364 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6365 .klen = 32,
6366 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6367 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6368 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6369 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6370 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6371 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6372 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6373 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6374 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6375 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6376 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6377 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6378 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6379 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6380 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6381 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6382 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6383 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6384 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6385 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6386 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6387 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6388 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6389 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6390 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6391 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6392 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6393 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6394 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6395 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6396 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6397 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6398 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6399 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6400 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6401 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6402 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6403 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6404 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6405 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6406 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6407 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6408 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6409 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6410 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6411 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6412 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6413 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6414 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6415 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6416 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6417 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6418 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6419 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6420 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6421 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6422 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6423 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6424 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6425 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6426 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6427 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6428 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6429 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6430 .ilen = 504,
6431 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6432 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6433 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6434 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6435 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6436 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6437 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6438 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6439 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6440 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6441 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6442 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6443 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6444 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6445 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6446 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6447 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6448 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6449 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6450 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6451 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6452 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6453 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6454 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6455 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6456 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6457 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6458 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6459 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6460 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6461 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6462 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6463 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6464 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6465 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6466 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6467 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6468 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6469 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6470 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6471 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6472 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6473 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6474 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6475 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6476 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6477 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6478 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6479 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6480 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6481 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6482 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6483 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6484 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6485 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6486 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6487 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6488 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6489 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6490 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6491 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6492 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6493 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6494 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006495 },
6496};
6497
6498static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6499 { /* Generated with Crypto++ */
6500 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6501 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6502 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6503 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6504 .klen = 32,
6505 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6506 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6507 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6508 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6509 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006510 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6511 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6512 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6513 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6514 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6515 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6516 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6517 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6518 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6519 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6520 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6521 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6522 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6523 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6524 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6525 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6526 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6527 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6528 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6529 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6530 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6531 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6532 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6533 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6534 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6535 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6536 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6537 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6538 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6539 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6540 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6541 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6542 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6543 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6544 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6545 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6546 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6547 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6548 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6549 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6550 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6551 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6552 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6553 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6554 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6555 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6556 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6557 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6558 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6559 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6560 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6561 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6562 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6563 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6564 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6565 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6566 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6567 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6568 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6569 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006570 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6571 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6572 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6573 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006574 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6575 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6576 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6577 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6578 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6579 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6580 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6581 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6582 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6583 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6584 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6585 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6586 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6587 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6588 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6589 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6590 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6591 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6592 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6593 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6594 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6595 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6596 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6597 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6598 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6599 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6600 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6601 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6602 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6603 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6604 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6605 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6606 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6607 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6608 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6609 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6610 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6611 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6612 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6613 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6614 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6615 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6616 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6617 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6618 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6619 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6620 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6621 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6622 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6623 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6624 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6625 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6626 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6627 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6628 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6629 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6630 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6631 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6632 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6633 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006634 }, { /* Generated with Crypto++ */
6635 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6636 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6637 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6638 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6639 .klen = 32,
6640 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6641 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6642 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6643 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6644 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6645 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006646 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6647 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6648 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6649 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6650 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6651 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6652 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6653 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6654 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6655 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6656 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6657 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6658 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6659 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6660 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6661 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6662 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6663 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6664 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6665 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6666 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6667 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6668 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6669 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6670 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6671 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6672 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6673 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6674 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6675 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6676 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6677 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6678 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6679 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6680 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6681 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6682 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6683 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6684 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6685 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6686 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6687 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6688 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6689 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6690 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6691 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6692 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6693 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6694 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6695 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6696 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6697 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6698 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6699 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6700 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6701 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6702 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6703 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6704 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006705 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6706 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6707 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6708 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6709 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006710 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6711 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6712 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6713 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6714 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6715 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6716 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6717 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6718 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6719 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6720 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6721 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6722 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6723 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6724 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6725 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6726 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6727 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6728 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6729 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6730 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6731 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6732 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6733 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6734 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6735 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6736 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6737 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6738 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6739 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6740 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6741 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6742 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6743 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6744 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6745 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6746 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6747 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6748 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6749 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6750 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6751 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6752 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6753 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6754 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6755 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6756 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6757 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6758 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6759 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6760 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6761 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6762 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6763 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6764 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6765 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6766 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6767 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6768 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006769 .also_non_np = 1,
6770 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006771 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006772 }, { /* Generated with Crypto++ */
6773 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6774 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6775 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6776 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6777 .klen = 32,
6778 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6779 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6780 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6781 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6782 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6783 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6784 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6785 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6786 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6787 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6788 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6789 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6790 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6791 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6792 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6793 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6794 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6795 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6796 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6797 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6798 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6799 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6800 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6801 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6802 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6803 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6804 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6805 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6806 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6807 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6808 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6809 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6810 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6811 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6812 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6813 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6814 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6815 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6816 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6817 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6818 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6819 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6820 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6821 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6822 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6823 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6824 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6825 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6826 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6827 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6828 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6829 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6830 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6831 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6832 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6833 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6834 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6835 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6836 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6837 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6838 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6839 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6840 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6841 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6842 .ilen = 504,
6843 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6844 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6845 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6846 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6847 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6848 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6849 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6850 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6851 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6852 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6853 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6854 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6855 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6856 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6857 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6858 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6859 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6860 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6861 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6862 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6863 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6864 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6865 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6866 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6867 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6868 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6869 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6870 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6871 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6872 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6873 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6874 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6875 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6876 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6877 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6878 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6879 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6880 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6881 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6882 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6883 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6884 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6885 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6886 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6887 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6888 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6889 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6890 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6891 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6892 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6893 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6894 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6895 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6896 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6897 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6898 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6899 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6900 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6901 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6902 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6903 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6904 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6905 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6906 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08006907 },
6908};
6909
6910/*
6911 * Twofish test vectors.
6912 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03006913#define TF_ENC_TEST_VECTORS 4
6914#define TF_DEC_TEST_VECTORS 4
6915#define TF_CBC_ENC_TEST_VECTORS 5
6916#define TF_CBC_DEC_TEST_VECTORS 5
6917#define TF_CTR_ENC_TEST_VECTORS 2
6918#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03006919#define TF_LRW_ENC_TEST_VECTORS 8
6920#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03006921#define TF_XTS_ENC_TEST_VECTORS 5
6922#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08006923
6924static struct cipher_testvec tf_enc_tv_template[] = {
6925 {
6926 .key = zeroed_string,
6927 .klen = 16,
6928 .input = zeroed_string,
6929 .ilen = 16,
6930 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6931 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6932 .rlen = 16,
6933 }, {
6934 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6935 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6936 "\x00\x11\x22\x33\x44\x55\x66\x77",
6937 .klen = 24,
6938 .input = zeroed_string,
6939 .ilen = 16,
6940 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
6941 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
6942 .rlen = 16,
6943 }, {
6944 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6945 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6946 "\x00\x11\x22\x33\x44\x55\x66\x77"
6947 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6948 .klen = 32,
6949 .input = zeroed_string,
6950 .ilen = 16,
6951 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
6952 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
6953 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006954 }, { /* Generated with Crypto++ */
6955 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
6956 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
6957 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
6958 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
6959 .klen = 32,
6960 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6961 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6962 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6963 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6964 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6965 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6966 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006967 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6968 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6969 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6970 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6971 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6972 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6973 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6974 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6975 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6976 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6977 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6978 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6979 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6980 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6981 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6982 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6983 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6984 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6985 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6986 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6987 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6988 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6989 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6990 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6991 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6992 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6993 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6994 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6995 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6996 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6997 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6998 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6999 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7000 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7001 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7002 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7003 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7004 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7005 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7006 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7007 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7008 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7009 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7010 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7011 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7012 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7013 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7014 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7015 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7016 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7017 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7018 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7019 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7020 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7021 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7022 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007023 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7024 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7025 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7026 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7027 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7028 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7029 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007030 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7031 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7032 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7033 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7034 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7035 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7036 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7037 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7038 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7039 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7040 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7041 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7042 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7043 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7044 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7045 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7046 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7047 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7048 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7049 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7050 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7051 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7052 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7053 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7054 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7055 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7056 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7057 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7058 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7059 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7060 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7061 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7062 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7063 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7064 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7065 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7066 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7067 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7068 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7069 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7070 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7071 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7072 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7073 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7074 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7075 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7076 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7077 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7078 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7079 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7080 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7081 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7082 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7083 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7084 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7085 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007086 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007087 .np = 3,
7088 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007089 },
7090};
7091
7092static struct cipher_testvec tf_dec_tv_template[] = {
7093 {
7094 .key = zeroed_string,
7095 .klen = 16,
7096 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7097 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7098 .ilen = 16,
7099 .result = zeroed_string,
7100 .rlen = 16,
7101 }, {
7102 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7103 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7104 "\x00\x11\x22\x33\x44\x55\x66\x77",
7105 .klen = 24,
7106 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7107 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7108 .ilen = 16,
7109 .result = zeroed_string,
7110 .rlen = 16,
7111 }, {
7112 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7113 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7114 "\x00\x11\x22\x33\x44\x55\x66\x77"
7115 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7116 .klen = 32,
7117 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7118 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7119 .ilen = 16,
7120 .result = zeroed_string,
7121 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007122 }, { /* Generated with Crypto++ */
7123 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7124 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7125 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7126 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7127 .klen = 32,
7128 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7129 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7130 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7131 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7132 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7133 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7134 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007135 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7136 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7137 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7138 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7139 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7140 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7141 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7142 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7143 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7144 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7145 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7146 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7147 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7148 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7149 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7150 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7151 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7152 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7153 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7154 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7155 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7156 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7157 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7158 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7159 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7160 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7161 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7162 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7163 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7164 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7165 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7166 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7167 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7168 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7169 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7170 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7171 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7172 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7173 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7174 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7175 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7176 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7177 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7178 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7179 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7180 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7181 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7182 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7183 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7184 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7185 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7186 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7187 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7188 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7189 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7190 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007191 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7192 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7193 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7194 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7195 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7196 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7197 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007198 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7199 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7200 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7201 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7202 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7203 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7204 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7205 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7206 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7207 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7208 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7209 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7210 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7211 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7212 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7213 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7214 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7215 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7216 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7217 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7218 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7219 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7220 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7221 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7222 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7223 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7224 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7225 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7226 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7227 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7228 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7229 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7230 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7231 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7232 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7233 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7234 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7235 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7236 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7237 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7238 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7239 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7240 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7241 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7242 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7243 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7244 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7245 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7246 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7247 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7248 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7249 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7250 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7251 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7252 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7253 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007254 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007255 .np = 3,
7256 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007257 },
7258};
7259
7260static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7261 { /* Generated with Nettle */
7262 .key = zeroed_string,
7263 .klen = 16,
7264 .iv = zeroed_string,
7265 .input = zeroed_string,
7266 .ilen = 16,
7267 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7268 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7269 .rlen = 16,
7270 }, {
7271 .key = zeroed_string,
7272 .klen = 16,
7273 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7274 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7275 .input = zeroed_string,
7276 .ilen = 16,
7277 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7278 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7279 .rlen = 16,
7280 }, {
7281 .key = zeroed_string,
7282 .klen = 16,
7283 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7284 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7285 .input = zeroed_string,
7286 .ilen = 16,
7287 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7288 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7289 .rlen = 16,
7290 }, {
7291 .key = zeroed_string,
7292 .klen = 16,
7293 .iv = zeroed_string,
7294 .input = zeroed_string,
7295 .ilen = 48,
7296 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7297 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7298 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7299 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7300 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7301 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7302 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007303 }, { /* Generated with Crypto++ */
7304 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7305 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7306 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7307 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7308 .klen = 32,
7309 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7310 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7311 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7312 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7313 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7314 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7315 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7316 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7317 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007318 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7319 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7320 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7321 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7322 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7323 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7324 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7325 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7326 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7327 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7328 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7329 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7330 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7331 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7332 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7333 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7334 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7335 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7336 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7337 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7338 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7339 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7340 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7341 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7342 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7343 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7344 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7345 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7346 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7347 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7348 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7349 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7350 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7351 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7352 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7353 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7354 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7355 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7356 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7357 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7358 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7359 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7360 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7361 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7362 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7363 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7364 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7365 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7366 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7367 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7368 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7369 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7370 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7371 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7372 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7373 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007374 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7375 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7376 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7377 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7378 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7379 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7380 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007381 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7382 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7383 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7384 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7385 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7386 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7387 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7388 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7389 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7390 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7391 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7392 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7393 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7394 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7395 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7396 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7397 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7398 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7399 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7400 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7401 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7402 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7403 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7404 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7405 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7406 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7407 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7408 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7409 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7410 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7411 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7412 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7413 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7414 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7415 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7416 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7417 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7418 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7419 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7420 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7421 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7422 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7423 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7424 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7425 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7426 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7427 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7428 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7429 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7430 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7431 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7432 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7433 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7434 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7435 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7436 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007437 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007438 .np = 3,
7439 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007440 },
7441};
7442
7443static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7444 { /* Reverse of the first four above */
7445 .key = zeroed_string,
7446 .klen = 16,
7447 .iv = zeroed_string,
7448 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7449 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7450 .ilen = 16,
7451 .result = zeroed_string,
7452 .rlen = 16,
7453 }, {
7454 .key = zeroed_string,
7455 .klen = 16,
7456 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7457 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7458 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7459 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7460 .ilen = 16,
7461 .result = zeroed_string,
7462 .rlen = 16,
7463 }, {
7464 .key = zeroed_string,
7465 .klen = 16,
7466 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7467 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7468 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7469 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7470 .ilen = 16,
7471 .result = zeroed_string,
7472 .rlen = 16,
7473 }, {
7474 .key = zeroed_string,
7475 .klen = 16,
7476 .iv = zeroed_string,
7477 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7478 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7479 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7480 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7481 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7482 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7483 .ilen = 48,
7484 .result = zeroed_string,
7485 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007486 }, { /* Generated with Crypto++ */
7487 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7488 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7489 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7490 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7491 .klen = 32,
7492 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7493 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7494 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7495 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7496 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7497 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7498 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7499 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7500 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007501 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7502 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7503 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7504 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7505 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7506 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7507 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7508 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7509 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7510 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7511 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7512 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7513 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7514 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7515 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7516 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7517 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7518 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7519 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7520 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7521 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7522 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7523 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7524 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7525 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7526 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7527 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7528 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7529 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7530 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7531 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7532 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7533 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7534 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7535 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7536 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7537 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7538 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7539 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7540 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7541 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7542 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7543 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7544 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7545 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7546 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7547 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7548 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7549 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7550 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7551 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7552 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7553 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7554 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7555 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7556 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007557 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7558 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7559 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7560 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7561 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7562 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7563 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007564 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7565 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7566 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7567 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7568 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7569 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7570 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7571 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7572 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7573 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7574 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7575 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7576 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7577 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7578 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7579 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7580 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7581 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7582 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7583 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7584 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7585 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7586 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7587 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7588 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7589 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7590 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7591 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7592 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7593 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7594 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7595 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7596 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7597 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7598 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7599 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7600 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7601 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7602 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7603 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7604 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7605 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7606 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7607 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7608 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7609 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7610 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7611 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7612 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7613 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7614 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7615 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7616 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7617 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7618 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7619 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007620 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007621 .np = 3,
7622 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007623 },
7624};
7625
7626static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7627 { /* Generated with Crypto++ */
7628 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7629 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7630 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7631 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7632 .klen = 32,
7633 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7634 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7635 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7636 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7637 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7638 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7639 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7640 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7641 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007642 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7643 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7644 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7645 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7646 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7647 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7648 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7649 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7650 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7651 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7652 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7653 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7654 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7655 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7656 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7657 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7658 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7659 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7660 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7661 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7662 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7663 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7664 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7665 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7666 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7667 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7668 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7669 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7670 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7671 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7672 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7673 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7674 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7675 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7676 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7677 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7678 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7679 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7680 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7681 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7682 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7683 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7684 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7685 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7686 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7687 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7688 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7689 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7690 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7691 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7692 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7693 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7694 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7695 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7696 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7697 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007698 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7699 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7700 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7701 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7702 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7703 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7704 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007705 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7706 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7707 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7708 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7709 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7710 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7711 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7712 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7713 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7714 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7715 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7716 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7717 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7718 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7719 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7720 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7721 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7722 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7723 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7724 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7725 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7726 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7727 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7728 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7729 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7730 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7731 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7732 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7733 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7734 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7735 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7736 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7737 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7738 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7739 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7740 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7741 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7742 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7743 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7744 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7745 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7746 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7747 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7748 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7749 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7750 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7751 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7752 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7753 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7754 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7755 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7756 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7757 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7758 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7759 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7760 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007761 }, { /* Generated with Crypto++ */
7762 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7763 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7764 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7765 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7766 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007767 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7768 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7769 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7770 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7771 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7772 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7773 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7774 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7775 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7776 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7777 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7778 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7779 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7780 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7781 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7782 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7783 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7784 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7785 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7786 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7787 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7788 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7789 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7790 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7791 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7792 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7793 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7794 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7795 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7796 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7797 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7798 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7799 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7800 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7801 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7802 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7803 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7804 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7805 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7806 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7807 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7808 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7809 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7810 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7811 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7812 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7813 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7814 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7815 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7816 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7817 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7818 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7819 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7820 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7821 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7822 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7823 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7824 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7825 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7826 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7827 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7828 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7829 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7830 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7831 .ilen = 496,
7832 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
7833 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
7834 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
7835 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
7836 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
7837 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
7838 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
7839 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
7840 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
7841 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
7842 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
7843 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
7844 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
7845 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
7846 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
7847 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
7848 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
7849 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
7850 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
7851 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
7852 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
7853 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
7854 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
7855 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
7856 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
7857 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
7858 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
7859 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
7860 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
7861 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
7862 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
7863 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
7864 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
7865 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
7866 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
7867 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
7868 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
7869 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
7870 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
7871 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
7872 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
7873 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
7874 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
7875 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
7876 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
7877 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
7878 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
7879 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
7880 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
7881 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
7882 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
7883 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
7884 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
7885 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
7886 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
7887 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
7888 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
7889 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
7890 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
7891 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
7892 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
7893 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
7894 .rlen = 496,
7895 }, { /* Generated with Crypto++ */
7896 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7897 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7898 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7899 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7900 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007901 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7902 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7903 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7904 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7905 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7906 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7907 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7908 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7909 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7910 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007911 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7912 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7913 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7914 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7915 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7916 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7917 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7918 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7919 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7920 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7921 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7922 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7923 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7924 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7925 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7926 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7927 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7928 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7929 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7930 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7931 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7932 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7933 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7934 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7935 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7936 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7937 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7938 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7939 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7940 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7941 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7942 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7943 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7944 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7945 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7946 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7947 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7948 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7949 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7950 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7951 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7952 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7953 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7954 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7955 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7956 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7957 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7958 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7959 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7960 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7961 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7962 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7963 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7964 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7965 "\x2B\xC2\x59",
7966 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007967 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7968 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7969 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7970 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7971 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7972 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7973 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7974 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007975 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7976 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7977 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7978 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7979 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7980 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7981 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7982 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7983 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7984 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7985 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7986 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7987 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7988 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7989 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7990 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7991 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7992 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7993 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7994 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7995 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7996 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7997 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7998 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7999 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8000 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8001 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8002 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8003 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8004 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8005 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8006 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8007 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8008 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8009 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8010 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8011 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8012 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8013 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8014 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8015 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8016 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8017 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8018 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8019 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8020 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8021 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8022 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8023 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8024 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8025 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8026 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8027 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8028 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8029 "\x6C\x82\x9D",
8030 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008031 .also_non_np = 1,
8032 .np = 2,
8033 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008034 },
8035};
8036
8037static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8038 { /* Generated with Crypto++ */
8039 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8040 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8041 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8042 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8043 .klen = 32,
8044 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8045 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8046 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8047 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8048 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8049 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8050 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8051 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8052 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008053 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8054 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8055 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8056 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8057 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8058 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8059 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8060 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8061 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8062 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8063 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8064 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8065 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8066 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8067 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8068 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8069 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8070 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8071 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8072 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8073 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8074 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8075 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8076 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8077 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8078 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8079 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8080 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8081 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8082 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8083 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8084 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8085 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8086 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8087 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8088 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8089 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8090 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8091 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8092 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8093 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8094 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8095 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8096 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8097 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8098 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8099 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8100 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8101 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8102 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8103 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8104 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8105 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8106 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8107 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8108 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008109 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8110 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8111 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8112 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8113 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8114 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8115 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008116 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8117 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8118 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8119 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8120 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8121 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8122 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8123 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8124 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8125 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8126 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8127 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8128 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8129 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8130 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8131 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8132 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8133 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8134 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8135 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8136 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8137 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8138 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8139 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8140 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8141 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8142 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8143 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8144 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8145 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8146 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8147 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8148 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8149 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8150 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8151 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8152 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8153 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8154 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8155 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8156 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8157 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8158 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8159 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8160 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8161 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8162 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8163 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8164 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8165 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8166 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8167 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8168 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8169 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8170 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8171 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008172 }, { /* Generated with Crypto++ */
8173 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8174 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8175 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8176 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8177 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008178 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8179 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8180 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8181 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8182 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8183 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8184 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8185 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8186 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8187 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8188 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8189 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8190 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8191 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8192 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8193 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8194 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8195 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8196 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8197 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8198 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8199 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8200 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8201 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8202 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8203 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8204 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8205 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8206 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8207 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8208 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8209 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8210 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8211 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8212 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8213 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8214 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8215 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8216 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8217 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8218 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8219 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8220 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8221 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8222 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8223 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8224 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8225 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8226 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8227 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8228 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8229 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8230 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8231 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8232 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8233 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8234 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8235 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8236 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8237 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8238 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8239 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8240 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8241 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8242 .ilen = 496,
8243 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8244 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8245 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8246 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8247 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8248 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8249 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8250 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8251 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8252 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8253 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8254 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8255 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8256 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8257 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8258 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8259 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8260 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8261 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8262 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8263 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8264 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8265 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8266 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8267 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8268 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8269 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8270 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8271 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8272 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8273 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8274 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8275 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8276 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8277 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8278 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8279 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8280 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8281 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8282 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8283 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8284 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8285 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8286 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8287 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8288 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8289 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8290 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8291 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8292 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8293 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8294 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8295 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8296 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8297 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8298 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8299 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8300 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8301 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8302 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8303 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8304 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8305 .rlen = 496,
8306 }, { /* Generated with Crypto++ */
8307 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8308 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8309 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8310 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8311 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008312 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8313 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8314 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8315 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8316 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8317 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8318 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8319 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8320 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8321 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008322 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8323 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8324 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8325 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8326 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8327 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8328 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8329 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8330 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8331 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8332 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8333 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8334 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8335 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8336 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8337 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8338 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8339 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8340 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8341 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8342 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8343 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8344 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8345 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8346 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8347 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8348 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8349 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8350 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8351 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8352 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8353 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8354 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8355 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8356 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8357 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8358 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8359 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8360 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8361 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8362 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8363 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8364 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8365 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8366 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8367 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8368 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8369 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8370 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8371 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8372 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8373 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8374 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8375 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8376 "\x6C\x82\x9D",
8377 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008378 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8379 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8380 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8381 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8382 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8383 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8384 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8385 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008386 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8387 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8388 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8389 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8390 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8391 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8392 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8393 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8394 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8395 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8396 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8397 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8398 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8399 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8400 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8401 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8402 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8403 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8404 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8405 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8406 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8407 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8408 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8409 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8410 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8411 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8412 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8413 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8414 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8415 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8416 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8417 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8418 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8419 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8420 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8421 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8422 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8423 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8424 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8425 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8426 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8427 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8428 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8429 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8430 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8431 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8432 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8433 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8434 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8435 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8436 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8437 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8438 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8439 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8440 "\x2B\xC2\x59",
8441 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008442 .also_non_np = 1,
8443 .np = 2,
8444 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008445 },
8446};
8447
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008448static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8449 /* Generated from AES-LRW test vectors */
8450 {
8451 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8452 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8453 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8454 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8455 .klen = 32,
8456 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8457 "\x00\x00\x00\x00\x00\x00\x00\x01",
8458 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8459 "\x38\x39\x41\x42\x43\x44\x45\x46",
8460 .ilen = 16,
8461 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8462 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8463 .rlen = 16,
8464 }, {
8465 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8466 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8467 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8468 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8469 .klen = 32,
8470 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8471 "\x00\x00\x00\x00\x00\x00\x00\x02",
8472 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8473 "\x38\x39\x41\x42\x43\x44\x45\x46",
8474 .ilen = 16,
8475 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8476 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8477 .rlen = 16,
8478 }, {
8479 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8480 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8481 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8482 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8483 .klen = 32,
8484 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8485 "\x00\x00\x00\x02\x00\x00\x00\x00",
8486 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8487 "\x38\x39\x41\x42\x43\x44\x45\x46",
8488 .ilen = 16,
8489 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8490 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8491 .rlen = 16,
8492 }, {
8493 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8494 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8495 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8496 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8497 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8498 .klen = 40,
8499 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8500 "\x00\x00\x00\x00\x00\x00\x00\x01",
8501 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8502 "\x38\x39\x41\x42\x43\x44\x45\x46",
8503 .ilen = 16,
8504 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8505 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8506 .rlen = 16,
8507 }, {
8508 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8509 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8510 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8511 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8512 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8513 .klen = 40,
8514 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8515 "\x00\x00\x00\x02\x00\x00\x00\x00",
8516 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8517 "\x38\x39\x41\x42\x43\x44\x45\x46",
8518 .ilen = 16,
8519 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8520 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8521 .rlen = 16,
8522 }, {
8523 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8524 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8525 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8526 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8527 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8528 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8529 .klen = 48,
8530 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8531 "\x00\x00\x00\x00\x00\x00\x00\x01",
8532 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8533 "\x38\x39\x41\x42\x43\x44\x45\x46",
8534 .ilen = 16,
8535 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8536 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8537 .rlen = 16,
8538 }, {
8539 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8540 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8541 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8542 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8543 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8544 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8545 .klen = 48,
8546 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8547 "\x00\x00\x00\x02\x00\x00\x00\x00",
8548 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8549 "\x38\x39\x41\x42\x43\x44\x45\x46",
8550 .ilen = 16,
8551 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8552 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8553 .rlen = 16,
8554 }, {
8555 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8556 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8557 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8558 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8559 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8560 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8561 .klen = 48,
8562 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8563 "\x00\x00\x00\x00\x00\x00\x00\x01",
8564 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8565 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8566 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8567 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8568 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8569 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8570 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8571 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8572 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8573 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8574 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8575 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8576 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8577 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8578 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8579 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8580 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8581 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8582 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8583 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8584 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8585 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8586 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8587 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8588 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8589 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8590 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8591 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8592 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8593 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8594 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8595 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8596 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8597 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8598 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8599 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8600 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8601 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8602 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8603 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8604 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8605 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8606 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8607 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8608 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8609 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8610 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8611 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8612 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8613 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8614 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8615 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8616 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8617 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8618 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8619 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8620 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8621 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8622 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8623 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8624 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8625 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8626 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8627 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8628 .ilen = 512,
8629 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8630 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8631 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8632 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8633 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8634 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8635 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8636 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8637 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8638 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8639 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8640 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8641 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8642 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8643 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8644 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8645 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8646 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8647 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8648 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8649 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8650 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8651 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8652 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8653 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8654 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8655 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8656 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8657 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8658 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8659 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8660 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8661 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8662 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8663 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8664 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8665 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8666 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8667 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8668 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8669 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8670 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8671 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8672 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8673 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8674 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8675 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8676 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8677 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8678 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8679 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8680 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8681 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8682 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8683 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8684 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8685 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8686 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8687 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8688 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8689 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8690 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8691 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8692 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8693 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008694 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008695 .np = 3,
8696 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008697 },
8698};
8699
8700static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8701 /* Generated from AES-LRW test vectors */
8702 /* same as enc vectors with input and result reversed */
8703 {
8704 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8705 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8706 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8707 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8708 .klen = 32,
8709 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8710 "\x00\x00\x00\x00\x00\x00\x00\x01",
8711 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8712 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8713 .ilen = 16,
8714 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8715 "\x38\x39\x41\x42\x43\x44\x45\x46",
8716 .rlen = 16,
8717 }, {
8718 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8719 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8720 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8721 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8722 .klen = 32,
8723 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8724 "\x00\x00\x00\x00\x00\x00\x00\x02",
8725 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8726 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8727 .ilen = 16,
8728 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8729 "\x38\x39\x41\x42\x43\x44\x45\x46",
8730 .rlen = 16,
8731 }, {
8732 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8733 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8734 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8735 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8736 .klen = 32,
8737 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8738 "\x00\x00\x00\x02\x00\x00\x00\x00",
8739 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8740 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8741 .ilen = 16,
8742 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8743 "\x38\x39\x41\x42\x43\x44\x45\x46",
8744 .rlen = 16,
8745 }, {
8746 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8747 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8748 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8749 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8750 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8751 .klen = 40,
8752 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8753 "\x00\x00\x00\x00\x00\x00\x00\x01",
8754 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8755 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8756 .ilen = 16,
8757 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8758 "\x38\x39\x41\x42\x43\x44\x45\x46",
8759 .rlen = 16,
8760 }, {
8761 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8762 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8763 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8764 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8765 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8766 .klen = 40,
8767 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8768 "\x00\x00\x00\x02\x00\x00\x00\x00",
8769 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8770 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8771 .ilen = 16,
8772 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8773 "\x38\x39\x41\x42\x43\x44\x45\x46",
8774 .rlen = 16,
8775 }, {
8776 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8777 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8778 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8779 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8780 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8781 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8782 .klen = 48,
8783 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8784 "\x00\x00\x00\x00\x00\x00\x00\x01",
8785 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8786 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8787 .ilen = 16,
8788 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8789 "\x38\x39\x41\x42\x43\x44\x45\x46",
8790 .rlen = 16,
8791 }, {
8792 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8793 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8794 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8795 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8796 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8797 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8798 .klen = 48,
8799 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8800 "\x00\x00\x00\x02\x00\x00\x00\x00",
8801 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8802 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8803 .ilen = 16,
8804 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8805 "\x38\x39\x41\x42\x43\x44\x45\x46",
8806 .rlen = 16,
8807 }, {
8808 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8809 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8810 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8811 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8812 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8813 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8814 .klen = 48,
8815 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8816 "\x00\x00\x00\x00\x00\x00\x00\x01",
8817 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8818 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8819 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8820 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8821 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8822 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8823 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8824 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8825 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8826 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8827 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8828 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8829 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8830 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8831 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8832 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8833 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8834 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8835 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8836 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8837 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8838 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8839 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8840 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8841 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8842 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8843 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8844 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8845 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8846 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8847 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8848 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8849 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8850 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8851 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8852 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8853 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8854 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8855 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8856 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8857 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8858 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8859 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8860 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8861 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8862 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8863 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8864 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8865 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8866 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8867 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8868 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8869 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8870 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8871 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8872 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8873 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8874 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8875 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8876 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8877 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8878 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8879 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8880 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8881 .ilen = 512,
8882 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8883 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8884 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8885 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8886 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8887 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8888 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8889 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8890 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8891 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8892 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8893 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8894 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8895 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8896 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8897 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8898 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8899 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8900 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8901 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8902 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8903 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8904 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8905 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8906 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8907 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8908 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8909 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8910 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8911 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8912 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8913 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8914 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8915 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8916 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8917 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8918 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8919 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8920 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8921 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8922 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8923 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8924 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8925 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8926 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8927 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8928 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8929 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8930 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8931 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8932 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8933 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8934 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8935 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8936 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8937 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8938 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8939 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8940 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8941 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8942 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8943 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8944 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8945 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8946 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008947 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008948 .np = 3,
8949 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008950 },
8951};
8952
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008953static struct cipher_testvec tf_xts_enc_tv_template[] = {
8954 /* Generated from AES-XTS test vectors */
8955{
8956 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8957 "\x00\x00\x00\x00\x00\x00\x00\x00"
8958 "\x00\x00\x00\x00\x00\x00\x00\x00"
8959 "\x00\x00\x00\x00\x00\x00\x00\x00",
8960 .klen = 32,
8961 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8962 "\x00\x00\x00\x00\x00\x00\x00\x00",
8963 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8964 "\x00\x00\x00\x00\x00\x00\x00\x00"
8965 "\x00\x00\x00\x00\x00\x00\x00\x00"
8966 "\x00\x00\x00\x00\x00\x00\x00\x00",
8967 .ilen = 32,
8968 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
8969 "\x30\x74\xe4\x44\x52\x77\x97\x43"
8970 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
8971 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
8972 .rlen = 32,
8973 }, {
8974 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8975 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
8987 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
8988 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
8989 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
8990 .rlen = 32,
8991 }, {
8992 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8993 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8994 "\x22\x22\x22\x22\x22\x22\x22\x22"
8995 "\x22\x22\x22\x22\x22\x22\x22\x22",
8996 .klen = 32,
8997 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8998 "\x00\x00\x00\x00\x00\x00\x00\x00",
8999 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
9000 "\x44\x44\x44\x44\x44\x44\x44\x44"
9001 "\x44\x44\x44\x44\x44\x44\x44\x44"
9002 "\x44\x44\x44\x44\x44\x44\x44\x44",
9003 .ilen = 32,
9004 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9005 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9006 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9007 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9008 .rlen = 32,
9009 }, {
9010 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9011 "\x23\x53\x60\x28\x74\x71\x35\x26"
9012 "\x31\x41\x59\x26\x53\x58\x97\x93"
9013 "\x23\x84\x62\x64\x33\x83\x27\x95",
9014 .klen = 32,
9015 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9016 "\x00\x00\x00\x00\x00\x00\x00\x00",
9017 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9018 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9019 "\x10\x11\x12\x13\x14\x15\x16\x17"
9020 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9021 "\x20\x21\x22\x23\x24\x25\x26\x27"
9022 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9023 "\x30\x31\x32\x33\x34\x35\x36\x37"
9024 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9025 "\x40\x41\x42\x43\x44\x45\x46\x47"
9026 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9027 "\x50\x51\x52\x53\x54\x55\x56\x57"
9028 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9029 "\x60\x61\x62\x63\x64\x65\x66\x67"
9030 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9031 "\x70\x71\x72\x73\x74\x75\x76\x77"
9032 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9033 "\x80\x81\x82\x83\x84\x85\x86\x87"
9034 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9035 "\x90\x91\x92\x93\x94\x95\x96\x97"
9036 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9037 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9038 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9039 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9040 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9041 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9042 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9043 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9044 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9045 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9046 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9047 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9048 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9049 "\x00\x01\x02\x03\x04\x05\x06\x07"
9050 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9051 "\x10\x11\x12\x13\x14\x15\x16\x17"
9052 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9053 "\x20\x21\x22\x23\x24\x25\x26\x27"
9054 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9055 "\x30\x31\x32\x33\x34\x35\x36\x37"
9056 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9057 "\x40\x41\x42\x43\x44\x45\x46\x47"
9058 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9059 "\x50\x51\x52\x53\x54\x55\x56\x57"
9060 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9061 "\x60\x61\x62\x63\x64\x65\x66\x67"
9062 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9063 "\x70\x71\x72\x73\x74\x75\x76\x77"
9064 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9065 "\x80\x81\x82\x83\x84\x85\x86\x87"
9066 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9067 "\x90\x91\x92\x93\x94\x95\x96\x97"
9068 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9069 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9070 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9071 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9072 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9073 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9074 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9075 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9076 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9077 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9078 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9079 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9080 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9081 .ilen = 512,
9082 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9083 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9084 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9085 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9086 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9087 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9088 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9089 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9090 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9091 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9092 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9093 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9094 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9095 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9096 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9097 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9098 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9099 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9100 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9101 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9102 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9103 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9104 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9105 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9106 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9107 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9108 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9109 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9110 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9111 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9112 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9113 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9114 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9115 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9116 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9117 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9118 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9119 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9120 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9121 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9122 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9123 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9124 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9125 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9126 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9127 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9128 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9129 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9130 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9131 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9132 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9133 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9134 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9135 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9136 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9137 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9138 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9139 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9140 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9141 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9142 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9143 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9144 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9145 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9146 .rlen = 512,
9147 }, {
9148 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9149 "\x23\x53\x60\x28\x74\x71\x35\x26"
9150 "\x62\x49\x77\x57\x24\x70\x93\x69"
9151 "\x99\x59\x57\x49\x66\x96\x76\x27"
9152 "\x31\x41\x59\x26\x53\x58\x97\x93"
9153 "\x23\x84\x62\x64\x33\x83\x27\x95"
9154 "\x02\x88\x41\x97\x16\x93\x99\x37"
9155 "\x51\x05\x82\x09\x74\x94\x45\x92",
9156 .klen = 64,
9157 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9158 "\x00\x00\x00\x00\x00\x00\x00\x00",
9159 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9160 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9161 "\x10\x11\x12\x13\x14\x15\x16\x17"
9162 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9163 "\x20\x21\x22\x23\x24\x25\x26\x27"
9164 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9165 "\x30\x31\x32\x33\x34\x35\x36\x37"
9166 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9167 "\x40\x41\x42\x43\x44\x45\x46\x47"
9168 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9169 "\x50\x51\x52\x53\x54\x55\x56\x57"
9170 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9171 "\x60\x61\x62\x63\x64\x65\x66\x67"
9172 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9173 "\x70\x71\x72\x73\x74\x75\x76\x77"
9174 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9175 "\x80\x81\x82\x83\x84\x85\x86\x87"
9176 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9177 "\x90\x91\x92\x93\x94\x95\x96\x97"
9178 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9179 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9180 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9181 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9182 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9183 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9184 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9185 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9186 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9187 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9188 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9189 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9190 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9191 "\x00\x01\x02\x03\x04\x05\x06\x07"
9192 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9193 "\x10\x11\x12\x13\x14\x15\x16\x17"
9194 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9195 "\x20\x21\x22\x23\x24\x25\x26\x27"
9196 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9197 "\x30\x31\x32\x33\x34\x35\x36\x37"
9198 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9199 "\x40\x41\x42\x43\x44\x45\x46\x47"
9200 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9201 "\x50\x51\x52\x53\x54\x55\x56\x57"
9202 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9203 "\x60\x61\x62\x63\x64\x65\x66\x67"
9204 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9205 "\x70\x71\x72\x73\x74\x75\x76\x77"
9206 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9207 "\x80\x81\x82\x83\x84\x85\x86\x87"
9208 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9209 "\x90\x91\x92\x93\x94\x95\x96\x97"
9210 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9211 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9212 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9213 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9214 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9215 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9216 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9217 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9218 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9219 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9220 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9221 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9222 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9223 .ilen = 512,
9224 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9225 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9226 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9227 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9228 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9229 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9230 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9231 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9232 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9233 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9234 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9235 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9236 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9237 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9238 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9239 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9240 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9241 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9242 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9243 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9244 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9245 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9246 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9247 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9248 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9249 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9250 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9251 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9252 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9253 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9254 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9255 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9256 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9257 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9258 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9259 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9260 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9261 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9262 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9263 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9264 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9265 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9266 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9267 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9268 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9269 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9270 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9271 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9272 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9273 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9274 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9275 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9276 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9277 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9278 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9279 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9280 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9281 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9282 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9283 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9284 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9285 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9286 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9287 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9288 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009289 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009290 .np = 3,
9291 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009292 },
9293};
9294
9295static struct cipher_testvec tf_xts_dec_tv_template[] = {
9296 /* Generated from AES-XTS test vectors */
9297 /* same as enc vectors with input and result reversed */
9298 {
9299 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9300 "\x00\x00\x00\x00\x00\x00\x00\x00"
9301 "\x00\x00\x00\x00\x00\x00\x00\x00"
9302 "\x00\x00\x00\x00\x00\x00\x00\x00",
9303 .klen = 32,
9304 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9305 "\x00\x00\x00\x00\x00\x00\x00\x00",
9306 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9307 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9308 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9309 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9310 .ilen = 32,
9311 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9312 "\x00\x00\x00\x00\x00\x00\x00\x00"
9313 "\x00\x00\x00\x00\x00\x00\x00\x00"
9314 "\x00\x00\x00\x00\x00\x00\x00\x00",
9315 .rlen = 32,
9316 }, {
9317 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9318 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9325 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9326 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9327 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
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 = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9336 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9337 "\x22\x22\x22\x22\x22\x22\x22\x22"
9338 "\x22\x22\x22\x22\x22\x22\x22\x22",
9339 .klen = 32,
9340 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9341 "\x00\x00\x00\x00\x00\x00\x00\x00",
9342 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9343 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9344 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9345 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9346 .ilen = 32,
9347 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9348 "\x44\x44\x44\x44\x44\x44\x44\x44"
9349 "\x44\x44\x44\x44\x44\x44\x44\x44"
9350 "\x44\x44\x44\x44\x44\x44\x44\x44",
9351 .rlen = 32,
9352 }, {
9353 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9354 "\x23\x53\x60\x28\x74\x71\x35\x26"
9355 "\x31\x41\x59\x26\x53\x58\x97\x93"
9356 "\x23\x84\x62\x64\x33\x83\x27\x95",
9357 .klen = 32,
9358 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9359 "\x00\x00\x00\x00\x00\x00\x00\x00",
9360 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9361 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9362 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9363 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9364 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9365 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9366 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9367 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9368 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9369 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9370 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9371 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9372 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9373 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9374 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9375 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9376 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9377 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9378 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9379 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9380 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9381 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9382 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9383 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9384 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9385 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9386 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9387 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9388 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9389 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9390 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9391 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9392 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9393 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9394 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9395 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9396 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9397 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9398 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9399 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9400 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9401 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9402 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9403 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9404 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9405 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9406 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9407 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9408 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9409 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9410 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9411 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9412 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9413 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9414 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9415 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9416 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9417 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9418 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9419 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9420 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9421 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9422 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9423 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9424 .ilen = 512,
9425 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9426 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9427 "\x10\x11\x12\x13\x14\x15\x16\x17"
9428 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9429 "\x20\x21\x22\x23\x24\x25\x26\x27"
9430 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9431 "\x30\x31\x32\x33\x34\x35\x36\x37"
9432 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9433 "\x40\x41\x42\x43\x44\x45\x46\x47"
9434 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9435 "\x50\x51\x52\x53\x54\x55\x56\x57"
9436 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9437 "\x60\x61\x62\x63\x64\x65\x66\x67"
9438 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9439 "\x70\x71\x72\x73\x74\x75\x76\x77"
9440 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9441 "\x80\x81\x82\x83\x84\x85\x86\x87"
9442 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9443 "\x90\x91\x92\x93\x94\x95\x96\x97"
9444 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9445 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9446 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9447 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9448 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9449 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9450 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9451 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9452 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9453 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9454 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9455 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9456 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9457 "\x00\x01\x02\x03\x04\x05\x06\x07"
9458 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9459 "\x10\x11\x12\x13\x14\x15\x16\x17"
9460 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9461 "\x20\x21\x22\x23\x24\x25\x26\x27"
9462 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9463 "\x30\x31\x32\x33\x34\x35\x36\x37"
9464 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9465 "\x40\x41\x42\x43\x44\x45\x46\x47"
9466 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9467 "\x50\x51\x52\x53\x54\x55\x56\x57"
9468 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9469 "\x60\x61\x62\x63\x64\x65\x66\x67"
9470 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9471 "\x70\x71\x72\x73\x74\x75\x76\x77"
9472 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9473 "\x80\x81\x82\x83\x84\x85\x86\x87"
9474 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9475 "\x90\x91\x92\x93\x94\x95\x96\x97"
9476 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9477 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9478 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9479 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9480 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9481 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9482 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9483 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9484 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9485 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9486 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9487 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9488 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9489 .rlen = 512,
9490 }, {
9491 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9492 "\x23\x53\x60\x28\x74\x71\x35\x26"
9493 "\x62\x49\x77\x57\x24\x70\x93\x69"
9494 "\x99\x59\x57\x49\x66\x96\x76\x27"
9495 "\x31\x41\x59\x26\x53\x58\x97\x93"
9496 "\x23\x84\x62\x64\x33\x83\x27\x95"
9497 "\x02\x88\x41\x97\x16\x93\x99\x37"
9498 "\x51\x05\x82\x09\x74\x94\x45\x92",
9499 .klen = 64,
9500 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9501 "\x00\x00\x00\x00\x00\x00\x00\x00",
9502 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9503 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9504 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9505 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9506 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9507 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9508 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9509 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9510 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9511 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9512 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9513 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9514 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9515 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9516 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9517 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9518 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9519 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9520 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9521 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9522 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9523 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9524 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9525 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9526 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9527 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9528 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9529 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9530 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9531 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9532 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9533 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9534 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9535 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9536 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9537 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9538 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9539 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9540 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9541 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9542 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9543 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9544 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9545 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9546 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9547 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9548 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9549 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9550 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9551 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9552 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9553 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9554 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9555 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9556 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9557 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9558 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9559 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9560 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9561 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9562 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9563 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9564 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9565 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9566 .ilen = 512,
9567 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9568 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9569 "\x10\x11\x12\x13\x14\x15\x16\x17"
9570 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9571 "\x20\x21\x22\x23\x24\x25\x26\x27"
9572 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9573 "\x30\x31\x32\x33\x34\x35\x36\x37"
9574 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9575 "\x40\x41\x42\x43\x44\x45\x46\x47"
9576 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9577 "\x50\x51\x52\x53\x54\x55\x56\x57"
9578 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9579 "\x60\x61\x62\x63\x64\x65\x66\x67"
9580 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9581 "\x70\x71\x72\x73\x74\x75\x76\x77"
9582 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9583 "\x80\x81\x82\x83\x84\x85\x86\x87"
9584 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9585 "\x90\x91\x92\x93\x94\x95\x96\x97"
9586 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9587 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9588 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9589 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9590 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9591 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9592 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9593 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9594 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9595 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9596 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9597 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9598 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9599 "\x00\x01\x02\x03\x04\x05\x06\x07"
9600 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9601 "\x10\x11\x12\x13\x14\x15\x16\x17"
9602 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9603 "\x20\x21\x22\x23\x24\x25\x26\x27"
9604 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9605 "\x30\x31\x32\x33\x34\x35\x36\x37"
9606 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9607 "\x40\x41\x42\x43\x44\x45\x46\x47"
9608 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9609 "\x50\x51\x52\x53\x54\x55\x56\x57"
9610 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9611 "\x60\x61\x62\x63\x64\x65\x66\x67"
9612 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9613 "\x70\x71\x72\x73\x74\x75\x76\x77"
9614 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9615 "\x80\x81\x82\x83\x84\x85\x86\x87"
9616 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9617 "\x90\x91\x92\x93\x94\x95\x96\x97"
9618 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9619 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9620 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9621 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9622 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9623 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9624 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9625 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9626 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9627 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9628 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9629 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9630 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9631 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009632 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009633 .np = 3,
9634 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009635 },
9636};
9637
Herbert Xuda7f0332008-07-31 17:08:25 +08009638/*
9639 * Serpent test vectors. These are backwards because Serpent writes
9640 * octet sequences in right-to-left mode.
9641 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009642#define SERPENT_ENC_TEST_VECTORS 5
9643#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009644
9645#define TNEPRES_ENC_TEST_VECTORS 4
9646#define TNEPRES_DEC_TEST_VECTORS 4
9647
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009648#define SERPENT_CBC_ENC_TEST_VECTORS 1
9649#define SERPENT_CBC_DEC_TEST_VECTORS 1
9650
9651#define SERPENT_CTR_ENC_TEST_VECTORS 2
9652#define SERPENT_CTR_DEC_TEST_VECTORS 2
9653
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009654#define SERPENT_LRW_ENC_TEST_VECTORS 8
9655#define SERPENT_LRW_DEC_TEST_VECTORS 8
9656
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03009657#define SERPENT_XTS_ENC_TEST_VECTORS 5
9658#define SERPENT_XTS_DEC_TEST_VECTORS 5
9659
Herbert Xuda7f0332008-07-31 17:08:25 +08009660static struct cipher_testvec serpent_enc_tv_template[] = {
9661 {
9662 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9663 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9664 .ilen = 16,
9665 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9666 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9667 .rlen = 16,
9668 }, {
9669 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9670 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9671 .klen = 16,
9672 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9674 .ilen = 16,
9675 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9676 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9677 .rlen = 16,
9678 }, {
9679 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9680 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9681 "\x10\x11\x12\x13\x14\x15\x16\x17"
9682 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9683 .klen = 32,
9684 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9685 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9686 .ilen = 16,
9687 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9688 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9689 .rlen = 16,
9690 }, {
9691 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9692 .klen = 16,
9693 .input = zeroed_string,
9694 .ilen = 16,
9695 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9696 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9697 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009698 }, { /* Generated with Crypto++ */
9699 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9700 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9701 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9702 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9703 .klen = 32,
9704 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9705 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9706 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9707 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9708 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9709 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9710 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9711 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9712 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9713 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9714 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9715 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9716 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9717 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9718 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9719 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9720 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009721 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9722 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9723 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9724 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9725 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9726 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9727 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9728 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9729 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9730 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9731 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9732 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9733 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9734 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9735 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9736 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9737 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9738 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9739 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9740 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9741 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9742 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9743 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9744 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9745 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9746 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9747 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9748 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9749 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9750 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9751 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9752 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9753 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9754 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9755 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9756 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9757 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9758 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9759 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9760 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9761 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9762 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9763 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9764 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9765 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9766 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009767 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9768 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9769 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9770 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9771 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9772 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9773 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9774 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9775 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9776 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9777 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9778 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9779 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9780 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9781 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9782 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9783 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009784 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9785 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9786 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9787 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9788 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9789 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9790 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9791 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9792 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9793 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9794 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9795 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9796 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9797 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9798 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9799 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9800 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9801 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9802 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9803 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9804 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9805 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9806 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9807 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9808 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9809 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9810 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9811 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9812 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9813 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9814 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9815 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9816 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9817 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9818 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9819 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9820 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9821 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9822 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9823 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9824 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9825 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9826 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9827 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9828 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9829 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009830 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009831 .np = 3,
9832 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08009833 },
9834};
9835
9836static struct cipher_testvec tnepres_enc_tv_template[] = {
9837 { /* KeySize=128, PT=0, I=1 */
9838 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9839 "\x00\x00\x00\x00\x00\x00\x00\x00",
9840 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9841 "\x00\x00\x00\x00\x00\x00\x00\x00",
9842 .klen = 16,
9843 .ilen = 16,
9844 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
9845 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
9846 .rlen = 16,
9847 }, { /* KeySize=192, PT=0, I=1 */
9848 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9849 "\x00\x00\x00\x00\x00\x00\x00\x00"
9850 "\x00\x00\x00\x00\x00\x00\x00\x00",
9851 .klen = 24,
9852 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9853 "\x00\x00\x00\x00\x00\x00\x00\x00",
9854 .ilen = 16,
9855 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
9856 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
9857 .rlen = 16,
9858 }, { /* KeySize=256, PT=0, I=1 */
9859 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9860 "\x00\x00\x00\x00\x00\x00\x00\x00"
9861 "\x00\x00\x00\x00\x00\x00\x00\x00"
9862 "\x00\x00\x00\x00\x00\x00\x00\x00",
9863 .klen = 32,
9864 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9865 "\x00\x00\x00\x00\x00\x00\x00\x00",
9866 .ilen = 16,
9867 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
9868 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
9869 .rlen = 16,
9870 }, { /* KeySize=256, I=257 */
9871 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
9872 "\x17\x16\x15\x14\x13\x12\x11\x10"
9873 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9874 "\x07\x06\x05\x04\x03\x02\x01\x00",
9875 .klen = 32,
9876 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9877 "\x07\x06\x05\x04\x03\x02\x01\x00",
9878 .ilen = 16,
9879 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
9880 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
9881 .rlen = 16,
9882 },
9883};
9884
9885
9886static struct cipher_testvec serpent_dec_tv_template[] = {
9887 {
9888 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9889 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9890 .ilen = 16,
9891 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9892 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9893 .rlen = 16,
9894 }, {
9895 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9896 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9897 .klen = 16,
9898 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9899 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9900 .ilen = 16,
9901 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9902 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9903 .rlen = 16,
9904 }, {
9905 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9906 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9907 "\x10\x11\x12\x13\x14\x15\x16\x17"
9908 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9909 .klen = 32,
9910 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9911 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9912 .ilen = 16,
9913 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9914 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9915 .rlen = 16,
9916 }, {
9917 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9918 .klen = 16,
9919 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9920 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9921 .ilen = 16,
9922 .result = zeroed_string,
9923 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009924 }, { /* Generated with Crypto++ */
9925 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9926 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9927 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9928 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9929 .klen = 32,
9930 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9931 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9932 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9933 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9934 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9935 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9936 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9937 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9938 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9939 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9940 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9941 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9942 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9943 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9944 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9945 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9946 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009947 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9948 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9949 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9950 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9951 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9952 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9953 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9954 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9955 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9956 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9957 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9958 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9959 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9960 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9961 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9962 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9963 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9964 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9965 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9966 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9967 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9968 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9969 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9970 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9971 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9972 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9973 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9974 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9975 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9976 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9977 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9978 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9979 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9980 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9981 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9982 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9983 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9984 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9985 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9986 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9987 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9988 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9989 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9990 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9991 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9992 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009993 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9994 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9995 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9996 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9997 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9998 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9999 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10000 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10001 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10002 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10003 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10004 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10005 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10006 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10007 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10008 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10009 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010010 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10011 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10012 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10013 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10014 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10015 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10016 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10017 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10018 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10019 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10020 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10021 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10022 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10023 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10024 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10025 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10026 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10027 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10028 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10029 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10030 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10031 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10032 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10033 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10034 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10035 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10036 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10037 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10038 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10039 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10040 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10041 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10042 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10043 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10044 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10045 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10046 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10047 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10048 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10049 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10050 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10051 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10052 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10053 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10054 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10055 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010056 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010057 .np = 3,
10058 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010059 },
10060};
10061
10062static struct cipher_testvec tnepres_dec_tv_template[] = {
10063 {
10064 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10065 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10066 .ilen = 16,
10067 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10068 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10069 .rlen = 16,
10070 }, {
10071 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10072 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10073 .klen = 16,
10074 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10075 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10076 .ilen = 16,
10077 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10078 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10079 .rlen = 16,
10080 }, {
10081 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10082 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10083 "\x10\x11\x12\x13\x14\x15\x16\x17"
10084 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10085 .klen = 32,
10086 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10087 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10088 .ilen = 16,
10089 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10090 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10091 .rlen = 16,
10092 }, { /* KeySize=128, I=121 */
10093 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10094 .klen = 16,
10095 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10096 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10097 .ilen = 16,
10098 .result = zeroed_string,
10099 .rlen = 16,
10100 },
10101};
10102
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010103static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10104 { /* Generated with Crypto++ */
10105 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10106 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10107 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10108 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10109 .klen = 32,
10110 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10111 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10112 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10113 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10114 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10115 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10116 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10117 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10118 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10119 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10120 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10121 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10122 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10123 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10124 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10125 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10126 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10127 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10128 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010129 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10130 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10131 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10132 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10133 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10134 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10135 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10136 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10137 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10138 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10139 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10140 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10141 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10142 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10143 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10144 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10145 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10146 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10147 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10148 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10149 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10150 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10151 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10152 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10153 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10154 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10155 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10156 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10157 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10158 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10159 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10160 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10161 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10162 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10163 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10164 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10165 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10166 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10167 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10168 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10169 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10170 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10171 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10172 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10173 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10174 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010175 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10176 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10177 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10178 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10179 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10180 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10181 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10182 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10183 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10184 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10185 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10186 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10187 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10188 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10189 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10190 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10191 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010192 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10193 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10194 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10195 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10196 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10197 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10198 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10199 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10200 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10201 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10202 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10203 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10204 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10205 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10206 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10207 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10208 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10209 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10210 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10211 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10212 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10213 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10214 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10215 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10216 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10217 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10218 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10219 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10220 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10221 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10222 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10223 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10224 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10225 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10226 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10227 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10228 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10229 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10230 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10231 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10232 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10233 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10234 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10235 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10236 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10237 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010238 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010239 .np = 3,
10240 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010241 },
10242};
10243
10244static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10245 { /* Generated with Crypto++ */
10246 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10247 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10248 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10249 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10250 .klen = 32,
10251 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10252 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10253 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10254 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10255 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10256 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10257 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10258 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10259 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10260 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10261 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10262 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10263 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10264 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10265 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10266 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10267 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10268 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10269 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010270 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10271 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10272 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10273 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10274 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10275 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10276 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10277 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10278 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10279 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10280 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10281 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10282 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10283 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10284 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10285 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10286 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10287 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10288 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10289 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10290 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10291 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10292 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10293 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10294 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10295 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10296 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10297 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10298 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10299 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10300 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10301 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10302 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10303 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10304 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10305 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10306 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10307 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10308 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10309 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10310 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10311 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10312 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10313 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10314 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10315 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010316 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10317 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10318 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10319 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10320 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10321 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10322 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10323 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10324 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10325 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10326 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10327 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10328 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10329 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10330 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10331 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10332 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010333 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10334 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10335 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10336 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10337 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10338 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10339 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10340 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10341 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10342 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10343 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10344 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10345 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10346 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10347 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10348 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10349 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10350 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10351 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10352 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10353 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10354 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10355 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10356 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10357 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10358 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10359 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10360 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10361 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10362 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10363 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10364 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10365 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10366 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10367 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10368 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10369 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10370 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10371 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10372 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10373 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10374 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10375 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10376 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10377 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10378 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010379 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010380 .np = 3,
10381 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010382 },
10383};
10384
10385static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10386 { /* Generated with Crypto++ */
10387 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10388 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10389 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10390 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10391 .klen = 32,
10392 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10393 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10394 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10395 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10396 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10397 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10398 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10399 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10400 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10401 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10402 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10403 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10404 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10405 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10406 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10407 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10408 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10409 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10410 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010411 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10412 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10413 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10414 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10415 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10416 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10417 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10418 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10419 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10420 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10421 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10422 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10423 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10424 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10425 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10426 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10427 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10428 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10429 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10430 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10431 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10432 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10433 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10434 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10435 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10436 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10437 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10438 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10439 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10440 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10441 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10442 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10443 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10444 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10445 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10446 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10447 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10448 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10449 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10450 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10451 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10452 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10453 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10454 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10455 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10456 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010457 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10458 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10459 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10460 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10461 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10462 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10463 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10464 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10465 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10466 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10467 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10468 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10469 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10470 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10471 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10472 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10473 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010474 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10475 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10476 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10477 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10478 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10479 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10480 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10481 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10482 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10483 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10484 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10485 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10486 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10487 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10488 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10489 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10490 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10491 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10492 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10493 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10494 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10495 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10496 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10497 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10498 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10499 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10500 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10501 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10502 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10503 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10504 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10505 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10506 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10507 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10508 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10509 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10510 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10511 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10512 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10513 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10514 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10515 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10516 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10517 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10518 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10519 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010520 }, { /* Generated with Crypto++ */
10521 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10522 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10523 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10524 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10525 .klen = 32,
10526 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10527 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10528 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10529 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10530 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10531 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10532 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10533 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10534 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10535 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10536 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10537 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10538 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10539 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10540 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10541 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10542 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10543 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10544 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10545 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010546 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10547 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10548 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10549 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10550 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10551 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10552 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10553 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10554 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10555 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10556 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10557 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10558 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10559 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10560 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10561 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10562 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10563 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10564 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10565 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10566 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10567 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10568 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10569 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10570 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10571 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10572 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10573 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10574 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10575 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10576 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10577 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10578 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10579 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10580 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10581 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10582 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10583 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10584 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10585 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10586 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10587 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10588 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10589 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10590 "\x2B\xC2\x59",
10591 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010592 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10593 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10594 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10595 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10596 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10597 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10598 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10599 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10600 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10601 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10602 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10603 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10604 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10605 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10606 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10607 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10608 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10609 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010610 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10611 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10612 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10613 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10614 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10615 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10616 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10617 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10618 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10619 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10620 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10621 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10622 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10623 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10624 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10625 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10626 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10627 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10628 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10629 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10630 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10631 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10632 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10633 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10634 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10635 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10636 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10637 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10638 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10639 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10640 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10641 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10642 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10643 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10644 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10645 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10646 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10647 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10648 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10649 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10650 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10651 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10652 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10653 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10654 "\x38\xE2\xE5",
10655 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010656 .also_non_np = 1,
10657 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010658 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010659 }, { /* Generated with Crypto++ */
10660 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10661 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10662 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10663 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10664 .klen = 32,
10665 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10666 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10667 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10668 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10669 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10670 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10671 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10672 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10673 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10674 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10675 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10676 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10677 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10678 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10679 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10680 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10681 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10682 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10683 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10684 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10685 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10686 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10687 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10688 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10689 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10690 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10691 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10692 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10693 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10694 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10695 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10696 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10697 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10698 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10699 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10700 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10701 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10702 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10703 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10704 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10705 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10706 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10707 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10708 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10709 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10710 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10711 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10712 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10713 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10714 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10715 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10716 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10717 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10718 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10719 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10720 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10721 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10722 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10723 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10724 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10725 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10726 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10727 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10728 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10729 .ilen = 496,
10730 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10731 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10732 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10733 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10734 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10735 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10736 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10737 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10738 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10739 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10740 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10741 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10742 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10743 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10744 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10745 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10746 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10747 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10748 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10749 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10750 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10751 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10752 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10753 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10754 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10755 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10756 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10757 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10758 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10759 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10760 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10761 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10762 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10763 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10764 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10765 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10766 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10767 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10768 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10769 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10770 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10771 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10772 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10773 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10774 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10775 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10776 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10777 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10778 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10779 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10780 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10781 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10782 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10783 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10784 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10785 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10786 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10787 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10788 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10789 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10790 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10791 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10792 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010793 },
10794};
10795
10796static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10797 { /* Generated with Crypto++ */
10798 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10799 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10800 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10801 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10802 .klen = 32,
10803 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10804 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10805 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10806 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10807 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10808 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10809 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10810 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10811 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10812 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10813 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10814 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10815 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10816 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10817 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10818 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10819 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10820 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10821 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010822 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10823 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10824 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10825 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10826 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10827 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10828 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10829 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10830 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10831 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10832 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10833 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10834 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10835 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10836 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10837 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10838 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10839 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10840 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10841 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10842 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10843 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10844 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10845 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10846 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10847 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10848 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10849 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10850 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10851 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10852 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10853 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10854 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10855 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10856 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10857 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10858 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10859 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10860 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10861 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10862 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10863 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10864 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10865 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10866 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10867 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010868 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10869 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10870 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10871 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10872 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10873 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10874 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10875 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10876 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10877 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10878 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10879 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10880 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10881 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10882 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10883 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10884 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010885 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10886 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10887 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10888 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10889 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10890 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10891 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10892 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10893 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10894 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10895 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10896 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10897 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10898 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10899 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10900 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10901 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10902 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10903 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10904 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10905 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10906 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10907 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10908 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10909 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10910 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10911 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10912 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10913 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10914 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10915 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10916 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10917 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10918 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10919 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10920 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10921 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10922 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10923 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10924 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10925 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10926 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10927 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10928 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10929 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10930 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010931 }, { /* Generated with Crypto++ */
10932 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10933 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10934 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10935 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10936 .klen = 32,
10937 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10938 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10939 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10940 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10941 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10942 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10943 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10944 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10945 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10946 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10947 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10948 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10949 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10950 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10951 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10952 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10953 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10954 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10955 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10956 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010957 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10958 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10959 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10960 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10961 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10962 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10963 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10964 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10965 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10966 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10967 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10968 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10969 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10970 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10971 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10972 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10973 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10974 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10975 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10976 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10977 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10978 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10979 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10980 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10981 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10982 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10983 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10984 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10985 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10986 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10987 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10988 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10989 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10990 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10991 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10992 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10993 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10994 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10995 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10996 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10997 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10998 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10999 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11000 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11001 "\x38\xE2\xE5",
11002 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011003 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11004 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11005 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11006 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11007 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11008 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11009 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11010 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11011 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11012 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11013 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11014 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11015 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11016 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11017 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11018 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11019 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11020 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011021 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11022 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11023 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11024 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11025 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11026 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11027 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11028 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11029 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11030 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11031 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11032 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11033 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11034 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11035 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11036 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11037 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11038 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11039 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11040 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11041 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11042 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11043 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11044 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11045 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11046 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11047 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11048 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11049 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11050 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11051 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11052 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11053 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11054 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11055 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11056 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11057 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11058 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11059 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11060 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11061 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11062 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11063 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11064 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11065 "\x2B\xC2\x59",
11066 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011067 .also_non_np = 1,
11068 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011069 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011070 }, { /* Generated with Crypto++ */
11071 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11072 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11073 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11074 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11075 .klen = 32,
11076 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11077 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11078 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11079 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11080 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11081 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11082 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11083 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11084 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11085 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11086 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11087 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11088 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11089 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11090 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11091 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11092 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11093 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11094 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11095 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11096 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11097 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11098 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11099 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11100 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11101 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11102 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11103 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11104 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11105 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11106 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11107 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11108 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11109 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11110 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11111 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11112 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11113 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11114 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11115 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11116 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11117 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11118 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11119 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11120 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11121 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11122 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11123 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11124 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11125 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11126 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11127 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11128 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11129 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11130 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11131 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11132 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11133 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11134 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11135 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11136 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11137 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11138 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11139 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11140 .ilen = 496,
11141 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11142 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11143 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11144 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11145 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11146 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11147 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11148 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11149 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11150 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11151 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11152 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11153 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11154 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11155 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11156 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11157 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11158 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11159 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11160 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11161 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11162 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11163 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11164 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11165 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11166 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11167 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11168 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11169 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11170 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11171 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11172 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11173 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11174 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11175 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11176 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11177 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11178 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11179 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11180 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11181 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11182 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11183 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11184 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11185 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11186 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11187 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11188 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11189 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11190 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11191 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11192 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11193 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11194 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11195 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11196 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11197 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11198 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11199 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11200 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11201 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11202 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11203 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011204 },
11205};
Herbert Xuda7f0332008-07-31 17:08:25 +080011206
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011207static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11208 /* Generated from AES-LRW test vectors */
11209 {
11210 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11211 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11212 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11213 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11214 .klen = 32,
11215 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11216 "\x00\x00\x00\x00\x00\x00\x00\x01",
11217 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11218 "\x38\x39\x41\x42\x43\x44\x45\x46",
11219 .ilen = 16,
11220 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11221 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11222 .rlen = 16,
11223 }, {
11224 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11225 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11226 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11227 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11228 .klen = 32,
11229 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11230 "\x00\x00\x00\x00\x00\x00\x00\x02",
11231 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11232 "\x38\x39\x41\x42\x43\x44\x45\x46",
11233 .ilen = 16,
11234 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11235 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11236 .rlen = 16,
11237 }, {
11238 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11239 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11240 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11241 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11242 .klen = 32,
11243 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11244 "\x00\x00\x00\x02\x00\x00\x00\x00",
11245 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11246 "\x38\x39\x41\x42\x43\x44\x45\x46",
11247 .ilen = 16,
11248 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11249 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11250 .rlen = 16,
11251 }, {
11252 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11253 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11254 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11255 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11256 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11257 .klen = 40,
11258 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11259 "\x00\x00\x00\x00\x00\x00\x00\x01",
11260 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11261 "\x38\x39\x41\x42\x43\x44\x45\x46",
11262 .ilen = 16,
11263 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11264 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11265 .rlen = 16,
11266 }, {
11267 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11268 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11269 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11270 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11271 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11272 .klen = 40,
11273 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11274 "\x00\x00\x00\x02\x00\x00\x00\x00",
11275 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11276 "\x38\x39\x41\x42\x43\x44\x45\x46",
11277 .ilen = 16,
11278 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11279 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11280 .rlen = 16,
11281 }, {
11282 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11283 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11284 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11285 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11286 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11287 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11288 .klen = 48,
11289 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11290 "\x00\x00\x00\x00\x00\x00\x00\x01",
11291 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11292 "\x38\x39\x41\x42\x43\x44\x45\x46",
11293 .ilen = 16,
11294 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11295 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11296 .rlen = 16,
11297 }, {
11298 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11299 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11300 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11301 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11302 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11303 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11304 .klen = 48,
11305 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11306 "\x00\x00\x00\x02\x00\x00\x00\x00",
11307 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11308 "\x38\x39\x41\x42\x43\x44\x45\x46",
11309 .ilen = 16,
11310 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11311 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11312 .rlen = 16,
11313 }, {
11314 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11315 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11316 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11317 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11318 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11319 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11320 .klen = 48,
11321 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11322 "\x00\x00\x00\x00\x00\x00\x00\x01",
11323 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11324 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11325 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11326 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11327 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11328 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11329 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11330 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11331 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11332 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11333 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11334 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11335 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11336 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11337 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11338 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11339 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11340 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11341 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11342 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11343 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11344 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11345 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11346 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11347 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11348 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11349 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11350 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11351 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11352 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11353 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11354 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11355 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11356 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11357 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11358 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11359 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11360 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11361 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11362 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11363 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11364 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11365 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11366 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11367 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11368 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11369 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11370 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11371 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11372 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11373 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11374 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11375 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11376 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11377 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11378 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11379 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11380 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11381 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11382 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11383 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11384 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11385 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11386 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11387 .ilen = 512,
11388 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11389 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11390 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11391 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11392 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11393 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11394 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11395 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11396 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11397 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11398 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11399 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11400 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11401 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11402 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11403 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11404 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11405 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11406 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11407 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11408 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11409 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11410 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11411 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11412 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11413 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11414 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11415 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11416 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11417 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11418 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11419 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11420 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11421 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11422 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11423 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11424 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11425 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11426 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11427 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11428 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11429 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11430 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11431 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11432 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11433 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11434 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11435 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11436 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11437 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11438 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11439 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11440 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11441 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11442 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11443 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11444 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11445 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11446 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11447 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11448 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11449 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11450 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11451 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11452 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011453 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011454 .np = 3,
11455 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011456 },
11457};
11458
11459static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11460 /* Generated from AES-LRW test vectors */
11461 /* same as enc vectors with input and result reversed */
11462 {
11463 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11464 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11465 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11466 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11467 .klen = 32,
11468 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11469 "\x00\x00\x00\x00\x00\x00\x00\x01",
11470 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11471 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11472 .ilen = 16,
11473 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11474 "\x38\x39\x41\x42\x43\x44\x45\x46",
11475 .rlen = 16,
11476 }, {
11477 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11478 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11479 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11480 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11481 .klen = 32,
11482 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11483 "\x00\x00\x00\x00\x00\x00\x00\x02",
11484 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11485 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11486 .ilen = 16,
11487 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11488 "\x38\x39\x41\x42\x43\x44\x45\x46",
11489 .rlen = 16,
11490 }, {
11491 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11492 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11493 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11494 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11495 .klen = 32,
11496 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11497 "\x00\x00\x00\x02\x00\x00\x00\x00",
11498 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11499 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11500 .ilen = 16,
11501 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11502 "\x38\x39\x41\x42\x43\x44\x45\x46",
11503 .rlen = 16,
11504 }, {
11505 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11506 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11507 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11508 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11509 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11510 .klen = 40,
11511 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11512 "\x00\x00\x00\x00\x00\x00\x00\x01",
11513 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11514 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11515 .ilen = 16,
11516 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11517 "\x38\x39\x41\x42\x43\x44\x45\x46",
11518 .rlen = 16,
11519 }, {
11520 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11521 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11522 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11523 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11524 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11525 .klen = 40,
11526 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11527 "\x00\x00\x00\x02\x00\x00\x00\x00",
11528 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11529 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11530 .ilen = 16,
11531 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11532 "\x38\x39\x41\x42\x43\x44\x45\x46",
11533 .rlen = 16,
11534 }, {
11535 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11536 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11537 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11538 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11539 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11540 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11541 .klen = 48,
11542 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11543 "\x00\x00\x00\x00\x00\x00\x00\x01",
11544 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11545 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11546 .ilen = 16,
11547 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11548 "\x38\x39\x41\x42\x43\x44\x45\x46",
11549 .rlen = 16,
11550 }, {
11551 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11552 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11553 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11554 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11555 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11556 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11557 .klen = 48,
11558 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11559 "\x00\x00\x00\x02\x00\x00\x00\x00",
11560 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11561 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11562 .ilen = 16,
11563 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11564 "\x38\x39\x41\x42\x43\x44\x45\x46",
11565 .rlen = 16,
11566 }, {
11567 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11568 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11569 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11570 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11571 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11572 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11573 .klen = 48,
11574 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11575 "\x00\x00\x00\x00\x00\x00\x00\x01",
11576 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11577 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11578 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11579 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11580 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11581 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11582 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11583 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11584 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11585 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11586 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11587 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11588 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11589 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11590 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11591 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11592 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11593 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11594 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11595 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11596 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11597 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11598 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11599 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11600 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11601 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11602 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11603 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11604 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11605 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11606 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11607 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11608 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11609 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11610 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11611 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11612 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11613 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11614 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11615 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11616 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11617 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11618 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11619 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11620 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11621 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11622 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11623 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11624 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11625 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11626 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11627 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11628 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11629 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11630 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11631 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11632 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11633 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11634 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11635 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11636 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11637 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11638 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11639 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11640 .ilen = 512,
11641 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11642 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11643 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11644 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11645 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11646 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11647 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11648 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11649 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11650 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11651 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11652 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11653 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11654 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11655 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11656 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11657 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11658 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11659 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11660 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11661 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11662 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11663 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11664 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11665 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11666 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11667 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11668 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11669 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11670 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11671 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11672 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11673 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11674 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11675 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11676 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11677 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11678 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11679 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11680 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11681 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11682 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11683 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11684 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11685 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11686 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11687 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11688 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11689 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11690 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11691 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11692 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11693 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11694 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11695 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11696 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11697 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11698 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11699 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11700 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11701 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11702 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11703 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11704 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11705 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011706 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011707 .np = 3,
11708 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011709 },
11710};
11711
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030011712static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11713 /* Generated from AES-XTS test vectors */
11714 {
11715 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11716 "\x00\x00\x00\x00\x00\x00\x00\x00"
11717 "\x00\x00\x00\x00\x00\x00\x00\x00"
11718 "\x00\x00\x00\x00\x00\x00\x00\x00",
11719 .klen = 32,
11720 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11721 "\x00\x00\x00\x00\x00\x00\x00\x00",
11722 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11723 "\x00\x00\x00\x00\x00\x00\x00\x00"
11724 "\x00\x00\x00\x00\x00\x00\x00\x00"
11725 "\x00\x00\x00\x00\x00\x00\x00\x00",
11726 .ilen = 32,
11727 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11728 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11729 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11730 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11731 .rlen = 32,
11732 }, {
11733 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11734 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11746 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11747 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11748 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11749 .rlen = 32,
11750 }, {
11751 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11752 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11753 "\x22\x22\x22\x22\x22\x22\x22\x22"
11754 "\x22\x22\x22\x22\x22\x22\x22\x22",
11755 .klen = 32,
11756 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11757 "\x00\x00\x00\x00\x00\x00\x00\x00",
11758 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11759 "\x44\x44\x44\x44\x44\x44\x44\x44"
11760 "\x44\x44\x44\x44\x44\x44\x44\x44"
11761 "\x44\x44\x44\x44\x44\x44\x44\x44",
11762 .ilen = 32,
11763 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11764 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11765 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11766 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11767 .rlen = 32,
11768 }, {
11769 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11770 "\x23\x53\x60\x28\x74\x71\x35\x26"
11771 "\x31\x41\x59\x26\x53\x58\x97\x93"
11772 "\x23\x84\x62\x64\x33\x83\x27\x95",
11773 .klen = 32,
11774 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11775 "\x00\x00\x00\x00\x00\x00\x00\x00",
11776 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11777 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11778 "\x10\x11\x12\x13\x14\x15\x16\x17"
11779 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11780 "\x20\x21\x22\x23\x24\x25\x26\x27"
11781 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11782 "\x30\x31\x32\x33\x34\x35\x36\x37"
11783 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11784 "\x40\x41\x42\x43\x44\x45\x46\x47"
11785 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11786 "\x50\x51\x52\x53\x54\x55\x56\x57"
11787 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11788 "\x60\x61\x62\x63\x64\x65\x66\x67"
11789 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11790 "\x70\x71\x72\x73\x74\x75\x76\x77"
11791 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11792 "\x80\x81\x82\x83\x84\x85\x86\x87"
11793 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11794 "\x90\x91\x92\x93\x94\x95\x96\x97"
11795 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11796 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11797 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11798 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11799 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11800 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11801 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11802 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11803 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11804 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11805 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11806 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11807 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11808 "\x00\x01\x02\x03\x04\x05\x06\x07"
11809 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11810 "\x10\x11\x12\x13\x14\x15\x16\x17"
11811 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11812 "\x20\x21\x22\x23\x24\x25\x26\x27"
11813 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11814 "\x30\x31\x32\x33\x34\x35\x36\x37"
11815 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11816 "\x40\x41\x42\x43\x44\x45\x46\x47"
11817 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11818 "\x50\x51\x52\x53\x54\x55\x56\x57"
11819 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11820 "\x60\x61\x62\x63\x64\x65\x66\x67"
11821 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11822 "\x70\x71\x72\x73\x74\x75\x76\x77"
11823 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11824 "\x80\x81\x82\x83\x84\x85\x86\x87"
11825 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11826 "\x90\x91\x92\x93\x94\x95\x96\x97"
11827 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11828 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11829 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11830 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11831 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11832 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11833 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11834 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11835 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11836 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11837 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11838 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11839 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11840 .ilen = 512,
11841 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
11842 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
11843 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
11844 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
11845 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
11846 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
11847 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
11848 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
11849 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
11850 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
11851 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
11852 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
11853 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
11854 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
11855 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
11856 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
11857 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
11858 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
11859 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
11860 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
11861 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
11862 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
11863 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
11864 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
11865 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
11866 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
11867 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
11868 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
11869 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
11870 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
11871 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
11872 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
11873 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
11874 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
11875 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
11876 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
11877 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
11878 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
11879 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
11880 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
11881 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
11882 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
11883 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
11884 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
11885 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
11886 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
11887 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
11888 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
11889 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
11890 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
11891 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
11892 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
11893 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
11894 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
11895 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
11896 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
11897 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
11898 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
11899 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
11900 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
11901 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
11902 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
11903 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
11904 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
11905 .rlen = 512,
11906 }, {
11907 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11908 "\x23\x53\x60\x28\x74\x71\x35\x26"
11909 "\x62\x49\x77\x57\x24\x70\x93\x69"
11910 "\x99\x59\x57\x49\x66\x96\x76\x27"
11911 "\x31\x41\x59\x26\x53\x58\x97\x93"
11912 "\x23\x84\x62\x64\x33\x83\x27\x95"
11913 "\x02\x88\x41\x97\x16\x93\x99\x37"
11914 "\x51\x05\x82\x09\x74\x94\x45\x92",
11915 .klen = 64,
11916 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11917 "\x00\x00\x00\x00\x00\x00\x00\x00",
11918 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11919 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11920 "\x10\x11\x12\x13\x14\x15\x16\x17"
11921 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11922 "\x20\x21\x22\x23\x24\x25\x26\x27"
11923 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11924 "\x30\x31\x32\x33\x34\x35\x36\x37"
11925 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11926 "\x40\x41\x42\x43\x44\x45\x46\x47"
11927 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11928 "\x50\x51\x52\x53\x54\x55\x56\x57"
11929 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11930 "\x60\x61\x62\x63\x64\x65\x66\x67"
11931 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11932 "\x70\x71\x72\x73\x74\x75\x76\x77"
11933 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11934 "\x80\x81\x82\x83\x84\x85\x86\x87"
11935 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11936 "\x90\x91\x92\x93\x94\x95\x96\x97"
11937 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11938 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11939 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11940 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11941 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11942 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11943 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11944 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11945 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11946 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11947 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11948 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11949 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11950 "\x00\x01\x02\x03\x04\x05\x06\x07"
11951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11952 "\x10\x11\x12\x13\x14\x15\x16\x17"
11953 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11954 "\x20\x21\x22\x23\x24\x25\x26\x27"
11955 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11956 "\x30\x31\x32\x33\x34\x35\x36\x37"
11957 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11958 "\x40\x41\x42\x43\x44\x45\x46\x47"
11959 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11960 "\x50\x51\x52\x53\x54\x55\x56\x57"
11961 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11962 "\x60\x61\x62\x63\x64\x65\x66\x67"
11963 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11964 "\x70\x71\x72\x73\x74\x75\x76\x77"
11965 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11966 "\x80\x81\x82\x83\x84\x85\x86\x87"
11967 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11968 "\x90\x91\x92\x93\x94\x95\x96\x97"
11969 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11970 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11971 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11972 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11973 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11974 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11975 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11976 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11977 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11978 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11979 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11980 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11981 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11982 .ilen = 512,
11983 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
11984 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
11985 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
11986 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
11987 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
11988 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
11989 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
11990 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
11991 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
11992 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
11993 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
11994 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
11995 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
11996 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
11997 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
11998 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
11999 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12000 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12001 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12002 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12003 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12004 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12005 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12006 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12007 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12008 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12009 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12010 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12011 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12012 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12013 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12014 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12015 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12016 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12017 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12018 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12019 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12020 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12021 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12022 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12023 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12024 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12025 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12026 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12027 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12028 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12029 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12030 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12031 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12032 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12033 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12034 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12035 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12036 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12037 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12038 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12039 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12040 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12041 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12042 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12043 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12044 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12045 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12046 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12047 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012048 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012049 .np = 3,
12050 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012051 },
12052};
12053
12054static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12055 /* Generated from AES-XTS test vectors */
12056 /* same as enc vectors with input and result reversed */
12057 {
12058 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12059 "\x00\x00\x00\x00\x00\x00\x00\x00"
12060 "\x00\x00\x00\x00\x00\x00\x00\x00"
12061 "\x00\x00\x00\x00\x00\x00\x00\x00",
12062 .klen = 32,
12063 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12064 "\x00\x00\x00\x00\x00\x00\x00\x00",
12065 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12066 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12067 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12068 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12069 .ilen = 32,
12070 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12071 "\x00\x00\x00\x00\x00\x00\x00\x00"
12072 "\x00\x00\x00\x00\x00\x00\x00\x00"
12073 "\x00\x00\x00\x00\x00\x00\x00\x00",
12074 .rlen = 32,
12075 }, {
12076 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12077 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12084 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12085 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12086 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
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 = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12095 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12096 "\x22\x22\x22\x22\x22\x22\x22\x22"
12097 "\x22\x22\x22\x22\x22\x22\x22\x22",
12098 .klen = 32,
12099 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12100 "\x00\x00\x00\x00\x00\x00\x00\x00",
12101 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12102 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12103 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12104 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12105 .ilen = 32,
12106 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12107 "\x44\x44\x44\x44\x44\x44\x44\x44"
12108 "\x44\x44\x44\x44\x44\x44\x44\x44"
12109 "\x44\x44\x44\x44\x44\x44\x44\x44",
12110 .rlen = 32,
12111 }, {
12112 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12113 "\x23\x53\x60\x28\x74\x71\x35\x26"
12114 "\x31\x41\x59\x26\x53\x58\x97\x93"
12115 "\x23\x84\x62\x64\x33\x83\x27\x95",
12116 .klen = 32,
12117 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12118 "\x00\x00\x00\x00\x00\x00\x00\x00",
12119 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12120 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12121 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12122 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12123 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12124 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12125 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12126 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12127 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12128 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12129 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12130 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12131 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12132 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12133 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12134 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12135 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12136 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12137 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12138 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12139 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12140 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12141 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12142 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12143 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12144 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12145 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12146 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12147 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12148 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12149 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12150 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12151 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12152 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12153 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12154 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12155 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12156 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12157 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12158 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12159 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12160 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12161 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12162 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12163 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12164 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12165 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12166 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12167 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12168 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12169 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12170 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12171 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12172 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12173 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12174 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12175 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12176 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12177 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12178 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12179 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12180 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12181 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12182 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12183 .ilen = 512,
12184 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12185 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12186 "\x10\x11\x12\x13\x14\x15\x16\x17"
12187 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12188 "\x20\x21\x22\x23\x24\x25\x26\x27"
12189 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12190 "\x30\x31\x32\x33\x34\x35\x36\x37"
12191 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12192 "\x40\x41\x42\x43\x44\x45\x46\x47"
12193 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12194 "\x50\x51\x52\x53\x54\x55\x56\x57"
12195 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12196 "\x60\x61\x62\x63\x64\x65\x66\x67"
12197 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12198 "\x70\x71\x72\x73\x74\x75\x76\x77"
12199 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12200 "\x80\x81\x82\x83\x84\x85\x86\x87"
12201 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12202 "\x90\x91\x92\x93\x94\x95\x96\x97"
12203 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12204 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12205 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12206 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12207 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12208 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12209 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12210 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12211 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12212 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12213 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12214 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12215 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12216 "\x00\x01\x02\x03\x04\x05\x06\x07"
12217 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12218 "\x10\x11\x12\x13\x14\x15\x16\x17"
12219 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12220 "\x20\x21\x22\x23\x24\x25\x26\x27"
12221 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12222 "\x30\x31\x32\x33\x34\x35\x36\x37"
12223 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12224 "\x40\x41\x42\x43\x44\x45\x46\x47"
12225 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12226 "\x50\x51\x52\x53\x54\x55\x56\x57"
12227 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12228 "\x60\x61\x62\x63\x64\x65\x66\x67"
12229 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12230 "\x70\x71\x72\x73\x74\x75\x76\x77"
12231 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12232 "\x80\x81\x82\x83\x84\x85\x86\x87"
12233 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12234 "\x90\x91\x92\x93\x94\x95\x96\x97"
12235 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12236 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12237 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12238 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12239 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12240 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12241 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12242 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12243 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12244 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12245 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12246 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12247 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12248 .rlen = 512,
12249 }, {
12250 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12251 "\x23\x53\x60\x28\x74\x71\x35\x26"
12252 "\x62\x49\x77\x57\x24\x70\x93\x69"
12253 "\x99\x59\x57\x49\x66\x96\x76\x27"
12254 "\x31\x41\x59\x26\x53\x58\x97\x93"
12255 "\x23\x84\x62\x64\x33\x83\x27\x95"
12256 "\x02\x88\x41\x97\x16\x93\x99\x37"
12257 "\x51\x05\x82\x09\x74\x94\x45\x92",
12258 .klen = 64,
12259 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12260 "\x00\x00\x00\x00\x00\x00\x00\x00",
12261 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12262 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12263 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12264 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12265 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12266 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12267 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12268 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12269 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12270 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12271 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12272 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12273 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12274 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12275 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12276 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12277 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12278 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12279 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12280 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12281 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12282 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12283 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12284 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12285 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12286 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12287 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12288 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12289 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12290 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12291 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12292 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12293 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12294 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12295 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12296 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12297 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12298 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12299 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12300 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12301 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12302 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12303 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12304 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12305 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12306 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12307 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12308 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12309 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12310 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12311 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12312 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12313 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12314 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12315 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12316 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12317 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12318 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12319 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12320 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12321 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12322 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12323 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12324 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12325 .ilen = 512,
12326 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12327 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12328 "\x10\x11\x12\x13\x14\x15\x16\x17"
12329 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12330 "\x20\x21\x22\x23\x24\x25\x26\x27"
12331 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12332 "\x30\x31\x32\x33\x34\x35\x36\x37"
12333 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12334 "\x40\x41\x42\x43\x44\x45\x46\x47"
12335 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12336 "\x50\x51\x52\x53\x54\x55\x56\x57"
12337 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12338 "\x60\x61\x62\x63\x64\x65\x66\x67"
12339 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12340 "\x70\x71\x72\x73\x74\x75\x76\x77"
12341 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12342 "\x80\x81\x82\x83\x84\x85\x86\x87"
12343 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12344 "\x90\x91\x92\x93\x94\x95\x96\x97"
12345 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12346 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12347 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12348 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12349 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12350 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12351 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12352 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12353 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12354 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12355 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12356 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12357 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12358 "\x00\x01\x02\x03\x04\x05\x06\x07"
12359 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12360 "\x10\x11\x12\x13\x14\x15\x16\x17"
12361 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12362 "\x20\x21\x22\x23\x24\x25\x26\x27"
12363 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12364 "\x30\x31\x32\x33\x34\x35\x36\x37"
12365 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12366 "\x40\x41\x42\x43\x44\x45\x46\x47"
12367 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12368 "\x50\x51\x52\x53\x54\x55\x56\x57"
12369 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12370 "\x60\x61\x62\x63\x64\x65\x66\x67"
12371 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12372 "\x70\x71\x72\x73\x74\x75\x76\x77"
12373 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12374 "\x80\x81\x82\x83\x84\x85\x86\x87"
12375 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12376 "\x90\x91\x92\x93\x94\x95\x96\x97"
12377 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12378 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12379 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12380 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12381 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12382 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12383 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12384 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12385 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12386 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12387 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12388 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12389 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12390 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012391 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012392 .np = 3,
12393 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030012394 },
12395};
12396
Herbert Xuda7f0332008-07-31 17:08:25 +080012397/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012398#define CAST6_ENC_TEST_VECTORS 4
12399#define CAST6_DEC_TEST_VECTORS 4
12400#define CAST6_CBC_ENC_TEST_VECTORS 1
12401#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012402#define CAST6_CTR_ENC_TEST_VECTORS 2
12403#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012404#define CAST6_LRW_ENC_TEST_VECTORS 1
12405#define CAST6_LRW_DEC_TEST_VECTORS 1
12406#define CAST6_XTS_ENC_TEST_VECTORS 1
12407#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012408
12409static struct cipher_testvec cast6_enc_tv_template[] = {
12410 {
12411 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12412 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12413 .klen = 16,
12414 .input = zeroed_string,
12415 .ilen = 16,
12416 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12417 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12418 .rlen = 16,
12419 }, {
12420 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12421 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12422 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12423 .klen = 24,
12424 .input = zeroed_string,
12425 .ilen = 16,
12426 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12427 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12428 .rlen = 16,
12429 }, {
12430 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12431 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12432 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12433 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12434 .klen = 32,
12435 .input = zeroed_string,
12436 .ilen = 16,
12437 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12438 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12439 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012440 }, { /* Generated from TF test vectors */
12441 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12442 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12443 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12444 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12445 .klen = 32,
12446 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12447 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12448 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12449 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12450 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12451 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12452 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12453 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12454 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12455 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12456 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12457 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12458 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12459 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12460 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12461 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12462 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12463 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12464 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12465 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12466 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12467 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12468 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12469 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12470 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12471 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12472 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12473 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12474 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12475 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12476 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12477 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12478 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12479 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12480 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12481 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12482 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12483 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12484 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12485 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12486 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12487 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12488 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12489 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12490 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12491 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12492 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12493 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12494 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12495 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12496 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12497 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12498 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12499 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12500 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12501 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12502 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12503 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12504 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12505 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12506 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12507 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12508 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12509 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12510 .ilen = 496,
12511 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12512 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12513 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12514 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12515 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12516 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12517 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12518 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12519 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12520 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12521 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12522 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12523 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12524 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12525 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12526 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12527 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12528 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12529 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12530 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12531 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12532 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12533 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12534 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12535 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12536 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12537 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12538 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12539 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12540 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12541 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12542 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12543 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12544 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12545 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12546 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12547 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12548 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12549 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12550 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12551 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12552 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12553 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12554 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12555 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12556 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12557 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12558 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12559 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12560 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12561 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12562 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12563 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12564 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12565 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12566 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12567 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12568 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12569 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12570 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12571 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12572 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12573 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012574 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012575 .np = 3,
12576 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012577 },
12578};
12579
12580static struct cipher_testvec cast6_dec_tv_template[] = {
12581 {
12582 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12583 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12584 .klen = 16,
12585 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12586 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12587 .ilen = 16,
12588 .result = zeroed_string,
12589 .rlen = 16,
12590 }, {
12591 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12592 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12593 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12594 .klen = 24,
12595 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12596 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12597 .ilen = 16,
12598 .result = zeroed_string,
12599 .rlen = 16,
12600 }, {
12601 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12602 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12603 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12604 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12605 .klen = 32,
12606 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12607 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12608 .ilen = 16,
12609 .result = zeroed_string,
12610 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012611 }, { /* Generated from TF test vectors */
12612 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12613 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12614 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12615 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12616 .klen = 32,
12617 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12618 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12619 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12620 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12621 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12622 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12623 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12624 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12625 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12626 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12627 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12628 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12629 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12630 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12631 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12632 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12633 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12634 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12635 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12636 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12637 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12638 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12639 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12640 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12641 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12642 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12643 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12644 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12645 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12646 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12647 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12648 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12649 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12650 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12651 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12652 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12653 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12654 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12655 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12656 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12657 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12658 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12659 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12660 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12661 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12662 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12663 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12664 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12665 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12666 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12667 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12668 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12669 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12670 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12671 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12672 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12673 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12674 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12675 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12676 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12677 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12678 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12679 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12680 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12681 .ilen = 496,
12682 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12683 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12684 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12685 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12686 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12687 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12688 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12689 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12690 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12691 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12692 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12693 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12694 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12695 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12696 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12697 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12698 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12699 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12700 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12701 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12702 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12703 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12704 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12705 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12706 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12707 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12708 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12709 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12710 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12711 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12712 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12713 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12714 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12715 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12716 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12717 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12718 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12719 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12720 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12721 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12722 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12723 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12724 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12725 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12726 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12727 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12728 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12729 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12730 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12731 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12732 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12733 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12734 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12735 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12736 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12737 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12738 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12739 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12740 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12741 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12742 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12743 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12744 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012745 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012746 .np = 3,
12747 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012748 },
12749};
12750
12751static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12752 { /* Generated from TF test vectors */
12753 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12754 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12755 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12756 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12757 .klen = 32,
12758 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12759 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12760 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12761 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12762 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12763 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12764 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12765 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12766 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12767 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12768 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12769 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12770 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12771 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12772 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12773 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12774 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12775 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12776 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12777 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12778 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12779 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12780 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12781 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12782 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12783 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12784 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12785 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12786 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12787 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12788 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12789 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12790 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12791 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12792 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12793 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12794 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12795 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12796 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12797 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12798 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12799 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12800 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12801 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12802 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12803 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12804 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12805 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12806 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12807 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12808 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12809 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12810 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12811 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12812 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12813 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12814 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12815 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12816 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12817 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12818 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12819 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12820 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12821 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12822 .ilen = 496,
12823 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12824 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12825 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12826 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12827 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12828 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12829 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12830 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12831 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12832 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12833 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12834 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12835 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12836 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12837 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12838 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12839 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12840 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12841 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12842 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12843 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12844 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12845 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12846 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12847 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12848 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12849 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12850 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12851 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12852 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12853 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12854 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12855 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12856 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12857 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12858 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12859 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12860 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12861 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12862 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12863 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12864 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12865 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12866 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12867 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12868 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12869 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12870 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12871 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12872 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12873 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12874 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12875 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12876 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12877 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12878 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12879 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12880 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12881 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12882 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12883 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12884 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12885 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012886 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012887 .np = 3,
12888 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012889 },
12890};
12891
12892static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
12893 { /* Generated from TF test vectors */
12894 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12895 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12896 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12897 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12898 .klen = 32,
12899 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12900 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12901 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12902 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12903 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12904 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12905 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12906 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12907 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12908 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12909 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12910 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12911 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12912 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12913 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12914 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12915 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12916 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12917 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12918 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12919 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12920 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12921 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12922 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12923 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12924 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12925 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12926 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12927 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12928 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12929 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12930 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12931 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12932 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12933 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12934 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12935 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12936 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12937 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12938 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12939 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12940 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12941 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12942 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12943 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12944 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12945 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12946 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12947 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12948 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12949 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12950 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12951 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12952 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12953 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12954 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12955 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12956 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12957 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12958 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12959 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12960 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12961 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12962 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12963 .ilen = 496,
12964 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12965 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12966 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12967 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12968 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12969 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12970 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12971 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12972 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12973 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12974 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12975 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12976 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12977 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12978 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12979 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12980 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12981 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12982 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12983 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12984 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12985 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12986 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12987 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12988 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12989 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12990 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12991 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12992 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12993 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12994 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12995 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12996 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12997 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12998 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12999 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13000 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13001 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13002 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13003 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13004 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13005 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13006 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13007 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13008 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13009 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13010 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13011 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13012 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13013 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13014 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13015 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13016 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13017 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13018 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13019 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13020 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13021 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13022 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13023 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13024 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13025 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13026 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013027 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013028 .np = 3,
13029 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013030 },
13031};
13032
13033static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13034 { /* Generated from TF test vectors */
13035 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13036 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13037 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13038 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13039 .klen = 32,
13040 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13041 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13042 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13043 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013044 "\x3A",
13045 .ilen = 17,
13046 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13047 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13048 "\x57",
13049 .rlen = 17,
13050 }, { /* Generated from TF test vectors */
13051 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13052 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13053 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13054 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13055 .klen = 32,
13056 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13057 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13058 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13059 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013060 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13061 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13062 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13063 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13064 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13065 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13066 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13067 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13068 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13069 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13070 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13071 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13072 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13073 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13074 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13075 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13076 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13077 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13078 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13079 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13080 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13081 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13082 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13083 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13084 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13085 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13086 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13087 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13088 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13089 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13090 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13091 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13092 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13093 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13094 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13095 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13096 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13097 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13098 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13099 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13100 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13101 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13102 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13103 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13104 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13105 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13106 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13107 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13108 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13109 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13110 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13111 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13112 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13113 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13114 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13115 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13116 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13117 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13118 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13119 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13120 .ilen = 496,
13121 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13122 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13123 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13124 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13125 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13126 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13127 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13128 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13129 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13130 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13131 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13132 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13133 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13134 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13135 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13136 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13137 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13138 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13139 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13140 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13141 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13142 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13143 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13144 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13145 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13146 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13147 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13148 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13149 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13150 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13151 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13152 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13153 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13154 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13155 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13156 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13157 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13158 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13159 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13160 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13161 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13162 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13163 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13164 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13165 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13166 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13167 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13168 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13169 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13170 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13171 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13172 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13173 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13174 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13175 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13176 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13177 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13178 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13179 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13180 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13181 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13182 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13183 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013184 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013185 .np = 3,
13186 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013187 },
13188};
13189
13190static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13191 { /* Generated from TF test vectors */
13192 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13193 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13194 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13195 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13196 .klen = 32,
13197 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13198 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13199 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13200 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013201 "\x57",
13202 .ilen = 17,
13203 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13204 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13205 "\x3A",
13206 .rlen = 17,
13207 }, { /* Generated from TF test vectors */
13208 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13209 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13210 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13211 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13212 .klen = 32,
13213 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13214 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13215 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13216 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013217 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13218 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13219 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13220 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13221 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13222 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13223 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13224 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13225 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13226 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13227 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13228 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13229 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13230 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13231 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13232 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13233 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13234 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13235 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13236 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13237 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13238 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13239 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13240 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13241 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13242 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13243 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13244 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13245 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13246 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13247 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13248 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13249 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13250 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13251 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13252 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13253 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13254 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13255 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13256 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13257 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13258 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13259 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13260 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13261 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13262 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13263 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13264 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13265 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13266 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13267 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13268 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13269 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13270 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13271 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13272 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13273 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13274 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13275 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13276 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13277 .ilen = 496,
13278 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13279 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13280 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13281 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13282 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13283 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13284 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13285 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13286 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13287 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13288 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13289 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13290 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13291 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13292 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13293 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13294 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13295 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13296 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13297 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13298 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13299 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13300 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13301 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13302 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13303 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13304 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13305 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13306 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13307 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13308 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13309 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13310 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13311 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13312 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13313 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13314 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13315 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13316 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13317 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13318 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13319 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13320 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13321 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13322 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13323 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13324 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13325 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13326 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13327 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13328 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13329 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13330 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13331 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13332 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13333 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13334 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13335 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13336 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13337 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13338 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13339 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13340 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013341 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013342 .np = 3,
13343 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013344 },
13345};
13346
13347static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13348 { /* Generated from TF test vectors */
13349 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13350 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13351 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13352 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13353 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13354 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13355 .klen = 48,
13356 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13357 "\x00\x00\x00\x00\x00\x00\x00\x01",
13358 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13359 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13360 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13361 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13362 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13363 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13364 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13365 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13366 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13367 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13368 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13369 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13370 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13371 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13372 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13373 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13374 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13375 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13376 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13377 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13378 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13379 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13380 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13381 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13382 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13383 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13384 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13385 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13386 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13387 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13388 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13389 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13390 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13391 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13392 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13393 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13394 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13395 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13396 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13397 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13398 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13399 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13400 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13401 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13402 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13403 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13404 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13405 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13406 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13407 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13408 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13409 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13410 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13411 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13412 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13413 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13414 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13415 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13416 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13417 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13418 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13419 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13420 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13421 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13422 .ilen = 512,
13423 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13424 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13425 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13426 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13427 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13428 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13429 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13430 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13431 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13432 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13433 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13434 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13435 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13436 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13437 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13438 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13439 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13440 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13441 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13442 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13443 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13444 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13445 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13446 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13447 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13448 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13449 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13450 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13451 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13452 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13453 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13454 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13455 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13456 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13457 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13458 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13459 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13460 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13461 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13462 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13463 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13464 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13465 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13466 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13467 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13468 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13469 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13470 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13471 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13472 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13473 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13474 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13475 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13476 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13477 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13478 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13479 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13480 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13481 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13482 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13483 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13484 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13485 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13486 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13487 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013488 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013489 .np = 3,
13490 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013491 },
13492};
13493
13494static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13495 { /* Generated from TF test vectors */
13496 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13497 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13498 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13499 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13500 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13501 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13502 .klen = 48,
13503 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13504 "\x00\x00\x00\x00\x00\x00\x00\x01",
13505 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13506 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13507 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13508 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13509 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13510 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13511 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13512 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13513 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13514 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13515 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13516 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13517 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13518 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13519 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13520 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13521 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13522 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13523 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13524 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13525 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13526 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13527 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13528 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13529 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13530 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13531 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13532 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13533 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13534 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13535 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13536 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13537 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13538 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13539 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13540 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13541 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13542 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13543 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13544 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13545 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13546 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13547 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13548 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13549 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13550 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13551 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13552 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13553 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13554 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13555 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13556 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13557 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13558 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13559 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13560 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13561 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13562 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13563 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13564 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13565 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13566 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13567 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13568 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13569 .ilen = 512,
13570 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13571 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13572 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13573 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13574 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13575 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13576 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13577 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13578 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13579 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13580 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13581 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13582 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13583 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13584 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13585 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13586 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13587 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13588 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13589 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13590 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13591 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13592 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13593 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13594 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13595 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13596 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13597 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13598 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13599 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13600 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13601 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13602 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13603 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13604 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13605 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13606 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13607 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13608 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13609 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13610 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13611 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13612 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13613 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13614 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13615 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13616 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13617 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13618 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13619 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13620 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13621 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13622 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13623 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13624 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13625 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13626 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13627 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13628 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13629 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13630 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13631 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13632 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13633 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13634 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013635 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013636 .np = 3,
13637 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013638 },
13639};
13640
13641static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13642 { /* Generated from TF test vectors */
13643 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13644 "\x23\x53\x60\x28\x74\x71\x35\x26"
13645 "\x62\x49\x77\x57\x24\x70\x93\x69"
13646 "\x99\x59\x57\x49\x66\x96\x76\x27"
13647 "\x31\x41\x59\x26\x53\x58\x97\x93"
13648 "\x23\x84\x62\x64\x33\x83\x27\x95"
13649 "\x02\x88\x41\x97\x16\x93\x99\x37"
13650 "\x51\x05\x82\x09\x74\x94\x45\x92",
13651 .klen = 64,
13652 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13653 "\x00\x00\x00\x00\x00\x00\x00\x00",
13654 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13655 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13656 "\x10\x11\x12\x13\x14\x15\x16\x17"
13657 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13658 "\x20\x21\x22\x23\x24\x25\x26\x27"
13659 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13660 "\x30\x31\x32\x33\x34\x35\x36\x37"
13661 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13662 "\x40\x41\x42\x43\x44\x45\x46\x47"
13663 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13664 "\x50\x51\x52\x53\x54\x55\x56\x57"
13665 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13666 "\x60\x61\x62\x63\x64\x65\x66\x67"
13667 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13668 "\x70\x71\x72\x73\x74\x75\x76\x77"
13669 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13670 "\x80\x81\x82\x83\x84\x85\x86\x87"
13671 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13672 "\x90\x91\x92\x93\x94\x95\x96\x97"
13673 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13674 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13675 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13676 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13677 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13678 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13679 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13680 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13681 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13682 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13683 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13684 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13685 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13686 "\x00\x01\x02\x03\x04\x05\x06\x07"
13687 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13688 "\x10\x11\x12\x13\x14\x15\x16\x17"
13689 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13690 "\x20\x21\x22\x23\x24\x25\x26\x27"
13691 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13692 "\x30\x31\x32\x33\x34\x35\x36\x37"
13693 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13694 "\x40\x41\x42\x43\x44\x45\x46\x47"
13695 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13696 "\x50\x51\x52\x53\x54\x55\x56\x57"
13697 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13698 "\x60\x61\x62\x63\x64\x65\x66\x67"
13699 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13700 "\x70\x71\x72\x73\x74\x75\x76\x77"
13701 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13702 "\x80\x81\x82\x83\x84\x85\x86\x87"
13703 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13704 "\x90\x91\x92\x93\x94\x95\x96\x97"
13705 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13706 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13707 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13708 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13709 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13710 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13711 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13712 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13713 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13714 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13715 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13716 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13717 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13718 .ilen = 512,
13719 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13720 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13721 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13722 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13723 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13724 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13725 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13726 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13727 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13728 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13729 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13730 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13731 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13732 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13733 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13734 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13735 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13736 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13737 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13738 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13739 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13740 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13741 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13742 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13743 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13744 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13745 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13746 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13747 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13748 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13749 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13750 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13751 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13752 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13753 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13754 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13755 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13756 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13757 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13758 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13759 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13760 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13761 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13762 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13763 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13764 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13765 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13766 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13767 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13768 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13769 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13770 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13771 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13772 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13773 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13774 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13775 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13776 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13777 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13778 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13779 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13780 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13781 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13782 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13783 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013784 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013785 .np = 3,
13786 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013787 },
13788};
13789
13790static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13791 { /* Generated from TF test vectors */
13792 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13793 "\x23\x53\x60\x28\x74\x71\x35\x26"
13794 "\x62\x49\x77\x57\x24\x70\x93\x69"
13795 "\x99\x59\x57\x49\x66\x96\x76\x27"
13796 "\x31\x41\x59\x26\x53\x58\x97\x93"
13797 "\x23\x84\x62\x64\x33\x83\x27\x95"
13798 "\x02\x88\x41\x97\x16\x93\x99\x37"
13799 "\x51\x05\x82\x09\x74\x94\x45\x92",
13800 .klen = 64,
13801 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13802 "\x00\x00\x00\x00\x00\x00\x00\x00",
13803 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13804 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13805 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13806 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13807 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13808 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13809 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13810 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13811 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13812 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13813 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13814 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13815 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13816 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13817 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13818 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13819 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13820 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13821 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13822 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13823 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13824 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13825 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13826 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13827 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13828 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13829 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13830 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13831 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13832 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13833 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13834 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13835 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13836 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13837 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13838 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13839 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13840 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13841 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13842 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13843 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13844 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13845 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13846 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13847 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13848 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13849 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13850 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13851 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13852 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13853 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13854 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13855 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13856 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13857 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13858 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13859 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13860 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13861 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13862 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13863 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13864 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13865 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13866 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13867 .ilen = 512,
13868 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13869 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13870 "\x10\x11\x12\x13\x14\x15\x16\x17"
13871 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13872 "\x20\x21\x22\x23\x24\x25\x26\x27"
13873 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13874 "\x30\x31\x32\x33\x34\x35\x36\x37"
13875 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13876 "\x40\x41\x42\x43\x44\x45\x46\x47"
13877 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13878 "\x50\x51\x52\x53\x54\x55\x56\x57"
13879 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13880 "\x60\x61\x62\x63\x64\x65\x66\x67"
13881 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13882 "\x70\x71\x72\x73\x74\x75\x76\x77"
13883 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13884 "\x80\x81\x82\x83\x84\x85\x86\x87"
13885 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13886 "\x90\x91\x92\x93\x94\x95\x96\x97"
13887 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13888 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13889 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13890 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13891 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13892 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13893 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13894 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13895 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13896 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13897 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13898 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13899 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13900 "\x00\x01\x02\x03\x04\x05\x06\x07"
13901 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13902 "\x10\x11\x12\x13\x14\x15\x16\x17"
13903 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13904 "\x20\x21\x22\x23\x24\x25\x26\x27"
13905 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13906 "\x30\x31\x32\x33\x34\x35\x36\x37"
13907 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13908 "\x40\x41\x42\x43\x44\x45\x46\x47"
13909 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13910 "\x50\x51\x52\x53\x54\x55\x56\x57"
13911 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13912 "\x60\x61\x62\x63\x64\x65\x66\x67"
13913 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13914 "\x70\x71\x72\x73\x74\x75\x76\x77"
13915 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13916 "\x80\x81\x82\x83\x84\x85\x86\x87"
13917 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13918 "\x90\x91\x92\x93\x94\x95\x96\x97"
13919 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13920 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13921 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13922 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13923 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13924 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13925 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13926 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13927 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13928 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13929 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13930 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13931 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13932 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013933 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013934 .np = 3,
13935 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013936 },
13937};
13938
13939
13940/*
13941 * AES test vectors.
13942 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013943#define AES_ENC_TEST_VECTORS 4
13944#define AES_DEC_TEST_VECTORS 4
13945#define AES_CBC_ENC_TEST_VECTORS 5
13946#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020013947#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
13948#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053013949#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
13950#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
13951#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
13952#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
13953#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080013954#define AES_LRW_ENC_TEST_VECTORS 8
13955#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100013956#define AES_XTS_ENC_TEST_VECTORS 5
13957#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013958#define AES_CTR_ENC_TEST_VECTORS 5
13959#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100013960#define AES_OFB_ENC_TEST_VECTORS 1
13961#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080013962#define AES_CTR_3686_ENC_TEST_VECTORS 7
13963#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080013964#define AES_GCM_ENC_TEST_VECTORS 9
13965#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -040013966#define AES_GCM_4106_ENC_TEST_VECTORS 7
13967#define AES_GCM_4106_DEC_TEST_VECTORS 7
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030013968#define AES_GCM_4543_ENC_TEST_VECTORS 1
13969#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080013970#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080013971#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080013972#define AES_CCM_4309_ENC_TEST_VECTORS 7
13973#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080013974
13975static struct cipher_testvec aes_enc_tv_template[] = {
13976 { /* From FIPS-197 */
13977 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13978 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13979 .klen = 16,
13980 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13981 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13982 .ilen = 16,
13983 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
13984 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
13985 .rlen = 16,
13986 }, {
13987 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13988 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13989 "\x10\x11\x12\x13\x14\x15\x16\x17",
13990 .klen = 24,
13991 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13992 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13993 .ilen = 16,
13994 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
13995 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
13996 .rlen = 16,
13997 }, {
13998 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13999 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14000 "\x10\x11\x12\x13\x14\x15\x16\x17"
14001 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14002 .klen = 32,
14003 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
14004 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14005 .ilen = 16,
14006 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14007 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14008 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014009 }, { /* Generated with Crypto++ */
14010 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14011 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14012 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14013 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14014 .klen = 32,
14015 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14016 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14017 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14018 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14019 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14020 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14021 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14022 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14023 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14024 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14025 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14026 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14027 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14028 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14029 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14030 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14031 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14032 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14033 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14034 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14035 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14036 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14037 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14038 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14039 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14040 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14041 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14042 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14043 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14044 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14045 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14046 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14047 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14048 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14049 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14050 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14051 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14052 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14053 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14054 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14055 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14056 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14057 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14058 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14059 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14060 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14061 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14062 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14063 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14064 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14065 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14066 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14067 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14068 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14069 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14070 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14071 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14072 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14073 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14074 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14075 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14076 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14077 .ilen = 496,
14078 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14079 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14080 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14081 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14082 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14083 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14084 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14085 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14086 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14087 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14088 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14089 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14090 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14091 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14092 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14093 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14094 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14095 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14096 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14097 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14098 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14099 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14100 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14101 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14102 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14103 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14104 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14105 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14106 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14107 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14108 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14109 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14110 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14111 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14112 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14113 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14114 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14115 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14116 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14117 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14118 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14119 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14120 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14121 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14122 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14123 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14124 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14125 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14126 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14127 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14128 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14129 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14130 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14131 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14132 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14133 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14134 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14135 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14136 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14137 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14138 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14139 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14140 .rlen = 496,
14141 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014142 .np = 3,
14143 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014144 },
14145};
14146
14147static struct cipher_testvec aes_dec_tv_template[] = {
14148 { /* From FIPS-197 */
14149 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14150 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14151 .klen = 16,
14152 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14153 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14154 .ilen = 16,
14155 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14156 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14157 .rlen = 16,
14158 }, {
14159 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14160 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14161 "\x10\x11\x12\x13\x14\x15\x16\x17",
14162 .klen = 24,
14163 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14164 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14165 .ilen = 16,
14166 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14167 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14168 .rlen = 16,
14169 }, {
14170 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14171 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14172 "\x10\x11\x12\x13\x14\x15\x16\x17"
14173 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14174 .klen = 32,
14175 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14176 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14177 .ilen = 16,
14178 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14179 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14180 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014181 }, { /* Generated with Crypto++ */
14182 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14183 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14184 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14185 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14186 .klen = 32,
14187 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14188 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14189 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14190 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14191 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14192 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14193 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14194 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14195 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14196 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14197 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14198 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14199 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14200 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14201 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14202 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14203 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14204 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14205 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14206 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14207 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14208 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14209 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14210 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14211 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14212 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14213 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14214 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14215 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14216 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14217 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14218 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14219 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14220 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14221 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14222 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14223 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14224 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14225 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14226 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14227 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14228 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14229 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14230 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14231 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14232 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14233 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14234 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14235 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14236 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14237 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14238 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14239 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14240 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14241 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14242 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14243 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14244 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14245 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14246 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14247 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14248 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14249 .ilen = 496,
14250 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14251 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14252 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14253 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14254 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14255 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14256 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14257 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14258 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14259 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14260 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14261 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14262 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14263 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14264 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14265 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14266 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14267 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14268 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14269 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14270 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14271 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14272 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14273 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14274 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14275 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14276 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14277 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14278 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14279 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14280 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14281 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14282 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14283 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14284 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14285 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14286 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14287 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14288 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14289 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14290 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14291 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14292 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14293 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14294 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14295 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14296 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14297 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14298 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14299 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14300 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14301 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14302 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14303 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14304 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14305 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14306 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14307 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14308 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14309 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14310 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14311 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14312 .rlen = 496,
14313 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014314 .np = 3,
14315 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014316 },
14317};
14318
14319static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14320 { /* From RFC 3602 */
14321 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14322 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14323 .klen = 16,
14324 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14325 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14326 .input = "Single block msg",
14327 .ilen = 16,
14328 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14329 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14330 .rlen = 16,
14331 }, {
14332 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14333 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14334 .klen = 16,
14335 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14336 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14337 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14338 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14339 "\x10\x11\x12\x13\x14\x15\x16\x17"
14340 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14341 .ilen = 32,
14342 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14343 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14344 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14345 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14346 .rlen = 32,
14347 }, { /* From NIST SP800-38A */
14348 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14349 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14350 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14351 .klen = 24,
14352 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14353 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14354 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14355 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14356 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14357 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14358 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14359 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14360 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14361 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14362 .ilen = 64,
14363 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14364 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14365 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14366 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14367 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14368 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14369 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14370 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14371 .rlen = 64,
14372 }, {
14373 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14374 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14375 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14376 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14377 .klen = 32,
14378 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14379 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14380 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14381 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14382 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14383 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14384 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14385 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14386 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14387 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14388 .ilen = 64,
14389 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14390 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14391 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14392 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14393 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14394 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14395 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14396 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14397 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014398 }, { /* Generated with Crypto++ */
14399 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14400 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14401 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14402 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14403 .klen = 32,
14404 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14405 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14406 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14407 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14408 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14409 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14410 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14411 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14412 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14413 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14414 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14415 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14416 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14417 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14418 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14419 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14420 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14421 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14422 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14423 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14424 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14425 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14426 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14427 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14428 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14429 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14430 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14431 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14432 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14433 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14434 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14435 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14436 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14437 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14438 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14439 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14440 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14441 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14442 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14443 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14444 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14445 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14446 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14447 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14448 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14449 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14450 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14451 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14452 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14453 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14454 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14455 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14456 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14457 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14458 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14459 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14460 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14461 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14462 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14463 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14464 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14465 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14466 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14467 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14468 .ilen = 496,
14469 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14470 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14471 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14472 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14473 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14474 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14475 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14476 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14477 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14478 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14479 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14480 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14481 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14482 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14483 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14484 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14485 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14486 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14487 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14488 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14489 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14490 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14491 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14492 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14493 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14494 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14495 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14496 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14497 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14498 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14499 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14500 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14501 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14502 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14503 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14504 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14505 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14506 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14507 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14508 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14509 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14510 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14511 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14512 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14513 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14514 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14515 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14516 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14517 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14518 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14519 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14520 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14521 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14522 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14523 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14524 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14525 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14526 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14527 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14528 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14529 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14530 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14531 .rlen = 496,
14532 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014533 .np = 3,
14534 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014535 },
14536};
14537
14538static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14539 { /* From RFC 3602 */
14540 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14541 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14542 .klen = 16,
14543 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14544 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14545 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14546 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14547 .ilen = 16,
14548 .result = "Single block msg",
14549 .rlen = 16,
14550 }, {
14551 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14552 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14553 .klen = 16,
14554 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14555 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14556 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14557 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14558 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14559 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14560 .ilen = 32,
14561 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14562 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14563 "\x10\x11\x12\x13\x14\x15\x16\x17"
14564 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14565 .rlen = 32,
14566 }, { /* From NIST SP800-38A */
14567 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14568 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14569 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14570 .klen = 24,
14571 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14572 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14573 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14574 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14575 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14576 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14577 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14578 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14579 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14580 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14581 .ilen = 64,
14582 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14583 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14584 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14585 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14586 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14587 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14588 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14589 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14590 .rlen = 64,
14591 }, {
14592 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14593 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14594 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14595 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14596 .klen = 32,
14597 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14598 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14599 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14600 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14601 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14602 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14603 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14604 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14605 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14606 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14607 .ilen = 64,
14608 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14609 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14610 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14611 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14612 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14613 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14614 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14615 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14616 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014617 }, { /* Generated with Crypto++ */
14618 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14619 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14620 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14621 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14622 .klen = 32,
14623 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14624 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14625 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14626 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14627 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14628 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14629 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14630 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14631 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14632 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14633 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14634 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14635 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14636 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14637 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14638 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14639 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14640 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14641 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14642 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14643 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14644 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14645 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14646 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14647 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14648 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14649 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14650 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14651 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14652 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14653 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14654 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14655 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14656 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14657 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14658 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14659 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14660 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14661 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14662 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14663 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14664 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14665 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14666 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14667 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14668 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14669 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14670 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14671 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14672 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14673 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14674 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14675 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14676 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14677 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14678 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14679 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14680 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14681 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14682 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14683 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14684 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14685 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14686 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14687 .ilen = 496,
14688 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14689 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14690 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14691 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14692 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14693 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14694 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14695 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14696 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14697 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14698 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14699 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14700 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14701 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14702 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14703 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14704 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14705 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14706 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14707 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14708 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14709 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14710 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14711 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14712 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14713 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14714 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14715 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14716 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14717 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14718 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14719 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14720 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14721 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14722 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14723 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14724 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14725 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14726 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14727 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14728 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14729 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14730 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14731 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14732 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14733 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14734 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14735 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14736 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14737 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14738 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14739 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14740 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14741 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14742 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14743 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14744 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14745 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14746 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14747 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14748 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14749 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14750 .rlen = 496,
14751 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014752 .np = 3,
14753 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014754 },
14755};
14756
Horia Geantabca4feb2014-03-14 17:46:51 +020014757static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14758 { /* Input data from RFC 2410 Case 1 */
14759#ifdef __LITTLE_ENDIAN
14760 .key = "\x08\x00" /* rta length */
14761 "\x01\x00" /* rta type */
14762#else
14763 .key = "\x00\x08" /* rta length */
14764 "\x00\x01" /* rta type */
14765#endif
14766 "\x00\x00\x00\x00" /* enc key length */
14767 "\x00\x00\x00\x00\x00\x00\x00\x00"
14768 "\x00\x00\x00\x00\x00\x00\x00\x00",
14769 .klen = 8 + 16 + 0,
14770 .iv = "",
14771 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14772 .ilen = 8,
14773 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14774 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14775 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14776 .rlen = 8 + 16,
14777 }, { /* Input data from RFC 2410 Case 2 */
14778#ifdef __LITTLE_ENDIAN
14779 .key = "\x08\x00" /* rta length */
14780 "\x01\x00" /* rta type */
14781#else
14782 .key = "\x00\x08" /* rta length */
14783 "\x00\x01" /* rta type */
14784#endif
14785 "\x00\x00\x00\x00" /* enc key length */
14786 "\x00\x00\x00\x00\x00\x00\x00\x00"
14787 "\x00\x00\x00\x00\x00\x00\x00\x00",
14788 .klen = 8 + 16 + 0,
14789 .iv = "",
14790 .input = "Network Security People Have A Strange Sense Of Humor",
14791 .ilen = 53,
14792 .result = "Network Security People Have A Strange Sense Of Humor"
14793 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14794 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14795 .rlen = 53 + 16,
14796 },
14797};
14798
14799static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14800 {
14801#ifdef __LITTLE_ENDIAN
14802 .key = "\x08\x00" /* rta length */
14803 "\x01\x00" /* rta type */
14804#else
14805 .key = "\x00\x08" /* rta length */
14806 "\x00\x01" /* rta type */
14807#endif
14808 "\x00\x00\x00\x00" /* enc key length */
14809 "\x00\x00\x00\x00\x00\x00\x00\x00"
14810 "\x00\x00\x00\x00\x00\x00\x00\x00",
14811 .klen = 8 + 16 + 0,
14812 .iv = "",
14813 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14814 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14815 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14816 .ilen = 8 + 16,
14817 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14818 .rlen = 8,
14819 }, {
14820#ifdef __LITTLE_ENDIAN
14821 .key = "\x08\x00" /* rta length */
14822 "\x01\x00" /* rta type */
14823#else
14824 .key = "\x00\x08" /* rta length */
14825 "\x00\x01" /* rta type */
14826#endif
14827 "\x00\x00\x00\x00" /* enc key length */
14828 "\x00\x00\x00\x00\x00\x00\x00\x00"
14829 "\x00\x00\x00\x00\x00\x00\x00\x00",
14830 .klen = 8 + 16 + 0,
14831 .iv = "",
14832 .input = "Network Security People Have A Strange Sense Of Humor"
14833 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14834 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14835 .ilen = 53 + 16,
14836 .result = "Network Security People Have A Strange Sense Of Humor",
14837 .rlen = 53,
14838 },
14839};
14840
Nitesh Lal5208ed22014-05-21 17:09:08 +053014841static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030014842 { /* RFC 3602 Case 1 */
14843#ifdef __LITTLE_ENDIAN
14844 .key = "\x08\x00" /* rta length */
14845 "\x01\x00" /* rta type */
14846#else
14847 .key = "\x00\x08" /* rta length */
14848 "\x00\x01" /* rta type */
14849#endif
14850 "\x00\x00\x00\x10" /* enc key length */
14851 "\x00\x00\x00\x00\x00\x00\x00\x00"
14852 "\x00\x00\x00\x00\x00\x00\x00\x00"
14853 "\x00\x00\x00\x00"
14854 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14855 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14856 .klen = 8 + 20 + 16,
14857 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14858 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14859 .input = "Single block msg",
14860 .ilen = 16,
14861 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14862 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14863 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
14864 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
14865 "\x03\x71\xa2\x06",
14866 .rlen = 16 + 20,
14867 }, { /* RFC 3602 Case 2 */
14868#ifdef __LITTLE_ENDIAN
14869 .key = "\x08\x00" /* rta length */
14870 "\x01\x00" /* rta type */
14871#else
14872 .key = "\x00\x08" /* rta length */
14873 "\x00\x01" /* rta type */
14874#endif
14875 "\x00\x00\x00\x10" /* enc key length */
14876 "\x20\x21\x22\x23\x24\x25\x26\x27"
14877 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14878 "\x30\x31\x32\x33"
14879 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14880 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14881 .klen = 8 + 20 + 16,
14882 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14883 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14884 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14885 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14886 "\x10\x11\x12\x13\x14\x15\x16\x17"
14887 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14888 .ilen = 32,
14889 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14890 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14891 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14892 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14893 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
14894 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
14895 "\x65\x39\xf8\xde",
14896 .rlen = 32 + 20,
14897 }, { /* RFC 3602 Case 3 */
14898#ifdef __LITTLE_ENDIAN
14899 .key = "\x08\x00" /* rta length */
14900 "\x01\x00" /* rta type */
14901#else
14902 .key = "\x00\x08" /* rta length */
14903 "\x00\x01" /* rta type */
14904#endif
14905 "\x00\x00\x00\x10" /* enc key length */
14906 "\x11\x22\x33\x44\x55\x66\x77\x88"
14907 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14908 "\x22\x33\x44\x55"
14909 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14910 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14911 .klen = 8 + 20 + 16,
14912 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14913 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14914 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14915 .ilen = 48,
14916 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14917 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14918 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14919 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14920 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14921 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14922 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
14923 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
14924 "\x8d\x62\xf2\x1e",
14925 .rlen = 48 + 20,
14926 }, { /* RFC 3602 Case 4 */
14927#ifdef __LITTLE_ENDIAN
14928 .key = "\x08\x00" /* rta length */
14929 "\x01\x00" /* rta type */
14930#else
14931 .key = "\x00\x08" /* rta length */
14932 "\x00\x01" /* rta type */
14933#endif
14934 "\x00\x00\x00\x10" /* enc key length */
14935 "\x11\x22\x33\x44\x55\x66\x77\x88"
14936 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14937 "\x22\x33\x44\x55"
14938 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14939 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14940 .klen = 8 + 20 + 16,
14941 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14942 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14943 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14944 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14945 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14946 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14947 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14948 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14949 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14950 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14951 .ilen = 64,
14952 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14953 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14954 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14955 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14956 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14957 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14958 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14959 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14960 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
14961 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
14962 "\x1d\xbe\xc6\xe9",
14963 .rlen = 64 + 20,
14964 }, { /* RFC 3602 Case 5 */
14965#ifdef __LITTLE_ENDIAN
14966 .key = "\x08\x00" /* rta length */
14967 "\x01\x00" /* rta type */
14968#else
14969 .key = "\x00\x08" /* rta length */
14970 "\x00\x01" /* rta type */
14971#endif
14972 "\x00\x00\x00\x10" /* enc key length */
14973 "\x11\x22\x33\x44\x55\x66\x77\x88"
14974 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14975 "\x22\x33\x44\x55"
14976 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14977 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14978 .klen = 8 + 20 + 16,
14979 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14980 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14981 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14982 .alen = 8,
14983 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14984 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14985 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14986 "\x10\x11\x12\x13\x14\x15\x16\x17"
14987 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14988 "\x20\x21\x22\x23\x24\x25\x26\x27"
14989 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14990 "\x30\x31\x32\x33\x34\x35\x36\x37"
14991 "\x01\x02\x03\x04\x05\x06\x07\x08"
14992 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14993 .ilen = 80,
14994 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14995 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14996 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14997 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14998 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14999 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15000 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15001 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15002 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15003 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15004 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15005 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15006 "\x85\xe1\x59\xf7",
15007 .rlen = 80 + 20,
15008 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15009#ifdef __LITTLE_ENDIAN
15010 .key = "\x08\x00" /* rta length */
15011 "\x01\x00" /* rta type */
15012#else
15013 .key = "\x00\x08" /* rta length */
15014 "\x00\x01" /* rta type */
15015#endif
15016 "\x00\x00\x00\x18" /* enc key length */
15017 "\x11\x22\x33\x44\x55\x66\x77\x88"
15018 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15019 "\x22\x33\x44\x55"
15020 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15021 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15022 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15023 .klen = 8 + 20 + 24,
15024 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15025 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15026 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15027 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15028 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15029 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15030 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15031 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15032 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15033 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15034 .ilen = 64,
15035 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15036 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15037 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15038 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15039 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15040 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15041 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15042 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15043 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15044 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15045 "\x47\x4c\xfc\x36",
15046 .rlen = 64 + 20,
15047 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15048#ifdef __LITTLE_ENDIAN
15049 .key = "\x08\x00" /* rta length */
15050 "\x01\x00" /* rta type */
15051#else
15052 .key = "\x00\x08" /* rta length */
15053 "\x00\x01" /* rta type */
15054#endif
15055 "\x00\x00\x00\x20" /* enc key length */
15056 "\x11\x22\x33\x44\x55\x66\x77\x88"
15057 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15058 "\x22\x33\x44\x55"
15059 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15060 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15061 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15062 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15063 .klen = 8 + 20 + 32,
15064 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15065 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15066 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15067 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15068 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15069 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15070 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15071 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15072 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15073 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15074 .ilen = 64,
15075 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15076 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15077 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15078 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15079 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15080 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15081 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15082 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15083 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15084 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15085 "\x51\xee\xd6\x4e",
15086 .rlen = 64 + 20,
15087 },
15088};
15089
Nitesh Lal5208ed22014-05-21 17:09:08 +053015090static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015091 { /* Input data from RFC 2410 Case 1 */
15092#ifdef __LITTLE_ENDIAN
15093 .key = "\x08\x00" /* rta length */
15094 "\x01\x00" /* rta type */
15095#else
15096 .key = "\x00\x08" /* rta length */
15097 "\x00\x01" /* rta type */
15098#endif
15099 "\x00\x00\x00\x00" /* enc key length */
15100 "\x00\x00\x00\x00\x00\x00\x00\x00"
15101 "\x00\x00\x00\x00\x00\x00\x00\x00"
15102 "\x00\x00\x00\x00",
15103 .klen = 8 + 20 + 0,
15104 .iv = "",
15105 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15106 .ilen = 8,
15107 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15108 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15109 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15110 "\x8c\x5e\xe4\x08",
15111 .rlen = 8 + 20,
15112 }, { /* Input data from RFC 2410 Case 2 */
15113#ifdef __LITTLE_ENDIAN
15114 .key = "\x08\x00" /* rta length */
15115 "\x01\x00" /* rta type */
15116#else
15117 .key = "\x00\x08" /* rta length */
15118 "\x00\x01" /* rta type */
15119#endif
15120 "\x00\x00\x00\x00" /* enc key length */
15121 "\x00\x00\x00\x00\x00\x00\x00\x00"
15122 "\x00\x00\x00\x00\x00\x00\x00\x00"
15123 "\x00\x00\x00\x00",
15124 .klen = 8 + 20 + 0,
15125 .iv = "",
15126 .input = "Network Security People Have A Strange Sense Of Humor",
15127 .ilen = 53,
15128 .result = "Network Security People Have A Strange Sense Of Humor"
15129 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15130 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15131 "\x91\x56\xe4\xd6",
15132 .rlen = 53 + 20,
15133 },
15134};
15135
Nitesh Lal5208ed22014-05-21 17:09:08 +053015136static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015137 {
15138#ifdef __LITTLE_ENDIAN
15139 .key = "\x08\x00" /* rta length */
15140 "\x01\x00" /* rta type */
15141#else
15142 .key = "\x00\x08" /* rta length */
15143 "\x00\x01" /* rta type */
15144#endif
15145 "\x00\x00\x00\x00" /* enc key length */
15146 "\x00\x00\x00\x00\x00\x00\x00\x00"
15147 "\x00\x00\x00\x00\x00\x00\x00\x00"
15148 "\x00\x00\x00\x00",
15149 .klen = 8 + 20 + 0,
15150 .iv = "",
15151 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15152 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15153 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15154 "\x8c\x5e\xe4\x08",
15155 .ilen = 8 + 20,
15156 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15157 .rlen = 8,
15158 }, {
15159#ifdef __LITTLE_ENDIAN
15160 .key = "\x08\x00" /* rta length */
15161 "\x01\x00" /* rta type */
15162#else
15163 .key = "\x00\x08" /* rta length */
15164 "\x00\x01" /* rta type */
15165#endif
15166 "\x00\x00\x00\x00" /* enc key length */
15167 "\x00\x00\x00\x00\x00\x00\x00\x00"
15168 "\x00\x00\x00\x00\x00\x00\x00\x00"
15169 "\x00\x00\x00\x00",
15170 .klen = 8 + 20 + 0,
15171 .iv = "",
15172 .input = "Network Security People Have A Strange Sense Of Humor"
15173 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15174 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15175 "\x91\x56\xe4\xd6",
15176 .ilen = 53 + 20,
15177 .result = "Network Security People Have A Strange Sense Of Humor",
15178 .rlen = 53,
15179 },
15180};
15181
Nitesh Lal5208ed22014-05-21 17:09:08 +053015182static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015183 { /* RFC 3602 Case 1 */
15184#ifdef __LITTLE_ENDIAN
15185 .key = "\x08\x00" /* rta length */
15186 "\x01\x00" /* rta type */
15187#else
15188 .key = "\x00\x08" /* rta length */
15189 "\x00\x01" /* rta type */
15190#endif
15191 "\x00\x00\x00\x10" /* enc key length */
15192 "\x00\x00\x00\x00\x00\x00\x00\x00"
15193 "\x00\x00\x00\x00\x00\x00\x00\x00"
15194 "\x00\x00\x00\x00\x00\x00\x00\x00"
15195 "\x00\x00\x00\x00\x00\x00\x00\x00"
15196 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15197 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15198 .klen = 8 + 32 + 16,
15199 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15200 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15201 .input = "Single block msg",
15202 .ilen = 16,
15203 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15204 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15205 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15206 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15207 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15208 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15209 .rlen = 16 + 32,
15210 }, { /* RFC 3602 Case 2 */
15211#ifdef __LITTLE_ENDIAN
15212 .key = "\x08\x00" /* rta length */
15213 "\x01\x00" /* rta type */
15214#else
15215 .key = "\x00\x08" /* rta length */
15216 "\x00\x01" /* rta type */
15217#endif
15218 "\x00\x00\x00\x10" /* enc key length */
15219 "\x20\x21\x22\x23\x24\x25\x26\x27"
15220 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15221 "\x30\x31\x32\x33\x34\x35\x36\x37"
15222 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15223 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15224 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15225 .klen = 8 + 32 + 16,
15226 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15227 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15228 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15229 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15230 "\x10\x11\x12\x13\x14\x15\x16\x17"
15231 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15232 .ilen = 32,
15233 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15234 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15235 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15236 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15237 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15238 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15239 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15240 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15241 .rlen = 32 + 32,
15242 }, { /* RFC 3602 Case 3 */
15243#ifdef __LITTLE_ENDIAN
15244 .key = "\x08\x00" /* rta length */
15245 "\x01\x00" /* rta type */
15246#else
15247 .key = "\x00\x08" /* rta length */
15248 "\x00\x01" /* rta type */
15249#endif
15250 "\x00\x00\x00\x10" /* enc key length */
15251 "\x11\x22\x33\x44\x55\x66\x77\x88"
15252 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15253 "\x22\x33\x44\x55\x66\x77\x88\x99"
15254 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15255 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15256 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15257 .klen = 8 + 32 + 16,
15258 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15259 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15260 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15261 .ilen = 48,
15262 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15263 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15264 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15265 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15266 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15267 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15268 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15269 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15270 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15271 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15272 .rlen = 48 + 32,
15273 }, { /* RFC 3602 Case 4 */
15274#ifdef __LITTLE_ENDIAN
15275 .key = "\x08\x00" /* rta length */
15276 "\x01\x00" /* rta type */
15277#else
15278 .key = "\x00\x08" /* rta length */
15279 "\x00\x01" /* rta type */
15280#endif
15281 "\x00\x00\x00\x10" /* enc key length */
15282 "\x11\x22\x33\x44\x55\x66\x77\x88"
15283 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15284 "\x22\x33\x44\x55\x66\x77\x88\x99"
15285 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15286 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15287 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15288 .klen = 8 + 32 + 16,
15289 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15290 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15291 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15292 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15293 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15294 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15295 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15296 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15297 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15298 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15299 .ilen = 64,
15300 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15301 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15302 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15303 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15304 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15305 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15306 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15307 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15308 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15309 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15310 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15311 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15312 .rlen = 64 + 32,
15313 }, { /* RFC 3602 Case 5 */
15314#ifdef __LITTLE_ENDIAN
15315 .key = "\x08\x00" /* rta length */
15316 "\x01\x00" /* rta type */
15317#else
15318 .key = "\x00\x08" /* rta length */
15319 "\x00\x01" /* rta type */
15320#endif
15321 "\x00\x00\x00\x10" /* enc key length */
15322 "\x11\x22\x33\x44\x55\x66\x77\x88"
15323 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15324 "\x22\x33\x44\x55\x66\x77\x88\x99"
15325 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15326 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15327 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15328 .klen = 8 + 32 + 16,
15329 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15330 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15331 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15332 .alen = 8,
15333 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15334 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15336 "\x10\x11\x12\x13\x14\x15\x16\x17"
15337 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15338 "\x20\x21\x22\x23\x24\x25\x26\x27"
15339 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15340 "\x30\x31\x32\x33\x34\x35\x36\x37"
15341 "\x01\x02\x03\x04\x05\x06\x07\x08"
15342 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15343 .ilen = 80,
15344 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15345 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15346 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15347 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15348 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15349 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15350 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15351 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15352 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15353 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15354 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15355 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15356 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15357 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15358 .rlen = 80 + 32,
15359 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15360#ifdef __LITTLE_ENDIAN
15361 .key = "\x08\x00" /* rta length */
15362 "\x01\x00" /* rta type */
15363#else
15364 .key = "\x00\x08" /* rta length */
15365 "\x00\x01" /* rta type */
15366#endif
15367 "\x00\x00\x00\x18" /* enc key length */
15368 "\x11\x22\x33\x44\x55\x66\x77\x88"
15369 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15370 "\x22\x33\x44\x55\x66\x77\x88\x99"
15371 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15372 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15373 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15374 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15375 .klen = 8 + 32 + 24,
15376 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15377 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15378 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15379 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15380 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15381 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15382 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15383 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15384 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15385 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15386 .ilen = 64,
15387 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15388 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15389 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15390 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15391 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15392 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15393 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15394 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15395 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15396 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15397 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15398 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15399 .rlen = 64 + 32,
15400 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15401#ifdef __LITTLE_ENDIAN
15402 .key = "\x08\x00" /* rta length */
15403 "\x01\x00" /* rta type */
15404#else
15405 .key = "\x00\x08" /* rta length */
15406 "\x00\x01" /* rta type */
15407#endif
15408 "\x00\x00\x00\x20" /* enc key length */
15409 "\x11\x22\x33\x44\x55\x66\x77\x88"
15410 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15411 "\x22\x33\x44\x55\x66\x77\x88\x99"
15412 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15413 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15414 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15415 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15416 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15417 .klen = 8 + 32 + 32,
15418 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15419 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15420 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15421 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15422 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15423 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15424 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15425 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15426 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15427 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15428 .ilen = 64,
15429 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15430 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15431 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15432 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15433 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15434 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15435 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15436 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15437 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15438 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15439 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15440 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15441 .rlen = 64 + 32,
15442 },
15443};
15444
Nitesh Lal5208ed22014-05-21 17:09:08 +053015445static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015446 { /* RFC 3602 Case 1 */
15447#ifdef __LITTLE_ENDIAN
15448 .key = "\x08\x00" /* rta length */
15449 "\x01\x00" /* rta type */
15450#else
15451 .key = "\x00\x08" /* rta length */
15452 "\x00\x01" /* rta type */
15453#endif
15454 "\x00\x00\x00\x10" /* enc key length */
15455 "\x00\x00\x00\x00\x00\x00\x00\x00"
15456 "\x00\x00\x00\x00\x00\x00\x00\x00"
15457 "\x00\x00\x00\x00\x00\x00\x00\x00"
15458 "\x00\x00\x00\x00\x00\x00\x00\x00"
15459 "\x00\x00\x00\x00\x00\x00\x00\x00"
15460 "\x00\x00\x00\x00\x00\x00\x00\x00"
15461 "\x00\x00\x00\x00\x00\x00\x00\x00"
15462 "\x00\x00\x00\x00\x00\x00\x00\x00"
15463 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15464 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15465 .klen = 8 + 64 + 16,
15466 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15467 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15468 .input = "Single block msg",
15469 .ilen = 16,
15470 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15471 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15472 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15473 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15474 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15475 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15476 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15477 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15478 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15479 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15480 .rlen = 16 + 64,
15481 }, { /* RFC 3602 Case 2 */
15482#ifdef __LITTLE_ENDIAN
15483 .key = "\x08\x00" /* rta length */
15484 "\x01\x00" /* rta type */
15485#else
15486 .key = "\x00\x08" /* rta length */
15487 "\x00\x01" /* rta type */
15488#endif
15489 "\x00\x00\x00\x10" /* enc key length */
15490 "\x20\x21\x22\x23\x24\x25\x26\x27"
15491 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15492 "\x30\x31\x32\x33\x34\x35\x36\x37"
15493 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15494 "\x40\x41\x42\x43\x44\x45\x46\x47"
15495 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15496 "\x50\x51\x52\x53\x54\x55\x56\x57"
15497 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15498 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15499 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15500 .klen = 8 + 64 + 16,
15501 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15502 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15503 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15504 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15505 "\x10\x11\x12\x13\x14\x15\x16\x17"
15506 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15507 .ilen = 32,
15508 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15509 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15510 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15511 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15512 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15513 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15514 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15515 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15516 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15517 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15518 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15519 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15520 .rlen = 32 + 64,
15521 }, { /* RFC 3602 Case 3 */
15522#ifdef __LITTLE_ENDIAN
15523 .key = "\x08\x00" /* rta length */
15524 "\x01\x00" /* rta type */
15525#else
15526 .key = "\x00\x08" /* rta length */
15527 "\x00\x01" /* rta type */
15528#endif
15529 "\x00\x00\x00\x10" /* enc key length */
15530 "\x11\x22\x33\x44\x55\x66\x77\x88"
15531 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15532 "\x22\x33\x44\x55\x66\x77\x88\x99"
15533 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15534 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15535 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15536 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15537 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15538 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15539 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15540 .klen = 8 + 64 + 16,
15541 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15542 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15543 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15544 .ilen = 48,
15545 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15546 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15547 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15548 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15549 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15550 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15551 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15552 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15553 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15554 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15555 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15556 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15557 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15558 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15559 .rlen = 48 + 64,
15560 }, { /* RFC 3602 Case 4 */
15561#ifdef __LITTLE_ENDIAN
15562 .key = "\x08\x00" /* rta length */
15563 "\x01\x00" /* rta type */
15564#else
15565 .key = "\x00\x08" /* rta length */
15566 "\x00\x01" /* rta type */
15567#endif
15568 "\x00\x00\x00\x10" /* enc key length */
15569 "\x11\x22\x33\x44\x55\x66\x77\x88"
15570 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15571 "\x22\x33\x44\x55\x66\x77\x88\x99"
15572 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15573 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15574 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15575 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15576 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15577 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15578 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15579 .klen = 8 + 64 + 16,
15580 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15581 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15582 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15583 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15584 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15585 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15586 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15587 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15588 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15589 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15590 .ilen = 64,
15591 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15592 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15593 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15594 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15595 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15596 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15597 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15598 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15599 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15600 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15601 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15602 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15603 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15604 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15605 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15606 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15607 .rlen = 64 + 64,
15608 }, { /* RFC 3602 Case 5 */
15609#ifdef __LITTLE_ENDIAN
15610 .key = "\x08\x00" /* rta length */
15611 "\x01\x00" /* rta type */
15612#else
15613 .key = "\x00\x08" /* rta length */
15614 "\x00\x01" /* rta type */
15615#endif
15616 "\x00\x00\x00\x10" /* enc key length */
15617 "\x11\x22\x33\x44\x55\x66\x77\x88"
15618 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15619 "\x22\x33\x44\x55\x66\x77\x88\x99"
15620 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15621 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15622 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15623 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15624 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15625 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15626 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15627 .klen = 8 + 64 + 16,
15628 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15629 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15630 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15631 .alen = 8,
15632 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15633 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15634 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15635 "\x10\x11\x12\x13\x14\x15\x16\x17"
15636 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15637 "\x20\x21\x22\x23\x24\x25\x26\x27"
15638 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15639 "\x30\x31\x32\x33\x34\x35\x36\x37"
15640 "\x01\x02\x03\x04\x05\x06\x07\x08"
15641 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15642 .ilen = 80,
15643 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15644 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15645 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15646 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15647 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15648 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15649 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15650 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15651 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15652 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15653 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15654 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15655 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15656 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15657 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15658 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15659 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15660 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15661 .rlen = 80 + 64,
15662 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15663#ifdef __LITTLE_ENDIAN
15664 .key = "\x08\x00" /* rta length */
15665 "\x01\x00" /* rta type */
15666#else
15667 .key = "\x00\x08" /* rta length */
15668 "\x00\x01" /* rta type */
15669#endif
15670 "\x00\x00\x00\x18" /* enc key length */
15671 "\x11\x22\x33\x44\x55\x66\x77\x88"
15672 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15673 "\x22\x33\x44\x55\x66\x77\x88\x99"
15674 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15675 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15676 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15677 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15678 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15679 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15680 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15681 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15682 .klen = 8 + 64 + 24,
15683 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15684 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15685 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15686 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15687 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15688 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15689 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15690 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15691 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15692 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15693 .ilen = 64,
15694 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15695 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15696 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15697 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15698 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15699 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15700 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15701 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15702 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15703 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15704 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15705 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15706 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15707 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15708 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15709 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15710 .rlen = 64 + 64,
15711 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15712#ifdef __LITTLE_ENDIAN
15713 .key = "\x08\x00" /* rta length */
15714 "\x01\x00" /* rta type */
15715#else
15716 .key = "\x00\x08" /* rta length */
15717 "\x00\x01" /* rta type */
15718#endif
15719 "\x00\x00\x00\x20" /* enc key length */
15720 "\x11\x22\x33\x44\x55\x66\x77\x88"
15721 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15722 "\x22\x33\x44\x55\x66\x77\x88\x99"
15723 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15724 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15725 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15726 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15727 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15728 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15729 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15730 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15731 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15732 .klen = 8 + 64 + 32,
15733 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15734 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15735 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15736 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15737 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15738 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15739 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15740 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15741 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15742 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15743 .ilen = 64,
15744 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15745 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15746 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15747 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15748 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15749 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15750 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15751 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15752 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15753 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15754 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15755 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15756 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15757 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
15758 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
15759 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
15760 .rlen = 64 + 64,
15761 },
15762};
15763
Nitesh Lal5208ed22014-05-21 17:09:08 +053015764#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
15765
15766static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
15767 { /*Generated with cryptopp*/
15768#ifdef __LITTLE_ENDIAN
15769 .key = "\x08\x00" /* rta length */
15770 "\x01\x00" /* rta type */
15771#else
15772 .key = "\x00\x08" /* rta length */
15773 "\x00\x01" /* rta type */
15774#endif
15775 "\x00\x00\x00\x08" /* enc key length */
15776 "\x11\x22\x33\x44\x55\x66\x77\x88"
15777 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15778 "\x22\x33\x44\x55"
15779 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15780 .klen = 8 + 20 + 8,
15781 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15782 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15783 .alen = 8,
15784 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15785 "\x53\x20\x63\x65\x65\x72\x73\x74"
15786 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15787 "\x20\x79\x65\x53\x72\x63\x74\x65"
15788 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15789 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15790 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15791 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15792 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15793 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15794 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15795 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15796 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15797 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15798 "\x63\x65\x65\x72\x73\x74\x54\x20"
15799 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15800 .ilen = 128,
15801 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15802 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15803 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15804 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15805 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15806 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15807 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15808 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15809 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15810 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15811 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15812 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15813 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15814 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15815 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15816 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15817 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
15818 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
15819 "\x5c\x44\xa9\x37",
15820 .rlen = 128 + 20,
15821 },
15822};
15823
15824#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
15825
15826static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
15827 { /*Generated with cryptopp*/
15828#ifdef __LITTLE_ENDIAN
15829 .key = "\x08\x00" /* rta length */
15830 "\x01\x00" /* rta type */
15831#else
15832 .key = "\x00\x08" /* rta length */
15833 "\x00\x01" /* rta type */
15834#endif
15835 "\x00\x00\x00\x08" /* enc key length */
15836 "\x11\x22\x33\x44\x55\x66\x77\x88"
15837 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15838 "\x22\x33\x44\x55\x66\x77\x88\x99"
15839 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15840 .klen = 8 + 24 + 8,
15841 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15842 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15843 .alen = 8,
15844 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15845 "\x53\x20\x63\x65\x65\x72\x73\x74"
15846 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15847 "\x20\x79\x65\x53\x72\x63\x74\x65"
15848 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15849 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15850 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15851 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15852 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15853 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15854 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15855 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15856 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15857 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15858 "\x63\x65\x65\x72\x73\x74\x54\x20"
15859 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15860 .ilen = 128,
15861 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15862 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15863 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15864 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15865 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15866 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15867 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15868 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15869 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15870 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15871 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15872 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15873 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15874 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15875 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15876 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15877 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
15878 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
15879 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
15880 .rlen = 128 + 24,
15881 },
15882};
15883
15884#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
15885
15886static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
15887 { /*Generated with cryptopp*/
15888#ifdef __LITTLE_ENDIAN
15889 .key = "\x08\x00" /* rta length */
15890 "\x01\x00" /* rta type */
15891#else
15892 .key = "\x00\x08" /* rta length */
15893 "\x00\x01" /* rta type */
15894#endif
15895 "\x00\x00\x00\x08" /* enc key length */
15896 "\x11\x22\x33\x44\x55\x66\x77\x88"
15897 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15898 "\x22\x33\x44\x55\x66\x77\x88\x99"
15899 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15900 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15901 .klen = 8 + 32 + 8,
15902 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15903 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15904 .alen = 8,
15905 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15906 "\x53\x20\x63\x65\x65\x72\x73\x74"
15907 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15908 "\x20\x79\x65\x53\x72\x63\x74\x65"
15909 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15910 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15911 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15912 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15913 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15914 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15915 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15916 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15917 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15918 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15919 "\x63\x65\x65\x72\x73\x74\x54\x20"
15920 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15921 .ilen = 128,
15922 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15923 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15924 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15925 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15926 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15927 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15928 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15929 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15930 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15931 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15932 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15933 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15934 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15935 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15936 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15937 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15938 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
15939 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
15940 "\xde\x63\xde\x76\x52\xde\x9f\xba"
15941 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
15942 .rlen = 128 + 32,
15943 },
15944};
15945
15946#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
15947
15948static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
15949 { /*Generated with cryptopp*/
15950#ifdef __LITTLE_ENDIAN
15951 .key = "\x08\x00" /* rta length */
15952 "\x01\x00" /* rta type */
15953#else
15954 .key = "\x00\x08" /* rta length */
15955 "\x00\x01" /* rta type */
15956#endif
15957 "\x00\x00\x00\x08" /* enc key length */
15958 "\x11\x22\x33\x44\x55\x66\x77\x88"
15959 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15960 "\x22\x33\x44\x55\x66\x77\x88\x99"
15961 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15962 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15963 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15964 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15965 .klen = 8 + 48 + 8,
15966 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15967 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15968 .alen = 8,
15969 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15970 "\x53\x20\x63\x65\x65\x72\x73\x74"
15971 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15972 "\x20\x79\x65\x53\x72\x63\x74\x65"
15973 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15974 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15975 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15976 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15977 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15978 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15979 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15980 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15981 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15982 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15983 "\x63\x65\x65\x72\x73\x74\x54\x20"
15984 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15985 .ilen = 128,
15986 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15987 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15988 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15989 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15990 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15991 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15992 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15993 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15994 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15995 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15996 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15997 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15998 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15999 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16000 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16001 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16002 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16003 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16004 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16005 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16006 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16007 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16008 .rlen = 128 + 48,
16009 },
16010};
16011
16012#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16013
16014static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16015 { /*Generated with cryptopp*/
16016#ifdef __LITTLE_ENDIAN
16017 .key = "\x08\x00" /* rta length */
16018 "\x01\x00" /* rta type */
16019#else
16020 .key = "\x00\x08" /* rta length */
16021 "\x00\x01" /* rta type */
16022#endif
16023 "\x00\x00\x00\x08" /* enc key length */
16024 "\x11\x22\x33\x44\x55\x66\x77\x88"
16025 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16026 "\x22\x33\x44\x55\x66\x77\x88\x99"
16027 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16028 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16029 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16030 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16031 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16032 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16033 .klen = 8 + 64 + 8,
16034 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16035 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16036 .alen = 8,
16037 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16038 "\x53\x20\x63\x65\x65\x72\x73\x74"
16039 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16040 "\x20\x79\x65\x53\x72\x63\x74\x65"
16041 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16042 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16043 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16044 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16045 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16046 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16047 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16048 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16049 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16050 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16051 "\x63\x65\x65\x72\x73\x74\x54\x20"
16052 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16053 .ilen = 128,
16054 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16055 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16056 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16057 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16058 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16059 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16060 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16061 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16062 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16063 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16064 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16065 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16066 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16067 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16068 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16069 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16070 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16071 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16072 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16073 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16074 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16075 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16076 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16077 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16078 .rlen = 128 + 64,
16079 },
16080};
16081
16082#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16083
16084static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16085 { /*Generated with cryptopp*/
16086#ifdef __LITTLE_ENDIAN
16087 .key = "\x08\x00" /* rta length */
16088 "\x01\x00" /* rta type */
16089#else
16090 .key = "\x00\x08" /* rta length */
16091 "\x00\x01" /* rta type */
16092#endif
16093 "\x00\x00\x00\x18" /* enc key length */
16094 "\x11\x22\x33\x44\x55\x66\x77\x88"
16095 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16096 "\x22\x33\x44\x55"
16097 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16098 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16099 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16100 .klen = 8 + 20 + 24,
16101 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16102 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16103 .alen = 8,
16104 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16105 "\x53\x20\x63\x65\x65\x72\x73\x74"
16106 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16107 "\x20\x79\x65\x53\x72\x63\x74\x65"
16108 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16109 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16110 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16111 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16112 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16113 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16114 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16115 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16116 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16117 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16118 "\x63\x65\x65\x72\x73\x74\x54\x20"
16119 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16120 .ilen = 128,
16121 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16122 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16123 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16124 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16125 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16126 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16127 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16128 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16129 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16130 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16131 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16132 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16133 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16134 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16135 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16136 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16137 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16138 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16139 "\xd1\x60\x91\xb3",
16140 .rlen = 128 + 20,
16141 },
16142};
16143
16144#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16145
16146static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16147 { /*Generated with cryptopp*/
16148#ifdef __LITTLE_ENDIAN
16149 .key = "\x08\x00" /* rta length */
16150 "\x01\x00" /* rta type */
16151#else
16152 .key = "\x00\x08" /* rta length */
16153 "\x00\x01" /* rta type */
16154#endif
16155 "\x00\x00\x00\x18" /* enc key length */
16156 "\x11\x22\x33\x44\x55\x66\x77\x88"
16157 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16158 "\x22\x33\x44\x55\x66\x77\x88\x99"
16159 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16160 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16161 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16162 .klen = 8 + 24 + 24,
16163 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16164 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16165 .alen = 8,
16166 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16167 "\x53\x20\x63\x65\x65\x72\x73\x74"
16168 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16169 "\x20\x79\x65\x53\x72\x63\x74\x65"
16170 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16171 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16172 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16173 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16174 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16175 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16176 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16177 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16178 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16179 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16180 "\x63\x65\x65\x72\x73\x74\x54\x20"
16181 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16182 .ilen = 128,
16183 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16184 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16185 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16186 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16187 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16188 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16189 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16190 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16191 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16192 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16193 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16194 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16195 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16196 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16197 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16198 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16199 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16200 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16201 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16202 .rlen = 128 + 24,
16203 },
16204};
16205
16206#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16207
16208static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16209 { /*Generated with cryptopp*/
16210#ifdef __LITTLE_ENDIAN
16211 .key = "\x08\x00" /* rta length */
16212 "\x01\x00" /* rta type */
16213#else
16214 .key = "\x00\x08" /* rta length */
16215 "\x00\x01" /* rta type */
16216#endif
16217 "\x00\x00\x00\x18" /* enc key length */
16218 "\x11\x22\x33\x44\x55\x66\x77\x88"
16219 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16220 "\x22\x33\x44\x55\x66\x77\x88\x99"
16221 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16222 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16223 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16224 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16225 .klen = 8 + 32 + 24,
16226 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16227 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16228 .alen = 8,
16229 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16230 "\x53\x20\x63\x65\x65\x72\x73\x74"
16231 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16232 "\x20\x79\x65\x53\x72\x63\x74\x65"
16233 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16234 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16235 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16236 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16237 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16238 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16239 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16240 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16241 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16242 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16243 "\x63\x65\x65\x72\x73\x74\x54\x20"
16244 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16245 .ilen = 128,
16246 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16247 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16248 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16249 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16250 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16251 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16252 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16253 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16254 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16255 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16256 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16257 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16258 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16259 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16260 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16261 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16262 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16263 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16264 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16265 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16266 .rlen = 128 + 32,
16267 },
16268};
16269
16270#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16271
16272static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16273 { /*Generated with cryptopp*/
16274#ifdef __LITTLE_ENDIAN
16275 .key = "\x08\x00" /* rta length */
16276 "\x01\x00" /* rta type */
16277#else
16278 .key = "\x00\x08" /* rta length */
16279 "\x00\x01" /* rta type */
16280#endif
16281 "\x00\x00\x00\x18" /* enc key length */
16282 "\x11\x22\x33\x44\x55\x66\x77\x88"
16283 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16284 "\x22\x33\x44\x55\x66\x77\x88\x99"
16285 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16286 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16287 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16288 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16289 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16290 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16291 .klen = 8 + 48 + 24,
16292 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16293 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16294 .alen = 8,
16295 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16296 "\x53\x20\x63\x65\x65\x72\x73\x74"
16297 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16298 "\x20\x79\x65\x53\x72\x63\x74\x65"
16299 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16300 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16301 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16302 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16303 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16304 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16305 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16306 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16307 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16308 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16309 "\x63\x65\x65\x72\x73\x74\x54\x20"
16310 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16311 .ilen = 128,
16312 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16313 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16314 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16315 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16316 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16317 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16318 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16319 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16320 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16321 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16322 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16323 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16324 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16325 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16326 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16327 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16328 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16329 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16330 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16331 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16332 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16333 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16334 .rlen = 128 + 48,
16335 },
16336};
16337
16338#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16339
16340static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16341 { /*Generated with cryptopp*/
16342#ifdef __LITTLE_ENDIAN
16343 .key = "\x08\x00" /* rta length */
16344 "\x01\x00" /* rta type */
16345#else
16346 .key = "\x00\x08" /* rta length */
16347 "\x00\x01" /* rta type */
16348#endif
16349 "\x00\x00\x00\x18" /* enc key length */
16350 "\x11\x22\x33\x44\x55\x66\x77\x88"
16351 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16352 "\x22\x33\x44\x55\x66\x77\x88\x99"
16353 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16354 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16355 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16356 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16357 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16358 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16359 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16360 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16361 .klen = 8 + 64 + 24,
16362 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16363 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16364 .alen = 8,
16365 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16366 "\x53\x20\x63\x65\x65\x72\x73\x74"
16367 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16368 "\x20\x79\x65\x53\x72\x63\x74\x65"
16369 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16370 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16371 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16372 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16373 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16374 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16375 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16376 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16377 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16378 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16379 "\x63\x65\x65\x72\x73\x74\x54\x20"
16380 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16381 .ilen = 128,
16382 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16383 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16384 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16385 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16386 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16387 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16388 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16389 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16390 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16391 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16392 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16393 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16394 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16395 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16396 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16397 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16398 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16399 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16400 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16401 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16402 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16403 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16404 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16405 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16406 .rlen = 128 + 64,
16407 },
16408};
16409
Herbert Xuda7f0332008-07-31 17:08:25 +080016410static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16411 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16412 { /* LRW-32-AES 1 */
16413 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16414 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16415 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16416 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16417 .klen = 32,
16418 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16419 "\x00\x00\x00\x00\x00\x00\x00\x01",
16420 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16421 "\x38\x39\x41\x42\x43\x44\x45\x46",
16422 .ilen = 16,
16423 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16424 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16425 .rlen = 16,
16426 }, { /* LRW-32-AES 2 */
16427 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16428 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16429 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16430 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16431 .klen = 32,
16432 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16433 "\x00\x00\x00\x00\x00\x00\x00\x02",
16434 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16435 "\x38\x39\x41\x42\x43\x44\x45\x46",
16436 .ilen = 16,
16437 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16438 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16439 .rlen = 16,
16440 }, { /* LRW-32-AES 3 */
16441 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16442 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16443 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16444 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16445 .klen = 32,
16446 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16447 "\x00\x00\x00\x02\x00\x00\x00\x00",
16448 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16449 "\x38\x39\x41\x42\x43\x44\x45\x46",
16450 .ilen = 16,
16451 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16452 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16453 .rlen = 16,
16454 }, { /* LRW-32-AES 4 */
16455 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16456 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16457 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16458 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16459 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16460 .klen = 40,
16461 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16462 "\x00\x00\x00\x00\x00\x00\x00\x01",
16463 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16464 "\x38\x39\x41\x42\x43\x44\x45\x46",
16465 .ilen = 16,
16466 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16467 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16468 .rlen = 16,
16469 }, { /* LRW-32-AES 5 */
16470 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16471 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16472 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16473 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16474 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16475 .klen = 40,
16476 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16477 "\x00\x00\x00\x02\x00\x00\x00\x00",
16478 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16479 "\x38\x39\x41\x42\x43\x44\x45\x46",
16480 .ilen = 16,
16481 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16482 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16483 .rlen = 16,
16484 }, { /* LRW-32-AES 6 */
16485 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16486 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16487 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16488 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16489 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16490 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16491 .klen = 48,
16492 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16493 "\x00\x00\x00\x00\x00\x00\x00\x01",
16494 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16495 "\x38\x39\x41\x42\x43\x44\x45\x46",
16496 .ilen = 16,
16497 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16498 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16499 .rlen = 16,
16500 }, { /* LRW-32-AES 7 */
16501 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16502 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16503 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16504 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16505 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16506 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16507 .klen = 48,
16508 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16509 "\x00\x00\x00\x02\x00\x00\x00\x00",
16510 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16511 "\x38\x39\x41\x42\x43\x44\x45\x46",
16512 .ilen = 16,
16513 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16514 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16515 .rlen = 16,
16516 }, {
16517/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16518 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16519 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16520 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16521 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16522 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16523 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16524 .klen = 48,
16525 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16526 "\x00\x00\x00\x00\x00\x00\x00\x01",
16527 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16528 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16529 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16530 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16531 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16532 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16533 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16534 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16535 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16536 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16537 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16538 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16539 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16540 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16541 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16542 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16543 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16544 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16545 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16546 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16547 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16548 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16549 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16550 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16551 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16552 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16553 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16554 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16555 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16556 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16557 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16558 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16559 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16560 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16561 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16562 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16563 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16564 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16565 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16566 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16567 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16568 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16569 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16570 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16571 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16572 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16573 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16574 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16575 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16576 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16577 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16578 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16579 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16580 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16581 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16582 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16583 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16584 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16585 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16586 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16587 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16588 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16589 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16590 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16591 .ilen = 512,
16592 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16593 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16594 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16595 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16596 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16597 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16598 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16599 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16600 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16601 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16602 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16603 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16604 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16605 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16606 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16607 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16608 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16609 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16610 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16611 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16612 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16613 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16614 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16615 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16616 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16617 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16618 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16619 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16620 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16621 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16622 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16623 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16624 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16625 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16626 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16627 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16628 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16629 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16630 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16631 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16632 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16633 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16634 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16635 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16636 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16637 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16638 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16639 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16640 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16641 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16642 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16643 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16644 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16645 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16646 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16647 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16648 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16649 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16650 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16651 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16652 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16653 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16654 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16655 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16656 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016657 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016658 .np = 3,
16659 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016660 }
16661};
16662
16663static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16664 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16665 /* same as enc vectors with input and result reversed */
16666 { /* LRW-32-AES 1 */
16667 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16668 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16669 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16670 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16671 .klen = 32,
16672 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16673 "\x00\x00\x00\x00\x00\x00\x00\x01",
16674 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16675 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16676 .ilen = 16,
16677 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16678 "\x38\x39\x41\x42\x43\x44\x45\x46",
16679 .rlen = 16,
16680 }, { /* LRW-32-AES 2 */
16681 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16682 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16683 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16684 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16685 .klen = 32,
16686 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16687 "\x00\x00\x00\x00\x00\x00\x00\x02",
16688 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16689 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16690 .ilen = 16,
16691 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16692 "\x38\x39\x41\x42\x43\x44\x45\x46",
16693 .rlen = 16,
16694 }, { /* LRW-32-AES 3 */
16695 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16696 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16697 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16698 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16699 .klen = 32,
16700 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16701 "\x00\x00\x00\x02\x00\x00\x00\x00",
16702 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16703 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16704 .ilen = 16,
16705 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16706 "\x38\x39\x41\x42\x43\x44\x45\x46",
16707 .rlen = 16,
16708 }, { /* LRW-32-AES 4 */
16709 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16710 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16711 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16712 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16713 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16714 .klen = 40,
16715 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16716 "\x00\x00\x00\x00\x00\x00\x00\x01",
16717 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16718 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16719 .ilen = 16,
16720 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16721 "\x38\x39\x41\x42\x43\x44\x45\x46",
16722 .rlen = 16,
16723 }, { /* LRW-32-AES 5 */
16724 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16725 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16726 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16727 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16728 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16729 .klen = 40,
16730 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16731 "\x00\x00\x00\x02\x00\x00\x00\x00",
16732 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16733 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16734 .ilen = 16,
16735 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16736 "\x38\x39\x41\x42\x43\x44\x45\x46",
16737 .rlen = 16,
16738 }, { /* LRW-32-AES 6 */
16739 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16740 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16741 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16742 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16743 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16744 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16745 .klen = 48,
16746 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16747 "\x00\x00\x00\x00\x00\x00\x00\x01",
16748 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16749 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16750 .ilen = 16,
16751 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16752 "\x38\x39\x41\x42\x43\x44\x45\x46",
16753 .rlen = 16,
16754 }, { /* LRW-32-AES 7 */
16755 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16756 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16757 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16758 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16759 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16760 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16761 .klen = 48,
16762 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16763 "\x00\x00\x00\x02\x00\x00\x00\x00",
16764 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16765 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16766 .ilen = 16,
16767 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16768 "\x38\x39\x41\x42\x43\x44\x45\x46",
16769 .rlen = 16,
16770 }, {
16771/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16772 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16773 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16774 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16775 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16776 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16777 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16778 .klen = 48,
16779 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16780 "\x00\x00\x00\x00\x00\x00\x00\x01",
16781 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16782 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16783 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16784 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16785 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16786 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16787 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16788 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16789 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16790 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16791 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16792 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16793 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16794 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16795 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16796 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16797 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16798 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16799 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16800 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16801 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16802 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16803 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16804 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16805 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16806 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16807 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16808 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16809 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16810 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16811 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16812 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16813 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16814 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16815 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16816 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16817 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16818 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16819 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16820 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16821 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16822 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16823 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16824 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16825 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16826 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16827 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16828 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16829 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16830 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16831 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16832 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16833 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16834 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16835 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16836 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16837 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16838 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16839 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16840 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16841 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16842 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16843 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16844 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16845 .ilen = 512,
16846 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16847 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16848 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16849 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16850 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16851 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16852 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16853 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16854 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16855 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16856 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16857 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16858 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16859 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16860 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16861 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16862 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16863 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16864 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16865 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16866 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16867 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16868 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16869 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16870 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16871 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16872 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16873 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16874 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16875 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16876 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16877 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16878 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16879 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16880 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16881 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16882 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16883 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16884 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16885 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16886 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16887 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16888 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16889 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16890 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16891 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16892 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16893 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16894 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16895 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16896 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16897 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16898 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16899 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16900 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16901 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16902 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16903 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16904 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16905 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16906 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16907 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16908 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16909 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16910 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016911 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016912 .np = 3,
16913 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016914 }
16915};
16916
16917static struct cipher_testvec aes_xts_enc_tv_template[] = {
16918 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
16919 { /* XTS-AES 1 */
16920 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
16921 "\x00\x00\x00\x00\x00\x00\x00\x00"
16922 "\x00\x00\x00\x00\x00\x00\x00\x00"
16923 "\x00\x00\x00\x00\x00\x00\x00\x00",
16924 .klen = 32,
16925 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16926 "\x00\x00\x00\x00\x00\x00\x00\x00",
16927 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16928 "\x00\x00\x00\x00\x00\x00\x00\x00"
16929 "\x00\x00\x00\x00\x00\x00\x00\x00"
16930 "\x00\x00\x00\x00\x00\x00\x00\x00",
16931 .ilen = 32,
16932 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
16933 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
16934 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
16935 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
16936 .rlen = 32,
16937 }, { /* XTS-AES 2 */
16938 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
16939 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
16951 "\x39\x33\x40\x38\xac\xef\x83\x8b"
16952 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
16953 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
16954 .rlen = 32,
16955 }, { /* XTS-AES 3 */
16956 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
16957 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
16958 "\x22\x22\x22\x22\x22\x22\x22\x22"
16959 "\x22\x22\x22\x22\x22\x22\x22\x22",
16960 .klen = 32,
16961 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16962 "\x00\x00\x00\x00\x00\x00\x00\x00",
16963 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16964 "\x44\x44\x44\x44\x44\x44\x44\x44"
16965 "\x44\x44\x44\x44\x44\x44\x44\x44"
16966 "\x44\x44\x44\x44\x44\x44\x44\x44",
16967 .ilen = 32,
16968 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
16969 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
16970 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
16971 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
16972 .rlen = 32,
16973 }, { /* XTS-AES 4 */
16974 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16975 "\x23\x53\x60\x28\x74\x71\x35\x26"
16976 "\x31\x41\x59\x26\x53\x58\x97\x93"
16977 "\x23\x84\x62\x64\x33\x83\x27\x95",
16978 .klen = 32,
16979 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16980 "\x00\x00\x00\x00\x00\x00\x00\x00",
16981 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16982 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16983 "\x10\x11\x12\x13\x14\x15\x16\x17"
16984 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16985 "\x20\x21\x22\x23\x24\x25\x26\x27"
16986 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16987 "\x30\x31\x32\x33\x34\x35\x36\x37"
16988 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16989 "\x40\x41\x42\x43\x44\x45\x46\x47"
16990 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16991 "\x50\x51\x52\x53\x54\x55\x56\x57"
16992 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16993 "\x60\x61\x62\x63\x64\x65\x66\x67"
16994 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16995 "\x70\x71\x72\x73\x74\x75\x76\x77"
16996 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16997 "\x80\x81\x82\x83\x84\x85\x86\x87"
16998 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16999 "\x90\x91\x92\x93\x94\x95\x96\x97"
17000 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17001 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17002 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17003 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17004 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17005 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17006 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17007 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17008 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17009 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17010 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17011 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17012 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17013 "\x00\x01\x02\x03\x04\x05\x06\x07"
17014 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17015 "\x10\x11\x12\x13\x14\x15\x16\x17"
17016 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17017 "\x20\x21\x22\x23\x24\x25\x26\x27"
17018 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17019 "\x30\x31\x32\x33\x34\x35\x36\x37"
17020 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17021 "\x40\x41\x42\x43\x44\x45\x46\x47"
17022 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17023 "\x50\x51\x52\x53\x54\x55\x56\x57"
17024 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17025 "\x60\x61\x62\x63\x64\x65\x66\x67"
17026 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17027 "\x70\x71\x72\x73\x74\x75\x76\x77"
17028 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17029 "\x80\x81\x82\x83\x84\x85\x86\x87"
17030 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17031 "\x90\x91\x92\x93\x94\x95\x96\x97"
17032 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17033 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17034 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17035 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17036 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17037 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17038 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17039 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17040 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17041 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17042 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17043 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17044 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17045 .ilen = 512,
17046 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17047 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17048 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17049 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17050 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17051 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17052 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17053 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17054 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17055 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17056 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17057 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17058 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17059 "\x22\x97\x61\x46\xae\x20\xce\x84"
17060 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17061 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17062 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17063 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17064 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17065 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17066 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17067 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17068 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17069 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17070 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17071 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17072 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17073 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17074 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17075 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17076 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17077 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17078 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17079 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17080 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17081 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17082 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17083 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17084 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17085 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17086 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17087 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17088 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17089 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17090 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17091 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17092 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17093 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17094 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17095 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17096 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17097 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17098 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17099 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17100 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17101 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17102 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17103 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17104 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17105 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17106 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17107 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17108 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17109 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17110 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017111 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17112 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17113 "\x23\x53\x60\x28\x74\x71\x35\x26"
17114 "\x62\x49\x77\x57\x24\x70\x93\x69"
17115 "\x99\x59\x57\x49\x66\x96\x76\x27"
17116 "\x31\x41\x59\x26\x53\x58\x97\x93"
17117 "\x23\x84\x62\x64\x33\x83\x27\x95"
17118 "\x02\x88\x41\x97\x16\x93\x99\x37"
17119 "\x51\x05\x82\x09\x74\x94\x45\x92",
17120 .klen = 64,
17121 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17122 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017123 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17124 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17125 "\x10\x11\x12\x13\x14\x15\x16\x17"
17126 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17127 "\x20\x21\x22\x23\x24\x25\x26\x27"
17128 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17129 "\x30\x31\x32\x33\x34\x35\x36\x37"
17130 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17131 "\x40\x41\x42\x43\x44\x45\x46\x47"
17132 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17133 "\x50\x51\x52\x53\x54\x55\x56\x57"
17134 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17135 "\x60\x61\x62\x63\x64\x65\x66\x67"
17136 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17137 "\x70\x71\x72\x73\x74\x75\x76\x77"
17138 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17139 "\x80\x81\x82\x83\x84\x85\x86\x87"
17140 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17141 "\x90\x91\x92\x93\x94\x95\x96\x97"
17142 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17143 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17144 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17145 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17146 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17147 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17148 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17149 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17150 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17151 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17152 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17153 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17154 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17155 "\x00\x01\x02\x03\x04\x05\x06\x07"
17156 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17157 "\x10\x11\x12\x13\x14\x15\x16\x17"
17158 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17159 "\x20\x21\x22\x23\x24\x25\x26\x27"
17160 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17161 "\x30\x31\x32\x33\x34\x35\x36\x37"
17162 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17163 "\x40\x41\x42\x43\x44\x45\x46\x47"
17164 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17165 "\x50\x51\x52\x53\x54\x55\x56\x57"
17166 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17167 "\x60\x61\x62\x63\x64\x65\x66\x67"
17168 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17169 "\x70\x71\x72\x73\x74\x75\x76\x77"
17170 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17171 "\x80\x81\x82\x83\x84\x85\x86\x87"
17172 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17173 "\x90\x91\x92\x93\x94\x95\x96\x97"
17174 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17175 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17176 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17177 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17178 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17179 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17180 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17181 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17182 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17183 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17184 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17185 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17186 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17187 .ilen = 512,
17188 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17189 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17190 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17191 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17192 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17193 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17194 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17195 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17196 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17197 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17198 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17199 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17200 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17201 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17202 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17203 "\x00\x02\x08\x87\x89\x14\x29\xca"
17204 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17205 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17206 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17207 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17208 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17209 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17210 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17211 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17212 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17213 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17214 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17215 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17216 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17217 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17218 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17219 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17220 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17221 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17222 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17223 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17224 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17225 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17226 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17227 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17228 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17229 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17230 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17231 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17232 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17233 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17234 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17235 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17236 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17237 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17238 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17239 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17240 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17241 "\x94\x30\x54\xff\x84\x01\x14\x93"
17242 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17243 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17244 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17245 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17246 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17247 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17248 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17249 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17250 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17251 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17252 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017253 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017254 .np = 3,
17255 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017256 }
17257};
17258
17259static struct cipher_testvec aes_xts_dec_tv_template[] = {
17260 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17261 { /* XTS-AES 1 */
17262 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17263 "\x00\x00\x00\x00\x00\x00\x00\x00"
17264 "\x00\x00\x00\x00\x00\x00\x00\x00"
17265 "\x00\x00\x00\x00\x00\x00\x00\x00",
17266 .klen = 32,
17267 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17268 "\x00\x00\x00\x00\x00\x00\x00\x00",
17269 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17270 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17271 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17272 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17273 .ilen = 32,
17274 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17275 "\x00\x00\x00\x00\x00\x00\x00\x00"
17276 "\x00\x00\x00\x00\x00\x00\x00\x00"
17277 "\x00\x00\x00\x00\x00\x00\x00\x00",
17278 .rlen = 32,
17279 }, { /* XTS-AES 2 */
17280 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17281 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17288 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17289 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17290 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
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 3 */
17298 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17299 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17300 "\x22\x22\x22\x22\x22\x22\x22\x22"
17301 "\x22\x22\x22\x22\x22\x22\x22\x22",
17302 .klen = 32,
17303 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17304 "\x00\x00\x00\x00\x00\x00\x00\x00",
17305 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17306 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17307 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17308 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17309 .ilen = 32,
17310 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17311 "\x44\x44\x44\x44\x44\x44\x44\x44"
17312 "\x44\x44\x44\x44\x44\x44\x44\x44"
17313 "\x44\x44\x44\x44\x44\x44\x44\x44",
17314 .rlen = 32,
17315 }, { /* XTS-AES 4 */
17316 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17317 "\x23\x53\x60\x28\x74\x71\x35\x26"
17318 "\x31\x41\x59\x26\x53\x58\x97\x93"
17319 "\x23\x84\x62\x64\x33\x83\x27\x95",
17320 .klen = 32,
17321 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17322 "\x00\x00\x00\x00\x00\x00\x00\x00",
17323 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17324 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17325 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17326 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17327 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17328 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17329 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17330 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17331 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17332 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17333 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17334 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17335 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17336 "\x22\x97\x61\x46\xae\x20\xce\x84"
17337 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17338 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17339 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17340 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17341 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17342 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17343 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17344 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17345 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17346 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17347 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17348 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17349 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17350 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17351 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17352 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17353 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17354 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17355 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17356 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17357 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17358 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17359 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17360 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17361 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17362 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17363 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17364 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17365 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17366 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17367 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17368 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17369 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17370 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17371 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17372 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17373 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17374 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17375 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17376 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17377 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17378 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17379 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17380 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17381 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17382 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17383 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17384 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17385 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17386 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17387 .ilen = 512,
17388 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17389 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17390 "\x10\x11\x12\x13\x14\x15\x16\x17"
17391 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17392 "\x20\x21\x22\x23\x24\x25\x26\x27"
17393 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17394 "\x30\x31\x32\x33\x34\x35\x36\x37"
17395 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17396 "\x40\x41\x42\x43\x44\x45\x46\x47"
17397 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17398 "\x50\x51\x52\x53\x54\x55\x56\x57"
17399 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17400 "\x60\x61\x62\x63\x64\x65\x66\x67"
17401 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17402 "\x70\x71\x72\x73\x74\x75\x76\x77"
17403 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17404 "\x80\x81\x82\x83\x84\x85\x86\x87"
17405 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17406 "\x90\x91\x92\x93\x94\x95\x96\x97"
17407 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17408 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17409 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17410 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17411 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17412 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17413 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17414 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17415 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17416 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17417 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17418 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17419 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17420 "\x00\x01\x02\x03\x04\x05\x06\x07"
17421 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17422 "\x10\x11\x12\x13\x14\x15\x16\x17"
17423 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17424 "\x20\x21\x22\x23\x24\x25\x26\x27"
17425 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17426 "\x30\x31\x32\x33\x34\x35\x36\x37"
17427 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17428 "\x40\x41\x42\x43\x44\x45\x46\x47"
17429 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17430 "\x50\x51\x52\x53\x54\x55\x56\x57"
17431 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17432 "\x60\x61\x62\x63\x64\x65\x66\x67"
17433 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17434 "\x70\x71\x72\x73\x74\x75\x76\x77"
17435 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17436 "\x80\x81\x82\x83\x84\x85\x86\x87"
17437 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17438 "\x90\x91\x92\x93\x94\x95\x96\x97"
17439 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17440 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17441 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17442 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17443 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17444 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17445 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17446 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17447 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17448 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17449 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17450 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17451 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17452 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017453 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17454 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17455 "\x23\x53\x60\x28\x74\x71\x35\x26"
17456 "\x62\x49\x77\x57\x24\x70\x93\x69"
17457 "\x99\x59\x57\x49\x66\x96\x76\x27"
17458 "\x31\x41\x59\x26\x53\x58\x97\x93"
17459 "\x23\x84\x62\x64\x33\x83\x27\x95"
17460 "\x02\x88\x41\x97\x16\x93\x99\x37"
17461 "\x51\x05\x82\x09\x74\x94\x45\x92",
17462 .klen = 64,
17463 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17464 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017465 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17466 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17467 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17468 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17469 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17470 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17471 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17472 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17473 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17474 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17475 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17476 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17477 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17478 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17479 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17480 "\x00\x02\x08\x87\x89\x14\x29\xca"
17481 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17482 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17483 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17484 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17485 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17486 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17487 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17488 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17489 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17490 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17491 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17492 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17493 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17494 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17495 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17496 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17497 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17498 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17499 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17500 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17501 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17502 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17503 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17504 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17505 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17506 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17507 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17508 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17509 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17510 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17511 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17512 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17513 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17514 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17515 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17516 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17517 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17518 "\x94\x30\x54\xff\x84\x01\x14\x93"
17519 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17520 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17521 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17522 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17523 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17524 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17525 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17526 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17527 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17528 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17529 .ilen = 512,
17530 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17531 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17532 "\x10\x11\x12\x13\x14\x15\x16\x17"
17533 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17534 "\x20\x21\x22\x23\x24\x25\x26\x27"
17535 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17536 "\x30\x31\x32\x33\x34\x35\x36\x37"
17537 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17538 "\x40\x41\x42\x43\x44\x45\x46\x47"
17539 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17540 "\x50\x51\x52\x53\x54\x55\x56\x57"
17541 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17542 "\x60\x61\x62\x63\x64\x65\x66\x67"
17543 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17544 "\x70\x71\x72\x73\x74\x75\x76\x77"
17545 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17546 "\x80\x81\x82\x83\x84\x85\x86\x87"
17547 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17548 "\x90\x91\x92\x93\x94\x95\x96\x97"
17549 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17550 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17551 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17552 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17553 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17554 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17555 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17556 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17557 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17558 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17559 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17560 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17561 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17562 "\x00\x01\x02\x03\x04\x05\x06\x07"
17563 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17564 "\x10\x11\x12\x13\x14\x15\x16\x17"
17565 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17566 "\x20\x21\x22\x23\x24\x25\x26\x27"
17567 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17568 "\x30\x31\x32\x33\x34\x35\x36\x37"
17569 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17570 "\x40\x41\x42\x43\x44\x45\x46\x47"
17571 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17572 "\x50\x51\x52\x53\x54\x55\x56\x57"
17573 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17574 "\x60\x61\x62\x63\x64\x65\x66\x67"
17575 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17576 "\x70\x71\x72\x73\x74\x75\x76\x77"
17577 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17578 "\x80\x81\x82\x83\x84\x85\x86\x87"
17579 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17580 "\x90\x91\x92\x93\x94\x95\x96\x97"
17581 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17582 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17583 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17584 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17585 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17586 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17587 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17588 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17589 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17590 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17591 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17592 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17593 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17594 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017595 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017596 .np = 3,
17597 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017598 }
17599};
17600
17601
17602static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017603 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17604 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17605 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17606 .klen = 16,
17607 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17608 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17609 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17610 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17611 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17612 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17613 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17614 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17615 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17616 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17617 .ilen = 64,
17618 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17619 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17620 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17621 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17622 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17623 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17624 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17625 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17626 .rlen = 64,
17627 }, {
17628 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17629 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17630 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17631 .klen = 24,
17632 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17633 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17634 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17635 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17636 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17637 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17638 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17639 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17640 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17641 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17642 .ilen = 64,
17643 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17644 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17645 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17646 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17647 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17648 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17649 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17650 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17651 .rlen = 64,
17652 }, {
17653 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17654 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17655 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17656 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17657 .klen = 32,
17658 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17659 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17660 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17661 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17662 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17663 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17664 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17665 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17666 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17667 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17668 .ilen = 64,
17669 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17670 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17671 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17672 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17673 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17674 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17675 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17676 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17677 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017678 }, { /* Generated with Crypto++ */
17679 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17680 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17681 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17682 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17683 .klen = 32,
17684 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17685 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17686 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17687 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17688 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17689 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17690 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17691 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17692 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17693 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17694 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17695 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17696 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17697 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17698 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17699 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17700 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17701 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17702 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17703 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17704 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17705 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17706 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17707 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17708 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17709 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17710 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17711 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17712 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17713 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17714 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17715 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17716 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17717 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17718 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17719 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17720 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17721 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17722 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17723 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17724 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17725 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17726 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17727 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17728 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17729 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17730 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17731 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17732 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17733 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17734 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17735 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17736 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17737 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17738 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17739 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17740 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17741 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17742 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17743 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17744 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17745 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17746 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17747 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
17748 .ilen = 496,
17749 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
17750 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
17751 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
17752 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
17753 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
17754 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
17755 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
17756 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
17757 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
17758 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
17759 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
17760 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
17761 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
17762 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
17763 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
17764 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
17765 "\x34\x4B\x31\x69\x84\x66\x96\x44"
17766 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
17767 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
17768 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
17769 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
17770 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
17771 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
17772 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
17773 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
17774 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
17775 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
17776 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
17777 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
17778 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
17779 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
17780 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
17781 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
17782 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
17783 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
17784 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
17785 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
17786 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
17787 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
17788 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
17789 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
17790 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
17791 "\x85\x99\x22\xE8\x91\x38\x70\x83"
17792 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
17793 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
17794 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
17795 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
17796 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
17797 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
17798 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
17799 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
17800 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
17801 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
17802 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
17803 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
17804 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
17805 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
17806 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
17807 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
17808 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
17809 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
17810 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
17811 .rlen = 496,
17812 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017813 .np = 3,
17814 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017815 }, { /* Generated with Crypto++ */
17816 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17817 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17818 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17819 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17820 .klen = 32,
17821 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
17822 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
17823 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17824 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17825 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17826 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17827 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17828 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17829 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17830 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17831 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17832 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17833 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17834 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17835 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17836 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17837 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17838 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17839 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17840 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17841 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17842 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17843 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17844 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17845 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17846 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17847 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17848 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17849 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17850 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17851 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17852 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17853 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17854 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17855 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17856 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17857 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17858 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17859 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17860 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17861 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17862 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17863 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17864 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17865 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17866 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17867 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17868 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17869 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17870 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17871 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17872 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17873 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17874 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17875 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17876 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17877 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17878 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17879 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17880 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17881 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17882 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17883 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17884 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
17885 "\x7B\xE4\x4D",
17886 .ilen = 499,
17887 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
17888 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
17889 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
17890 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
17891 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
17892 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
17893 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
17894 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
17895 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
17896 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
17897 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
17898 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
17899 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
17900 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
17901 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
17902 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
17903 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
17904 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
17905 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
17906 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
17907 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
17908 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
17909 "\x45\x18\x18\x74\x19\xAD\x71\x01"
17910 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
17911 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
17912 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
17913 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
17914 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
17915 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
17916 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
17917 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
17918 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
17919 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
17920 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
17921 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
17922 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
17923 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
17924 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
17925 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
17926 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
17927 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
17928 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
17929 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
17930 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
17931 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
17932 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
17933 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
17934 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
17935 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
17936 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
17937 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
17938 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
17939 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
17940 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
17941 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
17942 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
17943 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
17944 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
17945 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
17946 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
17947 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
17948 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
17949 "\xFB\xF2\x3F",
17950 .rlen = 499,
17951 .also_non_np = 1,
17952 .np = 2,
17953 .tap = { 499 - 16, 16 },
17954 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017955};
17956
17957static struct cipher_testvec aes_ctr_dec_tv_template[] = {
17958 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17959 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17960 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17961 .klen = 16,
17962 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17963 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17964 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17965 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17966 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17967 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17968 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17969 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17970 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17971 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17972 .ilen = 64,
17973 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17974 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17975 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17976 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17977 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17978 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17979 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17980 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17981 .rlen = 64,
17982 }, {
17983 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17984 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17985 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17986 .klen = 24,
17987 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17988 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17989 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17990 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17991 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17992 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17993 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17994 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17995 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17996 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17997 .ilen = 64,
17998 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17999 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18000 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18001 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18002 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18003 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18004 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18005 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18006 .rlen = 64,
18007 }, {
18008 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18009 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18010 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18011 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18012 .klen = 32,
18013 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18014 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18015 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18016 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18017 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18018 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18019 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18020 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18021 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18022 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18023 .ilen = 64,
18024 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18025 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18026 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18027 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18028 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18029 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18030 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18031 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18032 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018033 }, { /* Generated with Crypto++ */
18034 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18035 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18036 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18037 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18038 .klen = 32,
18039 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18040 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18041 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18042 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18043 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18044 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18045 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18046 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18047 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18048 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18049 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18050 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18051 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18052 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18053 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18054 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18055 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18056 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18057 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18058 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18059 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18060 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18061 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18062 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18063 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18064 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18065 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18066 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18067 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18068 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18069 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18070 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18071 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18072 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18073 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18074 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18075 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18076 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18077 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18078 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18079 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18080 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18081 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18082 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18083 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18084 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18085 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18086 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18087 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18088 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18089 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18090 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18091 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18092 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18093 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18094 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18095 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18096 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18097 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18098 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18099 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18100 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18101 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18102 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18103 .ilen = 496,
18104 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18105 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18106 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18107 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18108 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18109 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18110 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18111 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18112 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18113 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18114 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18115 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18116 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18117 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18118 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18119 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18120 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18121 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18122 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18123 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18124 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18125 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18126 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18127 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18128 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18129 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18130 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18131 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18132 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18133 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18134 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18135 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18136 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18137 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18138 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18139 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18140 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18141 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18142 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18143 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18144 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18145 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18146 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18147 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18148 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18149 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18150 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18151 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18152 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18153 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18154 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18155 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18156 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18157 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18158 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18159 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18160 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18161 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18162 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18163 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18164 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18165 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18166 .rlen = 496,
18167 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018168 .np = 3,
18169 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018170 }, { /* Generated with Crypto++ */
18171 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18172 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18173 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18174 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18175 .klen = 32,
18176 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18177 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18178 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18179 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18180 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18181 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18182 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18183 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18184 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18185 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18186 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18187 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18188 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18189 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18190 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18191 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18192 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18193 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18194 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18195 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18196 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18197 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18198 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18199 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18200 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18201 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18202 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18203 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18204 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18205 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18206 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18207 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18208 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18209 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18210 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18211 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18212 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18213 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18214 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18215 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18216 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18217 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18218 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18219 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18220 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18221 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18222 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18223 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18224 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18225 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18226 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18227 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18228 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18229 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18230 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18231 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18232 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18233 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18234 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18235 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18236 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18237 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18238 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18239 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18240 "\xFB\xF2\x3F",
18241 .ilen = 499,
18242 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18243 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18244 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18245 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18246 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18247 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18248 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18249 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18250 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18251 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18252 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18253 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18254 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18255 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18256 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18257 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18258 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18259 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18260 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18261 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18262 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18263 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18264 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18265 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18266 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18267 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18268 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18269 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18270 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18271 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18272 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18273 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18274 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18275 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18276 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18277 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18278 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18279 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18280 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18281 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18282 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18283 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18284 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18285 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18286 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18287 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18288 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18289 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18290 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18291 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18292 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18293 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18294 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18295 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18296 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18297 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18298 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18299 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18300 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18301 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18302 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18303 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18304 "\x7B\xE4\x4D",
18305 .rlen = 499,
18306 .also_non_np = 1,
18307 .np = 2,
18308 .tap = { 499 - 16, 16 },
18309 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018310};
18311
18312static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018313 { /* From RFC 3686 */
18314 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18315 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18316 "\x00\x00\x00\x30",
18317 .klen = 20,
18318 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18319 .input = "Single block msg",
18320 .ilen = 16,
18321 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18322 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18323 .rlen = 16,
18324 }, {
18325 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18326 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18327 "\x00\x6c\xb6\xdb",
18328 .klen = 20,
18329 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18330 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18331 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18332 "\x10\x11\x12\x13\x14\x15\x16\x17"
18333 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18334 .ilen = 32,
18335 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18336 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18337 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18338 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18339 .rlen = 32,
18340 }, {
18341 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18342 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18343 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18344 "\x00\x00\x00\x48",
18345 .klen = 28,
18346 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18347 .input = "Single block msg",
18348 .ilen = 16,
18349 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18350 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18351 .rlen = 16,
18352 }, {
18353 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18354 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18355 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18356 "\x00\x96\xb0\x3b",
18357 .klen = 28,
18358 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18359 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18360 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18361 "\x10\x11\x12\x13\x14\x15\x16\x17"
18362 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18363 .ilen = 32,
18364 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18365 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18366 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18367 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18368 .rlen = 32,
18369 }, {
18370 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18371 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18372 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18373 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18374 "\x00\x00\x00\x60",
18375 .klen = 36,
18376 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18377 .input = "Single block msg",
18378 .ilen = 16,
18379 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18380 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18381 .rlen = 16,
18382 }, {
18383 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18384 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18385 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18386 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18387 "\x00\xfa\xac\x24",
18388 .klen = 36,
18389 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18390 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18391 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18392 "\x10\x11\x12\x13\x14\x15\x16\x17"
18393 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18394 .ilen = 32,
18395 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18396 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18397 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18398 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18399 .rlen = 32,
18400 }, {
18401 // generated using Crypto++
18402 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18403 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18404 "\x10\x11\x12\x13\x14\x15\x16\x17"
18405 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18406 "\x00\x00\x00\x00",
18407 .klen = 32 + 4,
18408 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18409 .input =
18410 "\x00\x01\x02\x03\x04\x05\x06\x07"
18411 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18412 "\x10\x11\x12\x13\x14\x15\x16\x17"
18413 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18414 "\x20\x21\x22\x23\x24\x25\x26\x27"
18415 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18416 "\x30\x31\x32\x33\x34\x35\x36\x37"
18417 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18418 "\x40\x41\x42\x43\x44\x45\x46\x47"
18419 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18420 "\x50\x51\x52\x53\x54\x55\x56\x57"
18421 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18422 "\x60\x61\x62\x63\x64\x65\x66\x67"
18423 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18424 "\x70\x71\x72\x73\x74\x75\x76\x77"
18425 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18426 "\x80\x81\x82\x83\x84\x85\x86\x87"
18427 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18428 "\x90\x91\x92\x93\x94\x95\x96\x97"
18429 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18430 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18431 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18432 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18433 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18434 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18435 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18436 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18437 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18438 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18439 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18440 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18441 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18442 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18443 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18444 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18445 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18446 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18447 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18448 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18449 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18450 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18451 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18452 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18453 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18454 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18455 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18456 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18457 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18458 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18459 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18460 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18461 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18462 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18463 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18464 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18465 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18466 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18467 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18468 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18469 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18470 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18471 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18472 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18473 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18474 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18475 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18476 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18477 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18478 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18479 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18480 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18481 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18482 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18483 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18484 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18485 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18486 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18487 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18488 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18489 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18490 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18491 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18492 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18493 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18494 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18495 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18496 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18497 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18498 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18499 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18500 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18501 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18502 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18503 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18504 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18505 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18506 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18507 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18508 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18509 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18510 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18511 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18512 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18513 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18514 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18515 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18516 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18517 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18518 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18519 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18520 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18521 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18522 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18523 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18524 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18525 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18526 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18527 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18528 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18529 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18530 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18531 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18532 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18533 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18534 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18535 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18536 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18537 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18538 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18539 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18540 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18541 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18542 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18543 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18544 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18545 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18546 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18547 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18548 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18549 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18550 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18551 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18552 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18553 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18554 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18555 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18556 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18557 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18558 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18559 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18560 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18561 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18562 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18563 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18564 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18565 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18566 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18567 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18568 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18569 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18570 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18571 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18572 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18573 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18574 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18575 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18576 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18577 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18578 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18579 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18580 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18581 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18582 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18583 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18584 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18585 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18586 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18587 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18588 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18589 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18590 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18591 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18592 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18593 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18594 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18595 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18596 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18597 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18598 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18599 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18600 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18601 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18602 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18603 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18604 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18605 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18606 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18607 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18608 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18609 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18610 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18611 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18612 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18613 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18614 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18615 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18616 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18617 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18618 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18619 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18620 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18621 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18622 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18623 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18624 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18625 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18626 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18627 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18628 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18629 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18630 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18631 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18632 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18633 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18634 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18635 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18636 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18637 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18638 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18639 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18640 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18641 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18642 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18643 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18644 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18645 "\x28\x37\x46\x55\x64\x73\x82\x91"
18646 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18647 "\x18\x27\x36\x45\x54\x63\x72\x81"
18648 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18649 "\x08\x17\x26\x35\x44\x53\x62\x71"
18650 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18651 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18652 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18653 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18654 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18655 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18656 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18657 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18658 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18659 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18660 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18661 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18662 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18663 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18664 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18665 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18666 "\x00\x11\x22\x33\x44\x55\x66\x77"
18667 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18668 "\x10\x21\x32\x43\x54\x65\x76\x87"
18669 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18670 "\x20\x31\x42\x53\x64\x75\x86\x97"
18671 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18672 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18673 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18674 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18675 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18676 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18677 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18678 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18679 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18680 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18681 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18682 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18683 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18684 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18685 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18686 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18687 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18688 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18689 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18690 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18691 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18692 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18693 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18694 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18695 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18696 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18697 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18698 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18699 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18700 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18701 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18702 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18703 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18704 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18705 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18706 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18707 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18708 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18709 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18710 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18711 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18712 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18713 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18714 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18715 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18716 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18717 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18718 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18719 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18720 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18721 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18722 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18723 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18724 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18725 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18726 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18727 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18728 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18729 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18730 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18731 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18732 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18733 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18734 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18735 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18736 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18737 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18738 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18739 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18740 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18741 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18742 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18743 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18744 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18745 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18746 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18747 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18748 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18749 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18750 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18751 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18752 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18753 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18754 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18755 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18756 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18757 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18758 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18759 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18760 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18761 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18762 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18763 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18764 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18765 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18766 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18767 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18768 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18769 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18770 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18771 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18772 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18773 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18774 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18775 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18776 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18777 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18778 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18779 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18780 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18781 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18782 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18783 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18784 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18785 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18786 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18787 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18788 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18789 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18790 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18791 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18792 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18793 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18794 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18795 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18796 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18797 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18798 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18799 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18800 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18801 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18802 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18803 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18804 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18805 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18806 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18807 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18808 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18809 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18810 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18811 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18812 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18813 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18814 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18815 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18816 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18817 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
18818 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
18819 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
18820 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
18821 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
18822 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
18823 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
18824 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
18825 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
18826 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
18827 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
18828 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
18829 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
18830 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
18831 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
18832 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
18833 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
18834 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
18835 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
18836 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
18837 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
18838 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
18839 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
18840 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
18841 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
18842 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
18843 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
18844 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
18845 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
18846 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
18847 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
18848 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
18849 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
18850 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
18851 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
18852 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
18853 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
18854 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
18855 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
18856 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
18857 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
18858 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
18859 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
18860 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
18861 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
18862 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
18863 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
18864 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
18865 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
18866 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
18867 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
18868 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
18869 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
18870 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
18871 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
18872 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
18873 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
18874 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
18875 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
18876 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
18877 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
18878 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
18879 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
18880 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
18881 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
18882 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
18883 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
18884 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
18885 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
18886 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
18887 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
18888 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
18889 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
18890 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
18891 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
18892 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
18893 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
18894 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
18895 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
18896 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
18897 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
18898 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
18899 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
18900 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
18901 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
18902 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
18903 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
18904 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
18905 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
18906 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
18907 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
18908 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
18909 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
18910 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
18911 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
18912 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
18913 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
18914 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
18915 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
18916 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
18917 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
18918 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
18919 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
18920 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
18921 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
18922 "\x00\x21\x42\x63",
18923 .ilen = 4100,
18924 .result =
18925 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
18926 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
18927 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
18928 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
18929 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
18930 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
18931 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
18932 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
18933 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
18934 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
18935 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
18936 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
18937 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
18938 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
18939 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
18940 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
18941 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
18942 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
18943 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
18944 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
18945 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
18946 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
18947 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
18948 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
18949 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
18950 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
18951 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
18952 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
18953 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
18954 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
18955 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
18956 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
18957 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
18958 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
18959 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
18960 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
18961 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
18962 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
18963 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
18964 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
18965 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
18966 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
18967 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
18968 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
18969 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
18970 "\x04\x02\xef\xd3\x44\xde\x76\x31"
18971 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
18972 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
18973 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
18974 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
18975 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
18976 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
18977 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
18978 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
18979 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
18980 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
18981 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
18982 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
18983 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
18984 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
18985 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
18986 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
18987 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
18988 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
18989 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
18990 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
18991 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
18992 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
18993 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
18994 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
18995 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
18996 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
18997 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
18998 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
18999 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19000 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19001 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19002 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19003 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19004 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19005 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19006 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19007 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19008 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19009 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19010 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19011 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19012 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19013 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19014 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19015 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19016 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19017 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19018 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19019 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19020 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19021 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19022 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19023 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19024 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19025 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19026 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19027 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19028 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19029 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19030 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19031 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19032 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19033 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19034 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19035 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19036 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19037 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19038 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19039 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19040 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19041 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19042 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19043 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19044 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19045 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19046 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19047 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19048 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19049 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19050 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19051 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19052 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19053 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19054 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19055 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19056 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19057 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19058 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19059 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19060 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19061 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19062 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19063 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19064 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19065 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19066 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19067 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19068 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19069 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19070 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19071 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19072 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19073 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19074 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19075 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19076 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19077 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19078 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19079 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19080 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19081 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19082 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19083 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19084 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19085 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19086 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19087 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19088 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19089 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19090 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19091 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19092 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19093 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19094 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19095 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19096 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19097 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19098 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19099 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19100 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19101 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19102 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19103 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19104 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19105 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19106 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19107 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19108 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19109 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19110 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19111 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19112 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19113 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19114 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19115 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19116 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19117 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19118 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19119 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19120 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19121 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19122 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19123 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19124 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19125 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19126 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19127 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19128 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19129 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19130 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19131 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19132 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19133 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19134 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19135 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19136 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19137 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19138 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19139 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19140 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19141 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19142 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19143 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19144 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19145 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19146 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19147 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19148 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19149 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19150 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19151 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19152 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19153 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19154 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19155 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19156 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19157 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19158 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19159 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19160 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19161 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19162 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19163 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19164 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19165 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19166 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19167 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19168 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19169 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19170 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19171 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19172 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19173 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19174 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19175 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19176 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19177 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19178 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19179 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19180 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19181 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19182 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19183 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19184 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19185 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19186 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19187 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19188 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19189 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19190 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19191 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19192 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19193 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19194 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19195 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19196 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19197 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19198 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19199 "\x11\x94\x13\x69\x51\x09\x28\xde"
19200 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19201 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19202 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19203 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19204 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19205 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19206 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19207 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19208 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19209 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19210 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19211 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19212 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19213 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19214 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19215 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19216 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19217 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19218 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19219 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19220 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19221 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19222 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19223 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19224 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19225 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19226 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19227 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19228 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19229 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19230 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19231 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19232 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19233 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19234 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19235 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19236 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19237 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19238 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19239 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19240 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19241 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19242 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19243 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19244 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19245 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19246 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19247 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19248 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19249 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19250 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19251 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19252 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19253 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19254 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19255 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19256 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19257 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19258 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19259 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19260 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19261 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19262 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19263 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19264 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19265 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19266 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19267 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19268 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19269 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19270 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19271 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19272 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19273 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19274 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19275 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19276 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19277 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19278 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19279 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19280 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19281 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19282 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19283 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19284 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19285 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19286 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19287 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19288 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19289 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19290 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19291 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19292 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19293 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19294 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19295 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19296 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19297 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19298 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19299 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19300 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19301 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19302 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19303 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19304 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19305 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19306 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19307 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19308 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19309 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19310 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19311 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19312 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19313 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19314 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19315 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19316 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19317 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19318 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19319 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19320 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19321 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19322 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19323 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19324 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19325 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19326 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19327 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19328 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19329 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19330 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19331 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19332 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19333 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19334 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19335 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19336 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19337 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19338 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19339 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19340 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19341 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19342 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19343 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19344 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19345 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19346 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19347 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19348 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19349 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19350 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19351 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19352 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19353 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19354 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19355 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19356 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19357 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19358 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19359 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19360 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19361 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19362 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19363 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19364 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19365 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19366 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19367 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19368 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19369 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19370 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19371 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19372 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19373 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19374 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19375 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19376 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19377 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19378 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19379 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19380 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19381 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19382 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19383 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19384 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19385 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19386 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19387 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19388 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19389 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19390 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19391 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19392 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19393 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19394 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19395 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19396 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19397 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19398 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19399 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19400 "\xed\x38\x80\x36\x72\x43\x27\x49"
19401 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19402 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19403 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19404 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19405 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19406 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19407 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19408 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19409 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19410 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19411 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19412 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19413 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19414 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19415 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19416 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19417 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19418 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19419 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19420 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19421 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19422 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19423 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19424 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19425 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19426 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19427 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19428 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19429 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19430 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19431 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19432 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19433 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19434 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19435 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19436 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19437 "\x21\xed\xda\x86",
19438 .rlen = 4100,
19439 .np = 2,
19440 .tap = { 4064, 36 },
19441 },
19442};
19443
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019444static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019445 { /* From RFC 3686 */
19446 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19447 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19448 "\x00\x00\x00\x30",
19449 .klen = 20,
19450 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19451 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19452 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19453 .ilen = 16,
19454 .result = "Single block msg",
19455 .rlen = 16,
19456 }, {
19457 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19458 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19459 "\x00\x6c\xb6\xdb",
19460 .klen = 20,
19461 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19462 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19463 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19464 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19465 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19466 .ilen = 32,
19467 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19468 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19469 "\x10\x11\x12\x13\x14\x15\x16\x17"
19470 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19471 .rlen = 32,
19472 }, {
19473 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19474 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19475 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19476 "\x00\x00\x00\x48",
19477 .klen = 28,
19478 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19479 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19480 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19481 .ilen = 16,
19482 .result = "Single block msg",
19483 .rlen = 16,
19484 }, {
19485 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19486 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19487 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19488 "\x00\x96\xb0\x3b",
19489 .klen = 28,
19490 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19491 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19492 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19493 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19494 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19495 .ilen = 32,
19496 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19497 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19498 "\x10\x11\x12\x13\x14\x15\x16\x17"
19499 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19500 .rlen = 32,
19501 }, {
19502 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19503 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19504 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19505 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19506 "\x00\x00\x00\x60",
19507 .klen = 36,
19508 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19509 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19510 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19511 .ilen = 16,
19512 .result = "Single block msg",
19513 .rlen = 16,
19514 }, {
19515 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19516 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19517 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19518 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19519 "\x00\xfa\xac\x24",
19520 .klen = 36,
19521 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19522 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19523 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19524 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19525 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19526 .ilen = 32,
19527 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19528 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19529 "\x10\x11\x12\x13\x14\x15\x16\x17"
19530 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19531 .rlen = 32,
19532 },
19533};
19534
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019535static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19536 /* From NIST Special Publication 800-38A, Appendix F.5 */
19537 {
19538 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19539 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19540 .klen = 16,
19541 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19542 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19543 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19544 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19545 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19546 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19547 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19548 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19549 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19550 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19551 .ilen = 64,
19552 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19553 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19554 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19555 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19556 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19557 "\x44\xf7\xa8\x22\x60\xed\xcc"
19558 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19559 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19560 .rlen = 64,
19561 }
19562};
19563
19564static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19565 /* From NIST Special Publication 800-38A, Appendix F.5 */
19566 {
19567 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19568 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19569 .klen = 16,
19570 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19571 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19572 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19573 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19574 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19575 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19576 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19577 "\x44\xf7\xa8\x22\x60\xed\xcc"
19578 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19579 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19580 .ilen = 64,
19581 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19582 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19583 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19584 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19585 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19586 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19587 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19588 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19589 .rlen = 64,
19590 }
19591};
19592
Herbert Xuda7f0332008-07-31 17:08:25 +080019593static struct aead_testvec aes_gcm_enc_tv_template[] = {
19594 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19595 .key = zeroed_string,
19596 .klen = 16,
19597 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19598 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19599 .rlen = 16,
19600 }, {
19601 .key = zeroed_string,
19602 .klen = 16,
19603 .input = zeroed_string,
19604 .ilen = 16,
19605 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19606 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19607 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19608 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19609 .rlen = 32,
19610 }, {
19611 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19612 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19613 .klen = 16,
19614 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19615 "\xde\xca\xf8\x88",
19616 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19617 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19618 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19619 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19620 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19621 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19622 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19623 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19624 .ilen = 64,
19625 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19626 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19627 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19628 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19629 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19630 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19631 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19632 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19633 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19634 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19635 .rlen = 80,
19636 }, {
19637 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19638 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19639 .klen = 16,
19640 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19641 "\xde\xca\xf8\x88",
19642 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19643 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19644 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19645 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19646 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19647 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19648 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19649 "\xba\x63\x7b\x39",
19650 .ilen = 60,
19651 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19652 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19653 "\xab\xad\xda\xd2",
19654 .alen = 20,
19655 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19656 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19657 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19658 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19659 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19660 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19661 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19662 "\x3d\x58\xe0\x91"
19663 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19664 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19665 .rlen = 76,
19666 }, {
19667 .key = zeroed_string,
19668 .klen = 24,
19669 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19670 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19671 .rlen = 16,
19672 }, {
19673 .key = zeroed_string,
19674 .klen = 24,
19675 .input = zeroed_string,
19676 .ilen = 16,
19677 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19678 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19679 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19680 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19681 .rlen = 32,
19682 }, {
19683 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19684 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19685 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19686 .klen = 24,
19687 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19688 "\xde\xca\xf8\x88",
19689 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19690 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19691 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19692 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19693 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19694 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19695 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19696 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19697 .ilen = 64,
19698 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19699 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19700 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19701 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19702 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19703 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19704 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19705 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19706 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19707 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19708 .rlen = 80,
19709 }, {
19710 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19711 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19712 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19713 .klen = 24,
19714 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19715 "\xde\xca\xf8\x88",
19716 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19717 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19718 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19719 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19720 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19721 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19722 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19723 "\xba\x63\x7b\x39",
19724 .ilen = 60,
19725 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19726 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19727 "\xab\xad\xda\xd2",
19728 .alen = 20,
19729 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19730 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19731 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19732 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19733 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19734 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19735 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19736 "\xcc\xda\x27\x10"
19737 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19738 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19739 .rlen = 76,
19740 .np = 2,
19741 .tap = { 32, 28 },
19742 .anp = 2,
19743 .atap = { 8, 12 }
19744 }, {
19745 .key = zeroed_string,
19746 .klen = 32,
19747 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
19748 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
19749 .rlen = 16,
19750 }
19751};
19752
19753static struct aead_testvec aes_gcm_dec_tv_template[] = {
19754 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19755 .key = zeroed_string,
19756 .klen = 32,
19757 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
19758 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
19759 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
19760 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
19761 .ilen = 32,
19762 .result = zeroed_string,
19763 .rlen = 16,
19764 }, {
19765 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19766 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19767 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19768 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19769 .klen = 32,
19770 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19771 "\xde\xca\xf8\x88",
19772 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19773 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19774 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19775 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19776 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19777 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19778 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19779 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
19780 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
19781 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
19782 .ilen = 80,
19783 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19784 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19785 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19786 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19787 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19788 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19789 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19790 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19791 .rlen = 64,
19792 }, {
19793 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19794 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19795 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19796 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19797 .klen = 32,
19798 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19799 "\xde\xca\xf8\x88",
19800 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19801 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19802 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19803 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19804 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19805 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19806 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19807 "\xbc\xc9\xf6\x62"
19808 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
19809 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
19810 .ilen = 76,
19811 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19812 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19813 "\xab\xad\xda\xd2",
19814 .alen = 20,
19815 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19816 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19817 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19818 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19819 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19820 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19821 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19822 "\xba\x63\x7b\x39",
19823 .rlen = 60,
19824 .np = 2,
19825 .tap = { 48, 28 },
19826 .anp = 3,
19827 .atap = { 8, 8, 4 }
19828 }, {
19829 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19830 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19831 .klen = 16,
19832 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19833 "\xde\xca\xf8\x88",
19834 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19835 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19836 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19837 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19838 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19839 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19840 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19841 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19842 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19843 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19844 .ilen = 80,
19845 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19846 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19847 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19848 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19849 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19850 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19851 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19852 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19853 .rlen = 64,
19854 }, {
19855 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19856 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19857 .klen = 16,
19858 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19859 "\xde\xca\xf8\x88",
19860 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19861 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19862 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19863 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19864 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19865 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19866 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19867 "\x3d\x58\xe0\x91"
19868 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19869 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19870 .ilen = 76,
19871 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19872 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19873 "\xab\xad\xda\xd2",
19874 .alen = 20,
19875 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19876 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19877 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19878 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19879 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19880 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19881 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19882 "\xba\x63\x7b\x39",
19883 .rlen = 60,
19884 }, {
19885 .key = zeroed_string,
19886 .klen = 24,
19887 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19888 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19889 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19890 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19891 .ilen = 32,
19892 .result = zeroed_string,
19893 .rlen = 16,
19894 }, {
19895 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19896 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19897 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19898 .klen = 24,
19899 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19900 "\xde\xca\xf8\x88",
19901 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19902 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19903 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19904 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19905 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19906 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19907 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19908 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19909 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19910 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19911 .ilen = 80,
19912 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19913 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19914 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19915 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19916 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19917 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19918 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19919 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19920 .rlen = 64,
19921 }, {
19922 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19923 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19924 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19925 .klen = 24,
19926 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19927 "\xde\xca\xf8\x88",
19928 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19929 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19930 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19931 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19932 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19933 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19934 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19935 "\xcc\xda\x27\x10"
19936 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19937 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19938 .ilen = 76,
19939 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19940 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19941 "\xab\xad\xda\xd2",
19942 .alen = 20,
19943 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19944 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19945 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19946 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19947 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19948 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19949 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19950 "\xba\x63\x7b\x39",
19951 .rlen = 60,
19952 }
19953};
19954
Adrian Hoban69435b92010-11-04 15:02:04 -040019955static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
19956 { /* Generated using Crypto++ */
19957 .key = zeroed_string,
19958 .klen = 20,
19959 .iv = zeroed_string,
19960 .input = zeroed_string,
19961 .ilen = 16,
19962 .assoc = zeroed_string,
19963 .alen = 8,
19964 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
19965 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
19966 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
19967 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
19968 .rlen = 32,
19969 },{
19970 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19971 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19972 "\x00\x00\x00\x00",
19973 .klen = 20,
19974 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
19975 "\x00\x00\x00\x00",
19976 .input = zeroed_string,
19977 .ilen = 16,
19978 .assoc = zeroed_string,
19979 .alen = 8,
19980 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
19981 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
19982 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
19983 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
19984 .rlen = 32,
19985
19986 }, {
19987 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19988 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19989 "\x00\x00\x00\x00",
19990 .klen = 20,
19991 .iv = zeroed_string,
19992 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
19993 "\x01\x01\x01\x01\x01\x01\x01\x01",
19994 .ilen = 16,
19995 .assoc = zeroed_string,
19996 .alen = 8,
19997 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
19998 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
19999 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20000 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20001 .rlen = 32,
20002 }, {
20003 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20004 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20005 "\x00\x00\x00\x00",
20006 .klen = 20,
20007 .iv = zeroed_string,
20008 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20009 "\x01\x01\x01\x01\x01\x01\x01\x01",
20010 .ilen = 16,
20011 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20012 .alen = 8,
20013 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20014 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20015 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20016 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20017 .rlen = 32,
20018 }, {
20019 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20020 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20021 "\x00\x00\x00\x00",
20022 .klen = 20,
20023 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20024 "\x00\x00\x00\x00",
20025 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20026 "\x01\x01\x01\x01\x01\x01\x01\x01",
20027 .ilen = 16,
20028 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20029 .alen = 8,
20030 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20031 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20032 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20033 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20034 .rlen = 32,
20035 }, {
20036 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20037 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20038 "\x00\x00\x00\x00",
20039 .klen = 20,
20040 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20041 "\x00\x00\x00\x00",
20042 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20043 "\x01\x01\x01\x01\x01\x01\x01\x01"
20044 "\x01\x01\x01\x01\x01\x01\x01\x01"
20045 "\x01\x01\x01\x01\x01\x01\x01\x01"
20046 "\x01\x01\x01\x01\x01\x01\x01\x01"
20047 "\x01\x01\x01\x01\x01\x01\x01\x01"
20048 "\x01\x01\x01\x01\x01\x01\x01\x01"
20049 "\x01\x01\x01\x01\x01\x01\x01\x01",
20050 .ilen = 64,
20051 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20052 .alen = 8,
20053 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20054 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20055 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20056 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20057 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20058 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20059 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20060 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20061 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20062 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20063 .rlen = 80,
20064 }, {
20065 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20066 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20067 "\x00\x00\x00\x00",
20068 .klen = 20,
20069 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20070 "\x00\x00\x00\x00",
20071 .input = "\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 "\xff\xff\xff\xff\xff\xff\xff\xff"
20078 "\xff\xff\xff\xff\xff\xff\xff\xff"
20079 "\xff\xff\xff\xff\xff\xff\xff\xff"
20080 "\xff\xff\xff\xff\xff\xff\xff\xff"
20081 "\xff\xff\xff\xff\xff\xff\xff\xff"
20082 "\xff\xff\xff\xff\xff\xff\xff\xff"
20083 "\xff\xff\xff\xff\xff\xff\xff\xff"
20084 "\xff\xff\xff\xff\xff\xff\xff\xff"
20085 "\xff\xff\xff\xff\xff\xff\xff\xff"
20086 "\xff\xff\xff\xff\xff\xff\xff\xff"
20087 "\xff\xff\xff\xff\xff\xff\xff\xff"
20088 "\xff\xff\xff\xff\xff\xff\xff\xff"
20089 "\xff\xff\xff\xff\xff\xff\xff\xff"
20090 "\xff\xff\xff\xff\xff\xff\xff\xff"
20091 "\xff\xff\xff\xff\xff\xff\xff\xff"
20092 "\xff\xff\xff\xff\xff\xff\xff\xff"
20093 "\xff\xff\xff\xff\xff\xff\xff\xff"
20094 "\xff\xff\xff\xff\xff\xff\xff\xff",
20095 .ilen = 192,
20096 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20097 "\xaa\xaa\xaa\xaa",
20098 .alen = 12,
20099 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20100 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20101 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20102 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20103 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20104 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20105 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20106 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20107 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20108 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20109 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20110 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20111 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20112 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20113 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20114 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20115 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20116 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20117 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20118 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20119 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20120 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20121 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20122 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20123 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20124 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20125 .rlen = 208,
20126 }
20127};
20128
20129static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
20130 { /* Generated using Crypto++ */
20131 .key = zeroed_string,
20132 .klen = 20,
20133 .iv = zeroed_string,
20134 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20135 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20136 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20137 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20138 .ilen = 32,
20139 .assoc = zeroed_string,
20140 .alen = 8,
20141 .result = zeroed_string,
20142 .rlen = 16,
20143
20144 },{
20145 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20146 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20147 "\x00\x00\x00\x00",
20148 .klen = 20,
20149 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20150 "\x00\x00\x00\x00",
20151 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20152 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20153 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20154 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20155 .ilen = 32,
20156 .assoc = zeroed_string,
20157 .alen = 8,
20158 .result = zeroed_string,
20159 .rlen = 16,
20160 }, {
20161 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20162 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20163 "\x00\x00\x00\x00",
20164 .klen = 20,
20165 .iv = zeroed_string,
20166 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20167 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20168 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20169 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20170 .ilen = 32,
20171 .assoc = zeroed_string,
20172 .alen = 8,
20173 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20174 "\x01\x01\x01\x01\x01\x01\x01\x01",
20175 .rlen = 16,
20176 }, {
20177 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20178 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20179 "\x00\x00\x00\x00",
20180 .klen = 20,
20181 .iv = zeroed_string,
20182 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20183 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20184 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20185 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
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 }, {
20194 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20195 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20196 "\x00\x00\x00\x00",
20197 .klen = 20,
20198 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20199 "\x00\x00\x00\x00",
20200 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20201 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20202 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20203 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20204 .ilen = 32,
20205 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20206 .alen = 8,
20207 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20208 "\x01\x01\x01\x01\x01\x01\x01\x01",
20209 .rlen = 16,
20210 }, {
20211 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20212 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20213 "\x00\x00\x00\x00",
20214 .klen = 20,
20215 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20216 "\x00\x00\x00\x00",
20217 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20218 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20219 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20220 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20221 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20222 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20223 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20224 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20225 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20226 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20227 .ilen = 80,
20228 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20229 .alen = 8,
20230 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20231 "\x01\x01\x01\x01\x01\x01\x01\x01"
20232 "\x01\x01\x01\x01\x01\x01\x01\x01"
20233 "\x01\x01\x01\x01\x01\x01\x01\x01"
20234 "\x01\x01\x01\x01\x01\x01\x01\x01"
20235 "\x01\x01\x01\x01\x01\x01\x01\x01"
20236 "\x01\x01\x01\x01\x01\x01\x01\x01"
20237 "\x01\x01\x01\x01\x01\x01\x01\x01",
20238 .rlen = 64,
20239 }, {
20240 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20241 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20242 "\x00\x00\x00\x00",
20243 .klen = 20,
20244 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20245 "\x00\x00\x00\x00",
20246 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20247 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20248 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20249 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20250 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20251 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20252 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20253 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20254 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20255 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20256 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20257 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20258 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20259 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20260 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20261 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20262 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20263 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20264 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20265 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20266 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20267 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20268 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20269 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20270 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20271 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20272 .ilen = 208,
20273 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20274 "\xaa\xaa\xaa\xaa",
20275 .alen = 12,
20276 .result = "\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 "\xff\xff\xff\xff\xff\xff\xff\xff"
20283 "\xff\xff\xff\xff\xff\xff\xff\xff"
20284 "\xff\xff\xff\xff\xff\xff\xff\xff"
20285 "\xff\xff\xff\xff\xff\xff\xff\xff"
20286 "\xff\xff\xff\xff\xff\xff\xff\xff"
20287 "\xff\xff\xff\xff\xff\xff\xff\xff"
20288 "\xff\xff\xff\xff\xff\xff\xff\xff"
20289 "\xff\xff\xff\xff\xff\xff\xff\xff"
20290 "\xff\xff\xff\xff\xff\xff\xff\xff"
20291 "\xff\xff\xff\xff\xff\xff\xff\xff"
20292 "\xff\xff\xff\xff\xff\xff\xff\xff"
20293 "\xff\xff\xff\xff\xff\xff\xff\xff"
20294 "\xff\xff\xff\xff\xff\xff\xff\xff"
20295 "\xff\xff\xff\xff\xff\xff\xff\xff"
20296 "\xff\xff\xff\xff\xff\xff\xff\xff"
20297 "\xff\xff\xff\xff\xff\xff\xff\xff"
20298 "\xff\xff\xff\xff\xff\xff\xff\xff"
20299 "\xff\xff\xff\xff\xff\xff\xff\xff",
20300 .rlen = 192,
20301
20302 }
20303};
20304
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030020305static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
20306 { /* From draft-mcgrew-gcm-test-01 */
20307 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20308 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20309 "\x22\x43\x3c\x64",
20310 .klen = 20,
20311 .iv = zeroed_string,
20312 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20313 .alen = 8,
20314 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20315 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20316 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20317 "\x02\x00\x07\x00\x61\x62\x63\x64"
20318 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20319 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20320 "\x01\x02\x02\x01",
20321 .ilen = 52,
20322 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20323 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20324 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20325 "\x02\x00\x07\x00\x61\x62\x63\x64"
20326 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20327 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20328 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20329 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20330 "\xe4\x09\x9a\xaa",
20331 .rlen = 68,
20332 }
20333};
20334
20335static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
20336 { /* From draft-mcgrew-gcm-test-01 */
20337 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20338 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20339 "\x22\x43\x3c\x64",
20340 .klen = 20,
20341 .iv = zeroed_string,
20342 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20343 .alen = 8,
20344 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20345 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20346 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20347 "\x02\x00\x07\x00\x61\x62\x63\x64"
20348 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20349 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20350 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20351 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20352 "\xe4\x09\x9a\xaa",
20353 .ilen = 68,
20354 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20355 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20356 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20357 "\x02\x00\x07\x00\x61\x62\x63\x64"
20358 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20359 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20360 "\x01\x02\x02\x01",
20361 .rlen = 52,
20362 }, { /* nearly same as previous, but should fail */
20363 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
20364 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
20365 "\x22\x43\x3c\x64",
20366 .klen = 20,
20367 .iv = zeroed_string,
20368 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
20369 .alen = 8,
20370 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20371 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20372 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20373 "\x02\x00\x07\x00\x61\x62\x63\x64"
20374 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20375 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20376 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
20377 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
20378 "\x00\x00\x00\x00",
20379 .ilen = 68,
20380 .novrfy = 1,
20381 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
20382 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
20383 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
20384 "\x02\x00\x07\x00\x61\x62\x63\x64"
20385 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
20386 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
20387 "\x01\x02\x02\x01",
20388 .rlen = 52,
20389 },
20390};
20391
Herbert Xuda7f0332008-07-31 17:08:25 +080020392static struct aead_testvec aes_ccm_enc_tv_template[] = {
20393 { /* From RFC 3610 */
20394 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20395 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20396 .klen = 16,
20397 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
20398 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20399 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20400 .alen = 8,
20401 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20402 "\x10\x11\x12\x13\x14\x15\x16\x17"
20403 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
20404 .ilen = 23,
20405 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
20406 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
20407 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
20408 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
20409 .rlen = 31,
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\x07\x06\x05\x04"
20415 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20416 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20417 "\x08\x09\x0a\x0b",
20418 .alen = 12,
20419 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20420 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20421 "\x1c\x1d\x1e\x1f",
20422 .ilen = 20,
20423 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
20424 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
20425 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
20426 "\x7d\x9c\x2d\x93",
20427 .rlen = 28,
20428 }, {
20429 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20430 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20431 .klen = 16,
20432 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
20433 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20434 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20435 .alen = 8,
20436 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20437 "\x10\x11\x12\x13\x14\x15\x16\x17"
20438 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
20439 "\x20",
20440 .ilen = 25,
20441 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
20442 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
20443 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
20444 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
20445 "\x7e\x5f\x4e",
20446 .rlen = 35,
20447 }, {
20448 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20449 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20450 .klen = 16,
20451 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
20452 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20453 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20454 "\x08\x09\x0a\x0b",
20455 .alen = 12,
20456 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20457 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20458 "\x1c\x1d\x1e",
20459 .ilen = 19,
20460 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
20461 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
20462 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
20463 "\x4d\x99\x99\x88\xdd",
20464 .rlen = 29,
20465 }, {
20466 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20467 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20468 .klen = 16,
20469 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
20470 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20471 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
20472 .alen = 8,
20473 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
20474 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
20475 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
20476 .ilen = 24,
20477 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
20478 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
20479 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
20480 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
20481 .rlen = 32,
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\xd5\x60\x91\x2d\x3f\x70"
20487 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20488 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
20489 "\x20\xea\x60\xc0",
20490 .alen = 12,
20491 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
20492 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
20493 "\x3a\x80\x3b\xa8\x7f",
20494 .ilen = 21,
20495 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
20496 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
20497 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
20498 "\x5a\xe0\x70\x45\x51",
20499 .rlen = 29,
20500 }, {
20501 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20502 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20503 .klen = 16,
20504 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
20505 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20506 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
20507 .alen = 8,
20508 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
20509 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
20510 "\x98\x09\xd6\x7d\xbe\xdd\x18",
20511 .ilen = 23,
20512 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
20513 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
20514 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
20515 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
20516 "\xba",
20517 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080020518 }, {
20519 /*
20520 * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
20521 * below but rewritten to use the ccm algorithm directly.
20522 */
20523 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
20524 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
20525 .klen = 16,
20526 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
20527 .alen = 0,
20528 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
20529 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
20530 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
20531 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
20532 .ilen = 32,
20533 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
20534 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
20535 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
20536 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
20537 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
20538 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
20539 .rlen = 48,
20540 }
Herbert Xuda7f0332008-07-31 17:08:25 +080020541};
20542
20543static struct aead_testvec aes_ccm_dec_tv_template[] = {
20544 { /* From RFC 3610 */
20545 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20546 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20547 .klen = 16,
20548 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
20549 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20550 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20551 .alen = 8,
20552 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
20553 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
20554 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
20555 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
20556 .ilen = 31,
20557 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20558 "\x10\x11\x12\x13\x14\x15\x16\x17"
20559 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
20560 .rlen = 23,
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\x07\x06\x05\x04"
20566 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20567 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20568 "\x08\x09\x0a\x0b",
20569 .alen = 12,
20570 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
20571 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
20572 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
20573 "\x7d\x9c\x2d\x93",
20574 .ilen = 28,
20575 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20576 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20577 "\x1c\x1d\x1e\x1f",
20578 .rlen = 20,
20579 }, {
20580 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20581 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20582 .klen = 16,
20583 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
20584 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20585 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
20586 .alen = 8,
20587 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
20588 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
20589 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
20590 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
20591 "\x7e\x5f\x4e",
20592 .ilen = 35,
20593 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20594 "\x10\x11\x12\x13\x14\x15\x16\x17"
20595 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
20596 "\x20",
20597 .rlen = 25,
20598 }, {
20599 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
20600 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
20601 .klen = 16,
20602 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
20603 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
20604 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
20605 "\x08\x09\x0a\x0b",
20606 .alen = 12,
20607 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
20608 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
20609 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
20610 "\x4d\x99\x99\x88\xdd",
20611 .ilen = 29,
20612 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
20613 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
20614 "\x1c\x1d\x1e",
20615 .rlen = 19,
20616 }, {
20617 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20618 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20619 .klen = 16,
20620 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
20621 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20622 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
20623 .alen = 8,
20624 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
20625 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
20626 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
20627 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
20628 .ilen = 32,
20629 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
20630 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
20631 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
20632 .rlen = 24,
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\xd5\x60\x91\x2d\x3f\x70"
20638 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20639 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
20640 "\x20\xea\x60\xc0",
20641 .alen = 12,
20642 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
20643 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
20644 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
20645 "\x5a\xe0\x70\x45\x51",
20646 .ilen = 29,
20647 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
20648 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
20649 "\x3a\x80\x3b\xa8\x7f",
20650 .rlen = 21,
20651 }, {
20652 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
20653 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
20654 .klen = 16,
20655 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
20656 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
20657 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
20658 .alen = 8,
20659 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
20660 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
20661 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
20662 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
20663 "\xba",
20664 .ilen = 33,
20665 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
20666 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
20667 "\x98\x09\xd6\x7d\xbe\xdd\x18",
20668 .rlen = 23,
20669 },
20670};
20671
Jarod Wilson5d667322009-05-04 19:23:40 +080020672/*
20673 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
20674 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
20675 * Special Publication 800-38C's test vectors also use nonce lengths our
20676 * implementation doesn't support. The following are taken from fips cavs
20677 * fax files on hand at Red Hat.
20678 *
20679 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
20680 * part of the nonce which combine w/the iv, but need to be input this way.
20681 */
20682static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
20683 {
20684 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
20685 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
20686 "\x96\xac\x59",
20687 .klen = 19,
20688 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
20689 .alen = 0,
20690 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
20691 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
20692 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
20693 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
20694 .ilen = 32,
20695 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
20696 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
20697 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
20698 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
20699 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
20700 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
20701 .rlen = 48,
20702 }, {
20703 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
20704 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
20705 "\x4f\xa3\x19",
20706 .klen = 19,
20707 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
20708 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
20709 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
20710 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
20711 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
20712 .alen = 32,
20713 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
20714 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
20715 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
20716 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
20717 .ilen = 32,
20718 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
20719 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
20720 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
20721 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
20722 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
20723 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
20724 .rlen = 48,
20725 }, {
20726 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
20727 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
20728 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
20729 "\xa0\x20\x35",
20730 .klen = 27,
20731 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
20732 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
20733 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
20734 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
20735 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
20736 .alen = 32,
20737 .ilen = 0,
20738 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
20739 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
20740 .rlen = 16,
20741 }, {
20742 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
20743 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
20744 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
20745 "\xd6\x3c\x8c",
20746 .klen = 27,
20747 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
20748 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
20749 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
20750 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
20751 "\xe3\x00\x73\x69\x84\x69\x87\x79",
20752 .alen = 32,
20753 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
20754 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
20755 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
20756 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
20757 .ilen = 32,
20758 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
20759 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
20760 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
20761 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
20762 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
20763 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
20764 .rlen = 48,
20765 }, {
20766 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
20767 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
20768 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
20769 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
20770 "\x1e\x29\x91",
20771 .klen = 35,
20772 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
20773 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
20774 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
20775 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
20776 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
20777 .alen = 32,
20778 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
20779 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
20780 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
20781 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
20782 .ilen = 32,
20783 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
20784 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
20785 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
20786 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
20787 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
20788 .rlen = 40,
20789 }, {
20790 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
20791 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
20792 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
20793 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
20794 "\xf9\xd9\x4e",
20795 .klen = 35,
20796 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
20797 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
20798 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
20799 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
20800 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
20801 .alen = 32,
20802 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
20803 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
20804 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
20805 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
20806 .ilen = 32,
20807 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
20808 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
20809 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
20810 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
20811 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
20812 "\x7b\x72\x8a\xf7",
20813 .rlen = 44,
20814 }, {
20815 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
20816 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
20817 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
20818 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
20819 "\x24\xa7\x8b",
20820 .klen = 35,
20821 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
20822 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
20823 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
20824 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
20825 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
20826 .alen = 32,
20827 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
20828 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
20829 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
20830 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
20831 .ilen = 32,
20832 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
20833 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
20834 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
20835 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
20836 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
20837 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
20838 .rlen = 48,
20839 },
20840};
20841
20842static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
20843 {
20844 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
20845 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
20846 "\xc6\xfb\x7d",
20847 .klen = 19,
20848 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
20849 .alen = 0,
20850 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
20851 .ilen = 8,
20852 .result = "\x00",
20853 .rlen = 0,
20854 .novrfy = 1,
20855 }, {
20856 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
20857 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
20858 "\xaf\x94\x87",
20859 .klen = 19,
20860 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
20861 .alen = 0,
20862 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
20863 .ilen = 8,
20864 .result = "\x00",
20865 .rlen = 0,
20866 }, {
20867 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
20868 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
20869 "\xc6\xfb\x7d",
20870 .klen = 19,
20871 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
20872 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
20873 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
20874 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
20875 "\xd8\x94\x99\x91\x81\x54\x62\x57",
20876 .alen = 32,
20877 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
20878 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
20879 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
20880 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
20881 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
20882 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
20883 .ilen = 48,
20884 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
20885 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
20886 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
20887 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
20888 .rlen = 32,
20889 .novrfy = 1,
20890 }, {
20891 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
20892 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
20893 "\x05\xe0\xc9",
20894 .klen = 19,
20895 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
20896 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
20897 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
20898 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
20899 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
20900 .alen = 32,
20901 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
20902 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
20903 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
20904 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
20905 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
20906 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
20907 .ilen = 48,
20908 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
20909 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
20910 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
20911 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
20912 .rlen = 32,
20913 }, {
20914 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
20915 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
20916 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
20917 "\xee\x49\x83",
20918 .klen = 27,
20919 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20920 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
20921 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
20922 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
20923 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
20924 .alen = 32,
20925 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
20926 .ilen = 8,
20927 .result = "\x00",
20928 .rlen = 0,
20929 }, {
20930 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
20931 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
20932 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
20933 "\xee\x49\x83",
20934 .klen = 27,
20935 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20936 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
20937 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
20938 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
20939 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
20940 .alen = 32,
20941 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
20942 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
20943 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
20944 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
20945 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
20946 .ilen = 40,
20947 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
20948 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
20949 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
20950 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
20951 .rlen = 32,
20952 }, {
20953 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
20954 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
20955 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
20956 "\xd1\xfc\x57",
20957 .klen = 27,
20958 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
20959 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
20960 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
20961 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
20962 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
20963 .alen = 32,
20964 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
20965 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
20966 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
20967 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
20968 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
20969 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
20970 .ilen = 48,
20971 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
20972 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
20973 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
20974 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
20975 .rlen = 32,
20976 .novrfy = 1,
20977 }, {
20978 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
20979 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
20980 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
20981 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
20982 "\xee\x49\x83",
20983 .klen = 35,
20984 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
20985 .alen = 0,
20986 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
20987 .ilen = 8,
20988 .result = "\x00",
20989 .rlen = 0,
20990 }, {
20991 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
20992 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
20993 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
20994 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
20995 "\x85\x34\x66",
20996 .klen = 35,
20997 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
20998 .alen = 0,
20999 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
21000 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
21001 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
21002 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
21003 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
21004 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
21005 .ilen = 48,
21006 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
21007 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
21008 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
21009 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
21010 .rlen = 32,
21011 .novrfy = 1,
21012 }, {
21013 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21014 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21015 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21016 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
21017 "\xcf\x76\x3f",
21018 .klen = 35,
21019 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
21020 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
21021 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
21022 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
21023 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
21024 .alen = 32,
21025 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
21026 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
21027 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
21028 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
21029 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
21030 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
21031 .ilen = 48,
21032 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
21033 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
21034 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
21035 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
21036 .rlen = 32,
21037 },
21038};
21039
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080021040/*
Martin Williaf2b76b2015-06-01 13:44:01 +020021041 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
21042 */
21043#define RFC7539_ENC_TEST_VECTORS 2
21044#define RFC7539_DEC_TEST_VECTORS 2
21045static struct aead_testvec rfc7539_enc_tv_template[] = {
21046 {
21047 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
21048 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
21049 "\x90\x91\x92\x93\x94\x95\x96\x97"
21050 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
21051 .klen = 32,
21052 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
21053 "\x44\x45\x46\x47",
21054 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
21055 "\xc4\xc5\xc6\xc7",
21056 .alen = 12,
21057 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
21058 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
21059 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
21060 "\x74\x68\x65\x20\x63\x6c\x61\x73"
21061 "\x73\x20\x6f\x66\x20\x27\x39\x39"
21062 "\x3a\x20\x49\x66\x20\x49\x20\x63"
21063 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
21064 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
21065 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
21066 "\x74\x69\x70\x20\x66\x6f\x72\x20"
21067 "\x74\x68\x65\x20\x66\x75\x74\x75"
21068 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
21069 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
21070 "\x75\x6c\x64\x20\x62\x65\x20\x69"
21071 "\x74\x2e",
21072 .ilen = 114,
21073 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
21074 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
21075 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
21076 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
21077 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
21078 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
21079 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
21080 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
21081 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
21082 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
21083 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
21084 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
21085 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
21086 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
21087 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
21088 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
21089 "\x06\x91",
21090 .rlen = 130,
21091 }, {
21092 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21093 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21094 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21095 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
21096 .klen = 32,
21097 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
21098 "\x05\x06\x07\x08",
21099 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21100 "\x00\x00\x4e\x91",
21101 .alen = 12,
21102 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21103 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21104 "\x61\x72\x65\x20\x64\x72\x61\x66"
21105 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21106 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21107 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21108 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21109 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21110 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21111 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21112 "\x20\x75\x70\x64\x61\x74\x65\x64"
21113 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21114 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21115 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21116 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21117 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21118 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21119 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21120 "\x20\x49\x74\x20\x69\x73\x20\x69"
21121 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21122 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21123 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21124 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21125 "\x66\x74\x73\x20\x61\x73\x20\x72"
21126 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21127 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21128 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21129 "\x63\x69\x74\x65\x20\x74\x68\x65"
21130 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21131 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21132 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21133 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21134 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21135 "\x9d",
21136 .ilen = 265,
21137 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21138 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21139 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21140 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21141 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21142 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21143 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21144 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21145 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21146 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21147 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21148 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21149 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21150 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21151 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21152 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21153 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21154 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21155 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21156 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21157 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21158 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21159 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21160 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21161 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21162 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21163 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21164 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21165 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21166 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21167 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21168 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21169 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21170 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21171 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21172 "\x38",
21173 .rlen = 281,
21174 },
21175};
21176
21177static struct aead_testvec rfc7539_dec_tv_template[] = {
21178 {
21179 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
21180 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
21181 "\x90\x91\x92\x93\x94\x95\x96\x97"
21182 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
21183 .klen = 32,
21184 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
21185 "\x44\x45\x46\x47",
21186 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
21187 "\xc4\xc5\xc6\xc7",
21188 .alen = 12,
21189 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
21190 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
21191 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
21192 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
21193 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
21194 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
21195 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
21196 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
21197 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
21198 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
21199 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
21200 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
21201 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
21202 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
21203 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
21204 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
21205 "\x06\x91",
21206 .ilen = 130,
21207 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
21208 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
21209 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
21210 "\x74\x68\x65\x20\x63\x6c\x61\x73"
21211 "\x73\x20\x6f\x66\x20\x27\x39\x39"
21212 "\x3a\x20\x49\x66\x20\x49\x20\x63"
21213 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
21214 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
21215 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
21216 "\x74\x69\x70\x20\x66\x6f\x72\x20"
21217 "\x74\x68\x65\x20\x66\x75\x74\x75"
21218 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
21219 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
21220 "\x75\x6c\x64\x20\x62\x65\x20\x69"
21221 "\x74\x2e",
21222 .rlen = 114,
21223 }, {
21224 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21225 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21226 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21227 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
21228 .klen = 32,
21229 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
21230 "\x05\x06\x07\x08",
21231 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21232 "\x00\x00\x4e\x91",
21233 .alen = 12,
21234 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21235 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21236 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21237 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21238 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21239 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21240 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21241 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21242 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21243 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21244 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21245 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21246 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21247 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21248 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21249 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21250 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21251 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21252 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21253 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21254 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21255 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21256 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21257 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21258 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21259 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21260 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21261 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21262 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21263 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21264 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21265 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21266 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21267 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21268 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21269 "\x38",
21270 .ilen = 281,
21271 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21272 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21273 "\x61\x72\x65\x20\x64\x72\x61\x66"
21274 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21275 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21276 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21277 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21278 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21279 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21280 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21281 "\x20\x75\x70\x64\x61\x74\x65\x64"
21282 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21283 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21284 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21285 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21286 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21287 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21288 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21289 "\x20\x49\x74\x20\x69\x73\x20\x69"
21290 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21291 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21292 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21293 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21294 "\x66\x74\x73\x20\x61\x73\x20\x72"
21295 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21296 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21297 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21298 "\x63\x69\x74\x65\x20\x74\x68\x65"
21299 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21300 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21301 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21302 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21303 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21304 "\x9d",
21305 .rlen = 265,
21306 },
21307};
21308
21309/*
Martin Willi59007582015-06-01 13:44:03 +020021310 * draft-irtf-cfrg-chacha20-poly1305
21311 */
21312#define RFC7539ESP_DEC_TEST_VECTORS 1
21313#define RFC7539ESP_ENC_TEST_VECTORS 1
21314static struct aead_testvec rfc7539esp_enc_tv_template[] = {
21315 {
21316 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21317 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21318 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21319 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
21320 "\x00\x00\x00\x00",
21321 .klen = 36,
21322 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21323 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21324 "\x00\x00\x4e\x91",
21325 .alen = 12,
21326 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21327 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21328 "\x61\x72\x65\x20\x64\x72\x61\x66"
21329 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21330 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21331 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21332 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21333 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21334 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21335 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21336 "\x20\x75\x70\x64\x61\x74\x65\x64"
21337 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21338 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21339 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21340 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21341 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21342 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21343 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21344 "\x20\x49\x74\x20\x69\x73\x20\x69"
21345 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21346 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21347 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21348 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21349 "\x66\x74\x73\x20\x61\x73\x20\x72"
21350 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21351 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21352 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21353 "\x63\x69\x74\x65\x20\x74\x68\x65"
21354 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21355 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21356 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21357 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21358 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21359 "\x9d",
21360 .ilen = 265,
21361 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21362 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21363 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21364 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21365 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21366 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21367 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21368 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21369 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21370 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21371 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21372 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21373 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21374 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21375 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21376 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21377 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21378 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21379 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21380 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21381 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21382 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21383 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21384 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21385 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21386 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21387 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21388 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21389 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21390 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21391 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21392 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21393 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21394 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21395 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21396 "\x38",
21397 .rlen = 281,
21398 },
21399};
21400
21401static struct aead_testvec rfc7539esp_dec_tv_template[] = {
21402 {
21403 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21404 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21405 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21406 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
21407 "\x00\x00\x00\x00",
21408 .klen = 36,
21409 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
21410 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21411 "\x00\x00\x4e\x91",
21412 .alen = 12,
21413 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21414 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21415 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21416 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21417 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21418 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21419 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21420 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21421 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21422 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21423 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21424 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21425 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21426 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21427 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21428 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21429 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21430 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21431 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21432 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21433 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21434 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21435 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21436 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21437 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21438 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21439 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21440 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
21441 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
21442 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
21443 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
21444 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
21445 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
21446 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
21447 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
21448 "\x38",
21449 .ilen = 281,
21450 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21451 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21452 "\x61\x72\x65\x20\x64\x72\x61\x66"
21453 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21454 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21455 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21456 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21457 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21458 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21459 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21460 "\x20\x75\x70\x64\x61\x74\x65\x64"
21461 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21462 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21463 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21464 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21465 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21466 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21467 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21468 "\x20\x49\x74\x20\x69\x73\x20\x69"
21469 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21470 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21471 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21472 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21473 "\x66\x74\x73\x20\x61\x73\x20\x72"
21474 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21475 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21476 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21477 "\x63\x69\x74\x65\x20\x74\x68\x65"
21478 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21479 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21480 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21481 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21482 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21483 "\x9d",
21484 .rlen = 265,
21485 },
21486};
21487
21488/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080021489 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
21490 * test vectors, taken from Appendix B.2.9 and B.2.10:
21491 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
21492 * Only AES-128 is supported at this time.
21493 */
21494#define ANSI_CPRNG_AES_TEST_VECTORS 6
21495
21496static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
21497 {
21498 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21499 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21500 .klen = 16,
21501 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21502 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
21503 .dtlen = 16,
21504 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
21505 "\x00\x00\x00\x00\x00\x00\x00\x00",
21506 .vlen = 16,
21507 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
21508 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
21509 .rlen = 16,
21510 .loops = 1,
21511 }, {
21512 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21513 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21514 .klen = 16,
21515 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21516 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
21517 .dtlen = 16,
21518 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
21519 "\x00\x00\x00\x00\x00\x00\x00\x00",
21520 .vlen = 16,
21521 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
21522 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
21523 .rlen = 16,
21524 .loops = 1,
21525 }, {
21526 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21527 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21528 .klen = 16,
21529 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21530 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
21531 .dtlen = 16,
21532 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
21533 "\x00\x00\x00\x00\x00\x00\x00\x00",
21534 .vlen = 16,
21535 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
21536 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
21537 .rlen = 16,
21538 .loops = 1,
21539 }, {
21540 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21541 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21542 .klen = 16,
21543 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21544 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
21545 .dtlen = 16,
21546 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
21547 "\x00\x00\x00\x00\x00\x00\x00\x00",
21548 .vlen = 16,
21549 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
21550 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
21551 .rlen = 16,
21552 .loops = 1,
21553 }, {
21554 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
21555 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
21556 .klen = 16,
21557 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
21558 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
21559 .dtlen = 16,
21560 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
21561 "\x00\x00\x00\x00\x00\x00\x00\x00",
21562 .vlen = 16,
21563 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
21564 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
21565 .rlen = 16,
21566 .loops = 1,
21567 }, { /* Monte Carlo Test */
21568 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
21569 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
21570 .klen = 16,
21571 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
21572 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
21573 .dtlen = 16,
21574 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
21575 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
21576 .vlen = 16,
21577 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
21578 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
21579 .rlen = 16,
21580 .loops = 10000,
21581 },
21582};
21583
Stephan Mueller3332ee22014-05-31 17:24:38 +020021584/*
21585 * SP800-90A DRBG Test vectors from
21586 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
21587 *
21588 * Test vectors for DRBG with prediction resistance. All types of DRBGs
21589 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
21590 * w/o personalization string, w/ and w/o additional input string).
21591 */
21592static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
21593 {
21594 .entropy = (unsigned char *)
21595 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
21596 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
21597 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
21598 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
21599 .entropylen = 48,
21600 .entpra = (unsigned char *)
21601 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
21602 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
21603 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
21604 .entprb = (unsigned char *)
21605 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
21606 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
21607 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
21608 .entprlen = 32,
21609 .expected = (unsigned char *)
21610 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
21611 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
21612 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
21613 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
21614 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
21615 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
21616 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
21617 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
21618 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
21619 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
21620 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
21621 .expectedlen = 128,
21622 .addtla = NULL,
21623 .addtlb = NULL,
21624 .addtllen = 0,
21625 .pers = NULL,
21626 .perslen = 0,
21627 }, {
21628 .entropy = (unsigned char *)
21629 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
21630 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
21631 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
21632 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
21633 .entropylen = 48,
21634 .entpra = (unsigned char *)
21635 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
21636 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
21637 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
21638 .entprb = (unsigned char *)
21639 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
21640 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
21641 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
21642 .entprlen = 32,
21643 .expected = (unsigned char *)
21644 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
21645 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
21646 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
21647 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
21648 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
21649 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
21650 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
21651 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
21652 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
21653 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
21654 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
21655 .expectedlen = 128,
21656 .addtla = (unsigned char *)
21657 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
21658 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
21659 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
21660 .addtlb = (unsigned char *)
21661 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
21662 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
21663 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
21664 .addtllen = 32,
21665 .pers = NULL,
21666 .perslen = 0,
21667 }, {
21668 .entropy = (unsigned char *)
21669 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
21670 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
21671 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
21672 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
21673 .entropylen = 48,
21674 .entpra = (unsigned char *)
21675 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
21676 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
21677 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
21678 .entprb = (unsigned char *)
21679 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
21680 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
21681 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
21682 .entprlen = 32,
21683 .expected = (unsigned char *)
21684 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
21685 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
21686 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
21687 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
21688 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
21689 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
21690 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
21691 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
21692 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
21693 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
21694 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
21695 .expectedlen = 128,
21696 .addtla = NULL,
21697 .addtlb = NULL,
21698 .addtllen = 0,
21699 .pers = (unsigned char *)
21700 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
21701 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
21702 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
21703 .perslen = 32,
21704 }, {
21705 .entropy = (unsigned char *)
21706 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
21707 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
21708 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
21709 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
21710 .entropylen = 48,
21711 .entpra = (unsigned char *)
21712 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
21713 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
21714 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
21715 .entprb = (unsigned char *)
21716 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
21717 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
21718 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
21719 .entprlen = 32,
21720 .expected = (unsigned char *)
21721 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
21722 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
21723 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
21724 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
21725 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
21726 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
21727 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
21728 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
21729 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
21730 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
21731 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
21732 .expectedlen = 128,
21733 .addtla = (unsigned char *)
21734 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
21735 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
21736 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
21737 .addtlb = (unsigned char *)
21738 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
21739 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
21740 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
21741 .addtllen = 32,
21742 .pers = (unsigned char *)
21743 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
21744 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
21745 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
21746 .perslen = 32,
21747 },
21748};
21749
21750static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
21751 {
21752 .entropy = (unsigned char *)
21753 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
21754 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
21755 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
21756 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
21757 .entropylen = 48,
21758 .entpra = (unsigned char *)
21759 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
21760 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
21761 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
21762 .entprb = (unsigned char *)
21763 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
21764 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
21765 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
21766 .entprlen = 32,
21767 .expected = (unsigned char *)
21768 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
21769 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
21770 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
21771 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
21772 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
21773 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
21774 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
21775 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
21776 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
21777 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
21778 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
21779 .expectedlen = 128,
21780 .addtla = NULL,
21781 .addtlb = NULL,
21782 .addtllen = 0,
21783 .pers = NULL,
21784 .perslen = 0,
21785 }, {
21786 .entropy = (unsigned char *)
21787 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
21788 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
21789 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
21790 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
21791 .entropylen = 48,
21792 .entpra = (unsigned char *)
21793 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
21794 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
21795 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
21796 .entprb = (unsigned char *)
21797 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
21798 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
21799 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
21800 .entprlen = 32,
21801 .expected = (unsigned char *)
21802 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
21803 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
21804 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
21805 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
21806 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
21807 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
21808 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
21809 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
21810 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
21811 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
21812 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
21813 .expectedlen = 128,
21814 .addtla = (unsigned char *)
21815 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
21816 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
21817 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
21818 .addtlb = (unsigned char *)
21819 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
21820 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
21821 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
21822 .addtllen = 32,
21823 .pers = NULL,
21824 .perslen = 0,
21825 }, {
21826 .entropy = (unsigned char *)
21827 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
21828 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
21829 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
21830 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
21831 .entropylen = 48,
21832 .entpra = (unsigned char *)
21833 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
21834 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
21835 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
21836 .entprb = (unsigned char *)
21837 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
21838 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
21839 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
21840 .entprlen = 32,
21841 .expected = (unsigned char *)
21842 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
21843 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
21844 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
21845 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
21846 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
21847 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
21848 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
21849 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
21850 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
21851 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
21852 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
21853 .expectedlen = 128,
21854 .addtla = NULL,
21855 .addtlb = NULL,
21856 .addtllen = 0,
21857 .pers = (unsigned char *)
21858 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
21859 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
21860 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
21861 .perslen = 32,
21862 }, {
21863 .entropy = (unsigned char *)
21864 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
21865 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
21866 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
21867 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
21868 .entropylen = 48,
21869 .entpra = (unsigned char *)
21870 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
21871 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
21872 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
21873 .entprb = (unsigned char *)
21874 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
21875 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
21876 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
21877 .entprlen = 32,
21878 .expected = (unsigned char *)
21879 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
21880 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
21881 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
21882 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
21883 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
21884 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
21885 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
21886 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
21887 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
21888 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
21889 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
21890 .expectedlen = 128,
21891 .addtla = (unsigned char *)
21892 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
21893 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
21894 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
21895 .addtlb = (unsigned char *)
21896 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
21897 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
21898 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
21899 .addtllen = 32,
21900 .pers = (unsigned char *)
21901 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
21902 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
21903 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
21904 .perslen = 32,
21905 },
21906};
21907
21908static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
21909 {
21910 .entropy = (unsigned char *)
21911 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
21912 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
21913 .entropylen = 24,
21914 .entpra = (unsigned char *)
21915 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
21916 "\xb4\xec\x80\xb1",
21917 .entprb = (unsigned char *)
21918 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
21919 "\x28\x07\xeb\xc2",
21920 .entprlen = 16,
21921 .expected = (unsigned char *)
21922 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
21923 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
21924 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
21925 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
21926 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
21927 "\x8a\xf1\x23\xa8",
21928 .expectedlen = 64,
21929 .addtla = NULL,
21930 .addtlb = NULL,
21931 .addtllen = 0,
21932 .pers = NULL,
21933 .perslen = 0,
21934 }, {
21935 .entropy = (unsigned char *)
21936 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
21937 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
21938 .entropylen = 24,
21939 .entpra = (unsigned char *)
21940 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
21941 "\x67\xd1\x08\xf8",
21942 .entprb = (unsigned char *)
21943 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
21944 "\xd4\xba\x04\x58",
21945 .entprlen = 16,
21946 .expected = (unsigned char *)
21947 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
21948 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
21949 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
21950 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
21951 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
21952 "\xc1\x02\x41\x82",
21953 .expectedlen = 64,
21954 .addtla = (unsigned char *)
21955 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
21956 "\xeb\xb3\x01\x76",
21957 .addtlb = (unsigned char *)
21958 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
21959 "\xd0\x7f\xcc\x43",
21960 .addtllen = 16,
21961 .pers = NULL,
21962 .perslen = 0,
21963 }, {
21964 .entropy = (unsigned char *)
21965 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
21966 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
21967 .entropylen = 24,
21968 .entpra = (unsigned char *)
21969 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
21970 "\xc3\x0f\xe3\xb0",
21971 .entprb = (unsigned char *)
21972 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
21973 "\xd6\x9c\x9d\xe8",
21974 .entprlen = 16,
21975 .expected = (unsigned char *)
21976 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
21977 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
21978 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
21979 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
21980 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
21981 "\x72\x82\x0c\xcf",
21982 .expectedlen = 64,
21983 .addtla = NULL,
21984 .addtlb = NULL,
21985 .addtllen = 0,
21986 .pers = (unsigned char *)
21987 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
21988 "\x21\x52\xb3\xad",
21989 .perslen = 16,
21990 }, {
21991 .entropy = (unsigned char *)
21992 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
21993 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
21994 .entropylen = 24,
21995 .entpra = (unsigned char *)
21996 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
21997 "\xc4\x2c\xe8\x10",
21998 .entprb = (unsigned char *)
21999 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
22000 "\x08\xf7\xa5\x01",
22001 .entprlen = 16,
22002 .expected = (unsigned char *)
22003 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
22004 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
22005 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
22006 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
22007 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
22008 "\x23\xc5\x1f\x68",
22009 .expectedlen = 64,
22010 .addtla = (unsigned char *)
22011 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
22012 "\x23\x6d\xad\x1d",
22013 .addtlb = (unsigned char *)
22014 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
22015 "\xbc\x59\x31\x8c",
22016 .addtllen = 16,
22017 .pers = (unsigned char *)
22018 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
22019 "\x37\x3c\x5c\x0b",
22020 .perslen = 16,
22021 },
22022};
22023
22024/*
22025 * SP800-90A DRBG Test vectors from
22026 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22027 *
22028 * Test vectors for DRBG without prediction resistance. All types of DRBGs
22029 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22030 * w/o personalization string, w/ and w/o additional input string).
22031 */
22032static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
22033 {
22034 .entropy = (unsigned char *)
22035 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
22036 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
22037 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
22038 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
22039 .entropylen = 48,
22040 .expected = (unsigned char *)
22041 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
22042 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
22043 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
22044 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
22045 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
22046 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
22047 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
22048 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
22049 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
22050 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
22051 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
22052 .expectedlen = 128,
22053 .addtla = NULL,
22054 .addtlb = NULL,
22055 .addtllen = 0,
22056 .pers = NULL,
22057 .perslen = 0,
22058 }, {
22059 .entropy = (unsigned char *)
22060 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
22061 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
22062 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
22063 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
22064 .entropylen = 48,
22065 .expected = (unsigned char *)
22066 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
22067 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
22068 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
22069 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
22070 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
22071 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
22072 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
22073 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
22074 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
22075 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
22076 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
22077 .expectedlen = 128,
22078 .addtla = (unsigned char *)
22079 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
22080 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
22081 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
22082 .addtlb = (unsigned char *)
22083 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
22084 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
22085 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
22086 .addtllen = 32,
22087 .pers = NULL,
22088 .perslen = 0,
22089 }, {
22090 .entropy = (unsigned char *)
22091 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
22092 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
22093 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
22094 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
22095 .entropylen = 48,
22096 .expected = (unsigned char *)
22097 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
22098 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
22099 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
22100 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
22101 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
22102 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
22103 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
22104 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
22105 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
22106 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
22107 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
22108 .expectedlen = 128,
22109 .addtla = NULL,
22110 .addtlb = NULL,
22111 .addtllen = 0,
22112 .pers = (unsigned char *)
22113 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
22114 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
22115 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
22116 .perslen = 32,
22117 }, {
22118 .entropy = (unsigned char *)
22119 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
22120 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
22121 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
22122 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
22123 .entropylen = 48,
22124 .expected = (unsigned char *)
22125 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
22126 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
22127 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
22128 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
22129 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
22130 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
22131 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
22132 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
22133 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
22134 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
22135 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
22136 .expectedlen = 128,
22137 .addtla = (unsigned char *)
22138 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
22139 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
22140 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
22141 .addtlb = (unsigned char *)
22142 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
22143 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
22144 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
22145 .addtllen = 32,
22146 .pers = (unsigned char *)
22147 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
22148 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
22149 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
22150 .perslen = 32,
22151 },
22152};
22153
22154static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
22155 {
22156 .entropy = (unsigned char *)
22157 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
22158 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
22159 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
22160 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
22161 .entropylen = 48,
22162 .expected = (unsigned char *)
22163 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
22164 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
22165 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
22166 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
22167 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
22168 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
22169 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
22170 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
22171 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
22172 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
22173 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
22174 .expectedlen = 128,
22175 .addtla = NULL,
22176 .addtlb = NULL,
22177 .addtllen = 0,
22178 .pers = NULL,
22179 .perslen = 0,
22180 }, {
22181 .entropy = (unsigned char *)
22182 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
22183 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
22184 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
22185 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
22186 .entropylen = 48,
22187 .expected = (unsigned char *)
22188 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
22189 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
22190 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
22191 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
22192 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
22193 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
22194 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
22195 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
22196 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
22197 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
22198 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
22199 .expectedlen = 128,
22200 .addtla = (unsigned char *)
22201 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
22202 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
22203 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
22204 .addtlb = (unsigned char *)
22205 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
22206 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
22207 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
22208 .addtllen = 32,
22209 .pers = NULL,
22210 .perslen = 0,
22211 }, {
22212 .entropy = (unsigned char *)
22213 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
22214 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
22215 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
22216 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
22217 .entropylen = 48,
22218 .expected = (unsigned char *)
22219 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
22220 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
22221 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
22222 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
22223 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
22224 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
22225 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
22226 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
22227 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
22228 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
22229 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
22230 .expectedlen = 128,
22231 .addtla = NULL,
22232 .addtlb = NULL,
22233 .addtllen = 0,
22234 .pers = (unsigned char *)
22235 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
22236 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
22237 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
22238 .perslen = 32,
22239 }, {
22240 .entropy = (unsigned char *)
22241 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
22242 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
22243 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
22244 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
22245 .entropylen = 48,
22246 .expected = (unsigned char *)
22247 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
22248 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
22249 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
22250 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
22251 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
22252 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
22253 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
22254 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
22255 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
22256 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
22257 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
22258 .expectedlen = 128,
22259 .addtla = (unsigned char *)
22260 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
22261 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
22262 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
22263 .addtlb = (unsigned char *)
22264 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
22265 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
22266 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
22267 .addtllen = 32,
22268 .pers = (unsigned char *)
22269 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
22270 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
22271 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
22272 .perslen = 32,
22273 },
22274};
22275
22276static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
22277 {
22278 .entropy = (unsigned char *)
22279 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
22280 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
22281 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
22282 "\xac\x9b\xbb\x00",
22283 .entropylen = 40,
22284 .expected = (unsigned char *)
22285 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
22286 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
22287 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
22288 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
22289 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
22290 "\x9a\x9d\xf1\x0d",
22291 .expectedlen = 64,
22292 .addtla = NULL,
22293 .addtlb = NULL,
22294 .addtllen = 0,
22295 .pers = NULL,
22296 .perslen = 0,
22297 },
22298};
22299
22300static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
22301 {
22302 .entropy = (unsigned char *)
22303 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
22304 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
22305 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
22306 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
22307 .entropylen = 48,
22308 .expected = (unsigned char *)
22309 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
22310 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
22311 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
22312 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
22313 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
22314 "\xb4\xf0\x7e\x1d",
22315 .expectedlen = 64,
22316 .addtla = NULL,
22317 .addtlb = NULL,
22318 .addtllen = 0,
22319 .pers = NULL,
22320 .perslen = 0,
22321 },
22322};
22323
22324static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
22325 {
22326 .entropy = (unsigned char *)
22327 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
22328 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
22329 .entropylen = 24,
22330 .expected = (unsigned char *)
22331 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
22332 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
22333 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
22334 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
22335 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
22336 "\xcb\x2d\xd6\xb0",
22337 .expectedlen = 64,
22338 .addtla = NULL,
22339 .addtlb = NULL,
22340 .addtllen = 0,
22341 .pers = NULL,
22342 .perslen = 0,
22343 }, {
22344 .entropy = (unsigned char *)
22345 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
22346 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
22347 .entropylen = 24,
22348 .expected = (unsigned char *)
22349 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
22350 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
22351 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
22352 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
22353 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
22354 "\xc3\xdf\xb3\x81",
22355 .expectedlen = 64,
22356 .addtla = (unsigned char *)
22357 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
22358 "\x91\x4d\x81\x56",
22359 .addtlb = (unsigned char *)
22360 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
22361 "\x4a\x55\xd1\xc6",
22362 .addtllen = 16,
22363 .pers = NULL,
22364 .perslen = 0,
22365 }, {
22366 .entropy = (unsigned char *)
22367 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
22368 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
22369 .entropylen = 24,
22370 .expected = (unsigned char *)
22371 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
22372 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
22373 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
22374 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
22375 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
22376 "\x34\x30\x0c\x3d",
22377 .expectedlen = 64,
22378 .addtla = NULL,
22379 .addtlb = NULL,
22380 .addtllen = 0,
22381 .pers = (unsigned char *)
22382 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
22383 "\x0b\xc6\x97\x54",
22384 .perslen = 16,
22385 }, {
22386 .entropy = (unsigned char *)
22387 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
22388 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
22389 .entropylen = 24,
22390 .expected = (unsigned char *)
22391 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
22392 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
22393 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
22394 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
22395 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
22396 "\x2b\x49\x1e\x5c",
22397 .expectedlen = 64,
22398 .addtla = (unsigned char *)
22399 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
22400 "\x44\x85\xe7\xfe",
22401 .addtlb = (unsigned char *)
22402 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
22403 "\x82\x16\x62\x7f",
22404 .addtllen = 16,
22405 .pers = (unsigned char *)
22406 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
22407 "\x8e\xcf\xe0\x02",
22408 .perslen = 16,
22409 },
22410};
22411
Herbert Xuda7f0332008-07-31 17:08:25 +080022412/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022413#define CAST5_ENC_TEST_VECTORS 4
22414#define CAST5_DEC_TEST_VECTORS 4
22415#define CAST5_CBC_ENC_TEST_VECTORS 1
22416#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030022417#define CAST5_CTR_ENC_TEST_VECTORS 2
22418#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080022419
22420static struct cipher_testvec cast5_enc_tv_template[] = {
22421 {
22422 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22423 "\x23\x45\x67\x89\x34\x56\x78\x9a",
22424 .klen = 16,
22425 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22426 .ilen = 8,
22427 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
22428 .rlen = 8,
22429 }, {
22430 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22431 "\x23\x45",
22432 .klen = 10,
22433 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22434 .ilen = 8,
22435 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
22436 .rlen = 8,
22437 }, {
22438 .key = "\x01\x23\x45\x67\x12",
22439 .klen = 5,
22440 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22441 .ilen = 8,
22442 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
22443 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022444 }, { /* Generated from TF test vectors */
22445 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22446 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22447 .klen = 16,
22448 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22449 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22450 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22451 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22452 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22453 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22454 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22455 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22456 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22457 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22458 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22459 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22460 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22461 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22462 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22463 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22464 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22465 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22466 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22467 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22468 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22469 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22470 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22471 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22472 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22473 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22474 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22475 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22476 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22477 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22478 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22479 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22480 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22481 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22482 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22483 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22484 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22485 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22486 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22487 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22488 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22489 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22490 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22491 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22492 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22493 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22494 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22495 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22496 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22497 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22498 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22499 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22500 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22501 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22502 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22503 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22504 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22505 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22506 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22507 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22508 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22509 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22510 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22511 .ilen = 496,
22512 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
22513 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
22514 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
22515 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
22516 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
22517 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
22518 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
22519 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
22520 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
22521 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
22522 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
22523 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
22524 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
22525 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
22526 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
22527 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
22528 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
22529 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
22530 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
22531 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
22532 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
22533 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
22534 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
22535 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
22536 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
22537 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
22538 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
22539 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
22540 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
22541 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
22542 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
22543 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
22544 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
22545 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
22546 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
22547 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
22548 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
22549 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
22550 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
22551 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
22552 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
22553 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
22554 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
22555 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
22556 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
22557 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
22558 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
22559 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
22560 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
22561 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
22562 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
22563 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
22564 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
22565 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
22566 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
22567 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
22568 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
22569 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
22570 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
22571 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
22572 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
22573 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
22574 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022575 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022576 .np = 3,
22577 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080022578 },
22579};
22580
22581static struct cipher_testvec cast5_dec_tv_template[] = {
22582 {
22583 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22584 "\x23\x45\x67\x89\x34\x56\x78\x9a",
22585 .klen = 16,
22586 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
22587 .ilen = 8,
22588 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22589 .rlen = 8,
22590 }, {
22591 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
22592 "\x23\x45",
22593 .klen = 10,
22594 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
22595 .ilen = 8,
22596 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22597 .rlen = 8,
22598 }, {
22599 .key = "\x01\x23\x45\x67\x12",
22600 .klen = 5,
22601 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
22602 .ilen = 8,
22603 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
22604 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022605 }, { /* Generated from TF test vectors */
22606 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22607 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22608 .klen = 16,
22609 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22610 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
22611 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
22612 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
22613 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
22614 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
22615 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
22616 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
22617 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
22618 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
22619 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
22620 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
22621 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
22622 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
22623 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
22624 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
22625 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
22626 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
22627 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
22628 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
22629 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
22630 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
22631 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
22632 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
22633 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
22634 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
22635 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
22636 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
22637 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
22638 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
22639 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
22640 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
22641 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
22642 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
22643 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
22644 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
22645 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
22646 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
22647 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
22648 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
22649 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
22650 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
22651 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
22652 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
22653 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
22654 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
22655 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
22656 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
22657 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
22658 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
22659 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
22660 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
22661 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
22662 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
22663 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
22664 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
22665 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
22666 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
22667 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
22668 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
22669 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
22670 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
22671 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
22672 .ilen = 496,
22673 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22674 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22675 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22676 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22677 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22678 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22679 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22680 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22681 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22682 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22683 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22684 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22685 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22686 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22687 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22688 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22689 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22690 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22691 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22692 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22693 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22694 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22695 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22696 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22697 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22698 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22699 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22700 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22701 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22702 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22703 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22704 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22705 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22706 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22707 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22708 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22709 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22710 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22711 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22712 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22713 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22714 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22715 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22716 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22717 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22718 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22719 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22720 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22721 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22722 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22723 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22724 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22725 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22726 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22727 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22728 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22729 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22730 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22731 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22732 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22733 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22734 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22735 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022736 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022737 .np = 3,
22738 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022739 },
22740};
22741
22742static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
22743 { /* Generated from TF test vectors */
22744 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22745 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22746 .klen = 16,
22747 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22748 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22749 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22750 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22751 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22752 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22753 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22754 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22755 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22756 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22757 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22758 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22759 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22760 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22761 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22762 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22763 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22764 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22765 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22766 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22767 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22768 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22769 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22770 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22771 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22772 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22773 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22774 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22775 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22776 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22777 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22778 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22779 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22780 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22781 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22782 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22783 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22784 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22785 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22786 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22787 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22788 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22789 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22790 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22791 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22792 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22793 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22794 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22795 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22796 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22797 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22798 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22799 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22800 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22801 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22802 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22803 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22804 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22805 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22806 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22807 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22808 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22809 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22810 .ilen = 496,
22811 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
22812 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
22813 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
22814 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
22815 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
22816 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
22817 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
22818 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
22819 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
22820 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
22821 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
22822 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
22823 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
22824 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
22825 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
22826 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
22827 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
22828 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
22829 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
22830 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
22831 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
22832 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
22833 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
22834 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
22835 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
22836 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
22837 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
22838 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
22839 "\x90\x12\x37\x49\x27\x98\x69\x18"
22840 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
22841 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
22842 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
22843 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
22844 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
22845 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
22846 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
22847 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
22848 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
22849 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
22850 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
22851 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
22852 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
22853 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
22854 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
22855 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
22856 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
22857 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
22858 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
22859 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
22860 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
22861 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
22862 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
22863 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
22864 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
22865 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
22866 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
22867 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
22868 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
22869 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
22870 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
22871 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
22872 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
22873 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022874 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020022875 .np = 3,
22876 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020022877 },
22878};
22879
22880static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
22881 { /* Generated from TF test vectors */
22882 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22883 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
22884 .klen = 16,
22885 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
22886 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
22887 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
22888 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
22889 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
22890 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
22891 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
22892 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
22893 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
22894 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
22895 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
22896 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
22897 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
22898 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
22899 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
22900 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
22901 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
22902 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
22903 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
22904 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
22905 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
22906 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
22907 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
22908 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
22909 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
22910 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
22911 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
22912 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
22913 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
22914 "\x90\x12\x37\x49\x27\x98\x69\x18"
22915 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
22916 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
22917 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
22918 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
22919 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
22920 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
22921 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
22922 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
22923 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
22924 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
22925 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
22926 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
22927 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
22928 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
22929 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
22930 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
22931 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
22932 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
22933 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
22934 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
22935 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
22936 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
22937 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
22938 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
22939 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
22940 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
22941 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
22942 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
22943 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
22944 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
22945 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
22946 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
22947 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
22948 .ilen = 496,
22949 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22950 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22951 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22952 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22953 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22954 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22955 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22956 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22957 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22958 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22959 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22960 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22961 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22962 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22963 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22964 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22965 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22966 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22967 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22968 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22969 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22970 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22971 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22972 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22973 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22974 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22975 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22976 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22977 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22978 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22979 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22980 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22981 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22982 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22983 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22984 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22985 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22986 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22987 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22988 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22989 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22990 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22991 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22992 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22993 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22994 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22995 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22996 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22997 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22998 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22999 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23000 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23001 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23002 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23003 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23004 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23005 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23006 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23007 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23008 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23009 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23010 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23011 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023012 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023013 .np = 3,
23014 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023015 },
23016};
23017
23018static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
23019 { /* Generated from TF test vectors */
23020 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23021 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23022 .klen = 16,
23023 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23024 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23025 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023026 "\x3A",
23027 .ilen = 17,
23028 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23029 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23030 "\x0C",
23031 .rlen = 17,
23032 }, { /* Generated from TF test vectors */
23033 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23034 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23035 .klen = 16,
23036 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23037 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23038 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023039 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23040 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23041 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23042 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23043 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23044 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23045 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23046 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23047 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23048 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23049 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23050 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23051 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23052 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23053 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23054 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23055 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23056 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23057 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23058 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23059 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23060 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23061 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23062 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23063 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23064 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23065 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23066 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23067 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23068 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23069 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23070 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23071 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23072 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23073 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23074 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23075 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23076 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23077 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23078 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23079 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23080 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23081 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23082 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23083 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23084 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23085 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23086 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23087 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23088 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23089 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23090 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23091 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23092 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23093 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23094 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23095 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23096 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23097 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23098 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23099 .ilen = 496,
23100 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23101 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23102 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
23103 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
23104 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
23105 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
23106 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
23107 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
23108 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
23109 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
23110 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
23111 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
23112 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
23113 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
23114 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
23115 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
23116 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
23117 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
23118 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
23119 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
23120 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
23121 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
23122 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
23123 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
23124 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
23125 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
23126 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
23127 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
23128 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
23129 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
23130 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
23131 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
23132 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
23133 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
23134 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
23135 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
23136 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
23137 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
23138 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
23139 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
23140 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
23141 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
23142 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
23143 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
23144 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
23145 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
23146 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
23147 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
23148 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
23149 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
23150 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
23151 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
23152 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
23153 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
23154 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
23155 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
23156 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
23157 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
23158 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
23159 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
23160 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23161 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23162 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023163 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023164 .np = 3,
23165 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023166 },
23167};
23168
23169static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
23170 { /* Generated from TF test vectors */
23171 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23172 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23173 .klen = 16,
23174 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23175 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23176 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023177 "\x0C",
23178 .ilen = 17,
23179 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23180 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23181 "\x3A",
23182 .rlen = 17,
23183 }, { /* Generated from TF test vectors */
23184 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23185 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23186 .klen = 16,
23187 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23188 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23189 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023190 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
23191 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
23192 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
23193 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
23194 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
23195 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
23196 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
23197 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
23198 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
23199 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
23200 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
23201 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
23202 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
23203 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
23204 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
23205 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
23206 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
23207 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
23208 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
23209 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
23210 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
23211 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
23212 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
23213 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
23214 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
23215 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
23216 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
23217 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
23218 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
23219 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
23220 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
23221 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
23222 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
23223 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
23224 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
23225 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
23226 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
23227 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
23228 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
23229 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
23230 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
23231 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
23232 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
23233 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
23234 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
23235 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
23236 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
23237 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
23238 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
23239 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
23240 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
23241 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
23242 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
23243 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
23244 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
23245 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
23246 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
23247 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
23248 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23249 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23250 .ilen = 496,
23251 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23252 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23253 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23254 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23255 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23256 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23257 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23258 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23259 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23260 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23261 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23262 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23263 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23264 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23265 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23266 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23267 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23268 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23269 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23270 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23271 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23272 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23273 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23274 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23275 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23276 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23277 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23278 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23279 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23280 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23281 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23282 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23283 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23284 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23285 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23286 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23287 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23288 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23289 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23290 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23291 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23292 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23293 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23294 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23295 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23296 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23297 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23298 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23299 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23300 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23301 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23302 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23303 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23304 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23305 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23306 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23307 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23308 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23309 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23310 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23311 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23312 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23313 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023314 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023315 .np = 3,
23316 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023317 },
23318};
23319
23320/*
23321 * ARC4 test vectors from OpenSSL
23322 */
23323#define ARC4_ENC_TEST_VECTORS 7
23324#define ARC4_DEC_TEST_VECTORS 7
23325
23326static struct cipher_testvec arc4_enc_tv_template[] = {
23327 {
23328 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23329 .klen = 8,
23330 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23331 .ilen = 8,
23332 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
23333 .rlen = 8,
23334 }, {
23335 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23336 .klen = 8,
23337 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23338 .ilen = 8,
23339 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
23340 .rlen = 8,
23341 }, {
23342 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
23343 .klen = 8,
23344 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23345 .ilen = 8,
23346 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
23347 .rlen = 8,
23348 }, {
23349 .key = "\xef\x01\x23\x45",
23350 .klen = 4,
23351 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23352 "\x00\x00\x00\x00\x00\x00\x00\x00"
23353 "\x00\x00\x00\x00",
23354 .ilen = 20,
23355 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23356 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
23357 "\x36\xb6\x78\x58",
23358 .rlen = 20,
23359 }, {
23360 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23361 .klen = 8,
23362 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23363 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23364 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23365 "\x12\x34\x56\x78",
23366 .ilen = 28,
23367 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
23368 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
23369 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
23370 "\x40\x01\x1e\xcf",
23371 .rlen = 28,
23372 }, {
23373 .key = "\xef\x01\x23\x45",
23374 .klen = 4,
23375 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
23376 "\x00\x00",
23377 .ilen = 10,
23378 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23379 "\xbd\x61",
23380 .rlen = 10,
23381 }, {
23382 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
23383 "\x00\x00\x00\x00\x00\x00\x00\x00",
23384 .klen = 16,
23385 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
23386 .ilen = 8,
23387 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
23388 .rlen = 8,
23389 },
23390};
23391
23392static struct cipher_testvec arc4_dec_tv_template[] = {
23393 {
23394 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23395 .klen = 8,
23396 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
23397 .ilen = 8,
23398 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23399 .rlen = 8,
23400 }, {
23401 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23402 .klen = 8,
23403 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
23404 .ilen = 8,
23405 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23406 .rlen = 8,
23407 }, {
23408 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
23409 .klen = 8,
23410 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
23411 .ilen = 8,
23412 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23413 .rlen = 8,
23414 }, {
23415 .key = "\xef\x01\x23\x45",
23416 .klen = 4,
23417 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23418 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
23419 "\x36\xb6\x78\x58",
23420 .ilen = 20,
23421 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
23422 "\x00\x00\x00\x00\x00\x00\x00\x00"
23423 "\x00\x00\x00\x00",
23424 .rlen = 20,
23425 }, {
23426 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23427 .klen = 8,
23428 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
23429 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
23430 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
23431 "\x40\x01\x1e\xcf",
23432 .ilen = 28,
23433 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23434 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23435 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
23436 "\x12\x34\x56\x78",
23437 .rlen = 28,
23438 }, {
23439 .key = "\xef\x01\x23\x45",
23440 .klen = 4,
23441 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
23442 "\xbd\x61",
23443 .ilen = 10,
23444 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
23445 "\x00\x00",
23446 .rlen = 10,
23447 }, {
23448 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
23449 "\x00\x00\x00\x00\x00\x00\x00\x00",
23450 .klen = 16,
23451 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
23452 .ilen = 8,
23453 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
23454 .rlen = 8,
23455 },
23456};
23457
23458/*
23459 * TEA test vectors
23460 */
23461#define TEA_ENC_TEST_VECTORS 4
23462#define TEA_DEC_TEST_VECTORS 4
23463
23464static struct cipher_testvec tea_enc_tv_template[] = {
23465 {
23466 .key = zeroed_string,
23467 .klen = 16,
23468 .input = zeroed_string,
23469 .ilen = 8,
23470 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
23471 .rlen = 8,
23472 }, {
23473 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23474 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23475 .klen = 16,
23476 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23477 .ilen = 8,
23478 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
23479 .rlen = 8,
23480 }, {
23481 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23482 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23483 .klen = 16,
23484 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23485 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23486 .ilen = 16,
23487 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
23488 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
23489 .rlen = 16,
23490 }, {
23491 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23492 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23493 .klen = 16,
23494 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23495 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23496 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23497 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23498 .ilen = 32,
23499 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
23500 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
23501 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
23502 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
23503 .rlen = 32,
23504 }
23505};
23506
23507static struct cipher_testvec tea_dec_tv_template[] = {
23508 {
23509 .key = zeroed_string,
23510 .klen = 16,
23511 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
23512 .ilen = 8,
23513 .result = zeroed_string,
23514 .rlen = 8,
23515 }, {
23516 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23517 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23518 .klen = 16,
23519 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
23520 .ilen = 8,
23521 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23522 .rlen = 8,
23523 }, {
23524 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23525 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23526 .klen = 16,
23527 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
23528 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
23529 .ilen = 16,
23530 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23531 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23532 .rlen = 16,
23533 }, {
23534 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23535 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23536 .klen = 16,
23537 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
23538 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
23539 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
23540 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
23541 .ilen = 32,
23542 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
23543 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23544 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23545 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23546 .rlen = 32,
23547 }
23548};
23549
23550/*
23551 * XTEA test vectors
23552 */
23553#define XTEA_ENC_TEST_VECTORS 4
23554#define XTEA_DEC_TEST_VECTORS 4
23555
23556static struct cipher_testvec xtea_enc_tv_template[] = {
23557 {
23558 .key = zeroed_string,
23559 .klen = 16,
23560 .input = zeroed_string,
23561 .ilen = 8,
23562 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
23563 .rlen = 8,
23564 }, {
23565 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23566 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23567 .klen = 16,
23568 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23569 .ilen = 8,
23570 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
23571 .rlen = 8,
23572 }, {
23573 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23574 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23575 .klen = 16,
23576 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23577 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23578 .ilen = 16,
23579 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
23580 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
23581 .rlen = 16,
23582 }, {
23583 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23584 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23585 .klen = 16,
23586 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23587 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23588 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23589 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23590 .ilen = 32,
23591 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
23592 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
23593 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
23594 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
23595 .rlen = 32,
23596 }
23597};
23598
23599static struct cipher_testvec xtea_dec_tv_template[] = {
23600 {
23601 .key = zeroed_string,
23602 .klen = 16,
23603 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
23604 .ilen = 8,
23605 .result = zeroed_string,
23606 .rlen = 8,
23607 }, {
23608 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23609 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23610 .klen = 16,
23611 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
23612 .ilen = 8,
23613 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23614 .rlen = 8,
23615 }, {
23616 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23617 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23618 .klen = 16,
23619 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
23620 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
23621 .ilen = 16,
23622 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23623 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23624 .rlen = 16,
23625 }, {
23626 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23627 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23628 .klen = 16,
23629 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
23630 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
23631 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
23632 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
23633 .ilen = 32,
23634 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
23635 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23636 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23637 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23638 .rlen = 32,
23639 }
23640};
23641
23642/*
23643 * KHAZAD test vectors.
23644 */
23645#define KHAZAD_ENC_TEST_VECTORS 5
23646#define KHAZAD_DEC_TEST_VECTORS 5
23647
23648static struct cipher_testvec khazad_enc_tv_template[] = {
23649 {
23650 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
23651 "\x00\x00\x00\x00\x00\x00\x00\x00",
23652 .klen = 16,
23653 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
23654 .ilen = 8,
23655 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
23656 .rlen = 8,
23657 }, {
23658 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
23659 "\x38\x38\x38\x38\x38\x38\x38\x38",
23660 .klen = 16,
23661 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
23662 .ilen = 8,
23663 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
23664 .rlen = 8,
23665 }, {
23666 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
23667 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23668 .klen = 16,
23669 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23670 .ilen = 8,
23671 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
23672 .rlen = 8,
23673 }, {
23674 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23675 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23676 .klen = 16,
23677 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23678 .ilen = 8,
23679 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23680 .rlen = 8,
23681 }, {
23682 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23683 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23684 .klen = 16,
23685 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23686 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23687 .ilen = 16,
23688 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
23689 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23690 .rlen = 16,
23691 },
23692};
23693
23694static struct cipher_testvec khazad_dec_tv_template[] = {
23695 {
23696 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
23697 "\x00\x00\x00\x00\x00\x00\x00\x00",
23698 .klen = 16,
23699 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
23700 .ilen = 8,
23701 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
23702 .rlen = 8,
23703 }, {
23704 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
23705 "\x38\x38\x38\x38\x38\x38\x38\x38",
23706 .klen = 16,
23707 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
23708 .ilen = 8,
23709 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
23710 .rlen = 8,
23711 }, {
23712 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
23713 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23714 .klen = 16,
23715 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
23716 .ilen = 8,
23717 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
23718 .rlen = 8,
23719 }, {
23720 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23721 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23722 .klen = 16,
23723 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23724 .ilen = 8,
23725 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23726 .rlen = 8,
23727 }, {
23728 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23729 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23730 .klen = 16,
23731 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
23732 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
23733 .ilen = 16,
23734 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
23735 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
23736 .rlen = 16,
23737 },
23738};
23739
23740/*
23741 * Anubis test vectors.
23742 */
23743
23744#define ANUBIS_ENC_TEST_VECTORS 5
23745#define ANUBIS_DEC_TEST_VECTORS 5
23746#define ANUBIS_CBC_ENC_TEST_VECTORS 2
23747#define ANUBIS_CBC_DEC_TEST_VECTORS 2
23748
23749static struct cipher_testvec anubis_enc_tv_template[] = {
23750 {
23751 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23752 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23753 .klen = 16,
23754 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23755 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23756 .ilen = 16,
23757 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23758 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
23759 .rlen = 16,
23760 }, {
23761
23762 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
23763 "\x03\x03\x03\x03\x03\x03\x03\x03"
23764 "\x03\x03\x03\x03",
23765 .klen = 20,
23766 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
23767 "\x03\x03\x03\x03\x03\x03\x03\x03",
23768 .ilen = 16,
23769 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
23770 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
23771 .rlen = 16,
23772 }, {
23773 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
23774 "\x24\x24\x24\x24\x24\x24\x24\x24"
23775 "\x24\x24\x24\x24\x24\x24\x24\x24"
23776 "\x24\x24\x24\x24",
23777 .klen = 28,
23778 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
23779 "\x24\x24\x24\x24\x24\x24\x24\x24",
23780 .ilen = 16,
23781 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
23782 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
23783 .rlen = 16,
23784 }, {
23785 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
23786 "\x25\x25\x25\x25\x25\x25\x25\x25"
23787 "\x25\x25\x25\x25\x25\x25\x25\x25"
23788 "\x25\x25\x25\x25\x25\x25\x25\x25",
23789 .klen = 32,
23790 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
23791 "\x25\x25\x25\x25\x25\x25\x25\x25",
23792 .ilen = 16,
23793 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
23794 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
23795 .rlen = 16,
23796 }, {
23797 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23798 "\x35\x35\x35\x35\x35\x35\x35\x35"
23799 "\x35\x35\x35\x35\x35\x35\x35\x35"
23800 "\x35\x35\x35\x35\x35\x35\x35\x35"
23801 "\x35\x35\x35\x35\x35\x35\x35\x35",
23802 .klen = 40,
23803 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
23804 "\x35\x35\x35\x35\x35\x35\x35\x35",
23805 .ilen = 16,
23806 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23807 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
23808 .rlen = 16,
23809 },
23810};
23811
23812static struct cipher_testvec anubis_dec_tv_template[] = {
23813 {
23814 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23815 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23816 .klen = 16,
23817 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23818 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
23819 .ilen = 16,
23820 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23821 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23822 .rlen = 16,
23823 }, {
23824
23825 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
23826 "\x03\x03\x03\x03\x03\x03\x03\x03"
23827 "\x03\x03\x03\x03",
23828 .klen = 20,
23829 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
23830 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
23831 .ilen = 16,
23832 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
23833 "\x03\x03\x03\x03\x03\x03\x03\x03",
23834 .rlen = 16,
23835 }, {
23836 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
23837 "\x24\x24\x24\x24\x24\x24\x24\x24"
23838 "\x24\x24\x24\x24\x24\x24\x24\x24"
23839 "\x24\x24\x24\x24",
23840 .klen = 28,
23841 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
23842 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
23843 .ilen = 16,
23844 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
23845 "\x24\x24\x24\x24\x24\x24\x24\x24",
23846 .rlen = 16,
23847 }, {
23848 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
23849 "\x25\x25\x25\x25\x25\x25\x25\x25"
23850 "\x25\x25\x25\x25\x25\x25\x25\x25"
23851 "\x25\x25\x25\x25\x25\x25\x25\x25",
23852 .klen = 32,
23853 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
23854 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
23855 .ilen = 16,
23856 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
23857 "\x25\x25\x25\x25\x25\x25\x25\x25",
23858 .rlen = 16,
23859 }, {
23860 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23861 "\x35\x35\x35\x35\x35\x35\x35\x35"
23862 "\x35\x35\x35\x35\x35\x35\x35\x35"
23863 "\x35\x35\x35\x35\x35\x35\x35\x35"
23864 "\x35\x35\x35\x35\x35\x35\x35\x35",
23865 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23866 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
23867 .klen = 40,
23868 .ilen = 16,
23869 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
23870 "\x35\x35\x35\x35\x35\x35\x35\x35",
23871 .rlen = 16,
23872 },
23873};
23874
23875static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
23876 {
23877 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23878 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23879 .klen = 16,
23880 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23881 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23882 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23883 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23884 .ilen = 32,
23885 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23886 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
23887 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
23888 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
23889 .rlen = 32,
23890 }, {
23891 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23892 "\x35\x35\x35\x35\x35\x35\x35\x35"
23893 "\x35\x35\x35\x35\x35\x35\x35\x35"
23894 "\x35\x35\x35\x35\x35\x35\x35\x35"
23895 "\x35\x35\x35\x35\x35\x35\x35\x35",
23896 .klen = 40,
23897 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
23898 "\x35\x35\x35\x35\x35\x35\x35\x35"
23899 "\x35\x35\x35\x35\x35\x35\x35\x35"
23900 "\x35\x35\x35\x35\x35\x35\x35\x35",
23901 .ilen = 32,
23902 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23903 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
23904 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
23905 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
23906 .rlen = 32,
23907 },
23908};
23909
23910static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
23911 {
23912 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23913 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23914 .klen = 16,
23915 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
23916 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
23917 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
23918 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
23919 .ilen = 32,
23920 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23921 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23922 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
23923 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
23924 .rlen = 32,
23925 }, {
23926 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
23927 "\x35\x35\x35\x35\x35\x35\x35\x35"
23928 "\x35\x35\x35\x35\x35\x35\x35\x35"
23929 "\x35\x35\x35\x35\x35\x35\x35\x35"
23930 "\x35\x35\x35\x35\x35\x35\x35\x35",
23931 .klen = 40,
23932 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
23933 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
23934 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
23935 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
23936 .ilen = 32,
23937 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
23938 "\x35\x35\x35\x35\x35\x35\x35\x35"
23939 "\x35\x35\x35\x35\x35\x35\x35\x35"
23940 "\x35\x35\x35\x35\x35\x35\x35\x35",
23941 .rlen = 32,
23942 },
23943};
23944
23945/*
23946 * XETA test vectors
23947 */
23948#define XETA_ENC_TEST_VECTORS 4
23949#define XETA_DEC_TEST_VECTORS 4
23950
23951static struct cipher_testvec xeta_enc_tv_template[] = {
23952 {
23953 .key = zeroed_string,
23954 .klen = 16,
23955 .input = zeroed_string,
23956 .ilen = 8,
23957 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
23958 .rlen = 8,
23959 }, {
23960 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
23961 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
23962 .klen = 16,
23963 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
23964 .ilen = 8,
23965 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
23966 .rlen = 8,
23967 }, {
23968 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
23969 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
23970 .klen = 16,
23971 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
23972 "\x65\x73\x74\x5f\x76\x65\x63\x74",
23973 .ilen = 16,
23974 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
23975 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
23976 .rlen = 16,
23977 }, {
23978 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
23979 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
23980 .klen = 16,
23981 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
23982 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
23983 "\x79\x6f\x75\x21\x21\x21\x20\x72"
23984 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
23985 .ilen = 32,
23986 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
23987 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
23988 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
23989 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
23990 .rlen = 32,
23991 }
23992};
23993
23994static struct cipher_testvec xeta_dec_tv_template[] = {
23995 {
23996 .key = zeroed_string,
23997 .klen = 16,
23998 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
23999 .ilen = 8,
24000 .result = zeroed_string,
24001 .rlen = 8,
24002 }, {
24003 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24004 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24005 .klen = 16,
24006 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
24007 .ilen = 8,
24008 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24009 .rlen = 8,
24010 }, {
24011 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24012 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24013 .klen = 16,
24014 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
24015 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
24016 .ilen = 16,
24017 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24018 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24019 .rlen = 16,
24020 }, {
24021 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24022 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24023 .klen = 16,
24024 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
24025 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
24026 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
24027 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
24028 .ilen = 32,
24029 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24030 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24031 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24032 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24033 .rlen = 32,
24034 }
24035};
24036
24037/*
24038 * FCrypt test vectors
24039 */
24040#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
24041#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
24042
24043static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
24044 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24045 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24046 .klen = 8,
24047 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24048 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24049 .ilen = 8,
24050 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24051 .rlen = 8,
24052 }, {
24053 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24054 .klen = 8,
24055 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24056 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24057 .ilen = 8,
24058 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24059 .rlen = 8,
24060 }, { /* From Arla */
24061 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24062 .klen = 8,
24063 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24064 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24065 .ilen = 48,
24066 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24067 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24068 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24069 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24070 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24071 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24072 .rlen = 48,
24073 }, {
24074 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24075 .klen = 8,
24076 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24077 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24078 .ilen = 48,
24079 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24080 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24081 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24082 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24083 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24084 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24085 .rlen = 48,
24086 }, { /* split-page version */
24087 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24088 .klen = 8,
24089 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24090 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24091 .ilen = 48,
24092 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24093 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24094 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24095 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24096 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24097 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24098 .rlen = 48,
24099 .np = 2,
24100 .tap = { 20, 28 },
24101 }
24102};
24103
24104static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
24105 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24106 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24107 .klen = 8,
24108 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24109 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24110 .ilen = 8,
24111 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24112 .rlen = 8,
24113 }, {
24114 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24115 .klen = 8,
24116 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24117 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24118 .ilen = 8,
24119 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24120 .rlen = 8,
24121 }, { /* From Arla */
24122 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24123 .klen = 8,
24124 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24125 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24126 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24127 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24128 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24129 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24130 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24131 .ilen = 48,
24132 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24133 .rlen = 48,
24134 }, {
24135 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24136 .klen = 8,
24137 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24138 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24139 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24140 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24141 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24142 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24143 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24144 .ilen = 48,
24145 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24146 .rlen = 48,
24147 }, { /* split-page version */
24148 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24149 .klen = 8,
24150 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24151 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24152 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24153 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24154 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24155 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24156 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24157 .ilen = 48,
24158 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24159 .rlen = 48,
24160 .np = 2,
24161 .tap = { 20, 28 },
24162 }
24163};
24164
24165/*
24166 * CAMELLIA test vectors.
24167 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024168#define CAMELLIA_ENC_TEST_VECTORS 4
24169#define CAMELLIA_DEC_TEST_VECTORS 4
24170#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
24171#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
24172#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
24173#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
24174#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
24175#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
24176#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
24177#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080024178
24179static struct cipher_testvec camellia_enc_tv_template[] = {
24180 {
24181 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24182 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24183 .klen = 16,
24184 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24185 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24186 .ilen = 16,
24187 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
24188 "\x08\x57\x06\x56\x48\xea\xbe\x43",
24189 .rlen = 16,
24190 }, {
24191 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24192 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24193 "\x00\x11\x22\x33\x44\x55\x66\x77",
24194 .klen = 24,
24195 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24196 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24197 .ilen = 16,
24198 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
24199 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
24200 .rlen = 16,
24201 }, {
24202 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24203 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24204 "\x00\x11\x22\x33\x44\x55\x66\x77"
24205 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
24206 .klen = 32,
24207 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24208 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24209 .ilen = 16,
24210 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
24211 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
24212 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024213 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024214 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
24215 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
24216 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
24217 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
24218 .klen = 32,
24219 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24220 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24221 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24222 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24223 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024224 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24225 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24226 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24227 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24228 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24229 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24230 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24231 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24232 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24233 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24234 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24235 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24236 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24237 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24238 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24239 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24240 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24241 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24242 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24243 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24244 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24245 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24246 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24247 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24248 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24249 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24250 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24251 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24252 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24253 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24254 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24255 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24256 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24257 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24258 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24259 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24260 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24261 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24262 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24263 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24264 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24265 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24266 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24267 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24268 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24269 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24270 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24271 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24272 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24273 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24274 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24275 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24276 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24277 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24278 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24279 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024280 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24281 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24282 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24283 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24284 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24285 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24286 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24287 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24288 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24289 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24290 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24291 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24292 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24293 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24294 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24295 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24296 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24297 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24298 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24299 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24300 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24301 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24302 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24303 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24304 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24305 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24306 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24307 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24308 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24309 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24310 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24311 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24312 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24313 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24314 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24315 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24316 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24317 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24318 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24319 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24320 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24321 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24322 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24323 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24324 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24325 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24326 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24327 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24328 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24329 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24330 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24331 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24332 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24333 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24334 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24335 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24336 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24337 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24338 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24339 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24340 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24341 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24342 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24343 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24344 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24345 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024346 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
24347 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
24348 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
24349 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
24350 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024351 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
24352 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
24353 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
24354 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
24355 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
24356 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
24357 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
24358 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
24359 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
24360 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
24361 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
24362 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
24363 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
24364 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
24365 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
24366 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
24367 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
24368 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
24369 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
24370 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
24371 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
24372 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
24373 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
24374 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
24375 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
24376 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
24377 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
24378 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
24379 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
24380 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
24381 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
24382 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
24383 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
24384 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
24385 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
24386 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
24387 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
24388 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
24389 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
24390 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
24391 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
24392 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
24393 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
24394 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
24395 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
24396 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
24397 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
24398 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
24399 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
24400 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
24401 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
24402 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
24403 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
24404 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
24405 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
24406 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024407 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
24408 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
24409 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
24410 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
24411 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
24412 "\xED\x28\x39\xE9\x63\xED\x41\x70"
24413 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
24414 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
24415 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
24416 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
24417 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
24418 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
24419 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
24420 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
24421 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
24422 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
24423 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
24424 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
24425 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
24426 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
24427 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
24428 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
24429 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
24430 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
24431 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
24432 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
24433 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
24434 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
24435 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
24436 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
24437 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
24438 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
24439 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
24440 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
24441 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
24442 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
24443 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
24444 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
24445 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
24446 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
24447 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
24448 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
24449 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
24450 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
24451 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
24452 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
24453 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
24454 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
24455 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
24456 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
24457 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
24458 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
24459 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
24460 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
24461 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
24462 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
24463 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
24464 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
24465 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
24466 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
24467 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
24468 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
24469 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
24470 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
24471 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
24472 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024473 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024474 .np = 3,
24475 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024476 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024477};
24478
24479static struct cipher_testvec camellia_dec_tv_template[] = {
24480 {
24481 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24482 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24483 .klen = 16,
24484 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
24485 "\x08\x57\x06\x56\x48\xea\xbe\x43",
24486 .ilen = 16,
24487 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24488 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24489 .rlen = 16,
24490 }, {
24491 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24492 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24493 "\x00\x11\x22\x33\x44\x55\x66\x77",
24494 .klen = 24,
24495 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
24496 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
24497 .ilen = 16,
24498 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24499 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24500 .rlen = 16,
24501 }, {
24502 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24503 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
24504 "\x00\x11\x22\x33\x44\x55\x66\x77"
24505 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
24506 .klen = 32,
24507 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
24508 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
24509 .ilen = 16,
24510 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
24511 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24512 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024513 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024514 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
24515 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
24516 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
24517 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
24518 .klen = 32,
24519 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
24520 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
24521 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
24522 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
24523 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024524 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
24525 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
24526 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
24527 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
24528 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
24529 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
24530 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
24531 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
24532 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
24533 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
24534 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
24535 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
24536 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
24537 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
24538 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
24539 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
24540 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
24541 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
24542 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
24543 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
24544 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
24545 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
24546 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
24547 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
24548 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
24549 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
24550 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
24551 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
24552 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
24553 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
24554 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
24555 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
24556 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
24557 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
24558 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
24559 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
24560 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
24561 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
24562 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
24563 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
24564 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
24565 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
24566 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
24567 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
24568 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
24569 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
24570 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
24571 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
24572 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
24573 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
24574 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
24575 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
24576 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
24577 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
24578 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
24579 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024580 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
24581 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
24582 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
24583 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
24584 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
24585 "\xED\x28\x39\xE9\x63\xED\x41\x70"
24586 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
24587 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
24588 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
24589 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
24590 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
24591 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
24592 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
24593 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
24594 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
24595 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
24596 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
24597 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
24598 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
24599 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
24600 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
24601 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
24602 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
24603 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
24604 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
24605 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
24606 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
24607 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
24608 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
24609 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
24610 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
24611 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
24612 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
24613 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
24614 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
24615 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
24616 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
24617 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
24618 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
24619 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
24620 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
24621 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
24622 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
24623 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
24624 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
24625 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
24626 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
24627 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
24628 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
24629 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
24630 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
24631 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
24632 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
24633 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
24634 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
24635 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
24636 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
24637 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
24638 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
24639 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
24640 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
24641 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
24642 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
24643 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
24644 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
24645 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024646 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24647 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24648 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24649 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24650 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024651 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24652 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24653 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24654 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24655 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24656 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24657 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24658 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24659 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24660 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24661 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24662 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24663 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24664 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24665 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24666 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24667 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24668 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24669 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24670 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24671 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24672 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24673 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24674 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24675 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24676 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24677 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24678 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24679 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24680 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24681 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24682 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24683 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24684 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24685 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24686 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24687 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24688 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24689 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24690 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24691 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24692 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24693 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24694 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24695 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24696 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24697 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24698 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24699 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24700 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24701 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24702 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24703 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24704 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24705 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24706 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024707 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24708 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24709 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24710 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24711 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24712 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24713 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24714 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24715 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24716 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24717 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24718 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24719 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24720 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24721 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24722 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24723 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24724 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24725 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24726 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24727 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24728 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24729 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24730 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24731 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24732 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24733 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24734 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24735 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24736 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24737 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24738 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24739 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24740 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24741 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24742 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24743 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24744 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24745 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24746 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24747 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24748 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24749 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24750 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24751 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24752 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24753 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24754 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24755 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24756 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24757 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24758 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24759 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24760 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24761 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24762 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24763 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24764 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24765 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24766 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24767 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24768 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24769 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24770 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24771 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24772 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024773 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024774 .np = 3,
24775 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024776 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024777};
24778
24779static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
24780 {
24781 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
24782 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
24783 .klen = 16,
24784 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
24785 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
24786 .input = "Single block msg",
24787 .ilen = 16,
24788 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
24789 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
24790 .rlen = 16,
24791 }, {
24792 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
24793 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
24794 .klen = 16,
24795 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
24796 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
24797 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
24798 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24799 "\x10\x11\x12\x13\x14\x15\x16\x17"
24800 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
24801 .ilen = 32,
24802 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
24803 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
24804 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
24805 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
24806 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024807 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020024808 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24809 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
24810 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
24811 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
24812 .klen = 32,
24813 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
24814 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
24815 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24816 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24817 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24818 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24819 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024820 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24821 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24822 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24823 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24824 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24825 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24826 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24827 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24828 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24829 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24830 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24831 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24832 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24833 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24834 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24835 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24836 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24837 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24838 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24839 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24840 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24841 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24842 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24843 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24844 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24845 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24846 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24847 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24848 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24849 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24850 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24851 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24852 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24853 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24854 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24855 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24856 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24857 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24858 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24859 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24860 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24861 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24862 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24863 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24864 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24865 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24866 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24867 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24868 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24869 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24870 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24871 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24872 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24873 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24874 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24875 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030024876 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
24877 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
24878 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
24879 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
24880 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
24881 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
24882 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
24883 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
24884 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
24885 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
24886 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
24887 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
24888 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
24889 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
24890 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
24891 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
24892 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
24893 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
24894 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
24895 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
24896 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
24897 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
24898 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
24899 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
24900 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
24901 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
24902 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
24903 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
24904 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
24905 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
24906 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
24907 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
24908 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
24909 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
24910 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
24911 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
24912 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
24913 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
24914 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
24915 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
24916 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
24917 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
24918 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
24919 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
24920 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
24921 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
24922 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
24923 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
24924 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
24925 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
24926 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
24927 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
24928 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
24929 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
24930 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
24931 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
24932 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
24933 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
24934 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
24935 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
24936 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
24937 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
24938 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
24939 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
24940 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
24941 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020024942 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
24943 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
24944 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
24945 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
24946 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030024947 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
24948 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
24949 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
24950 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
24951 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
24952 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
24953 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
24954 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
24955 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
24956 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
24957 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
24958 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
24959 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
24960 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
24961 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
24962 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
24963 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
24964 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
24965 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
24966 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
24967 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
24968 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
24969 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
24970 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
24971 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
24972 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
24973 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
24974 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
24975 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
24976 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
24977 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
24978 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
24979 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
24980 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
24981 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
24982 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
24983 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
24984 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
24985 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
24986 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
24987 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
24988 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
24989 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
24990 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
24991 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
24992 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
24993 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
24994 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
24995 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
24996 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
24997 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
24998 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
24999 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
25000 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
25001 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
25002 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025003 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
25004 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
25005 "\x21\x41\x56\x72\x13\xE1\x86\x07"
25006 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
25007 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
25008 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
25009 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
25010 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
25011 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
25012 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
25013 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
25014 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
25015 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
25016 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
25017 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
25018 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
25019 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
25020 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
25021 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
25022 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
25023 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
25024 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
25025 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
25026 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
25027 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
25028 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
25029 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
25030 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
25031 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
25032 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
25033 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
25034 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
25035 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
25036 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
25037 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
25038 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
25039 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
25040 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
25041 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
25042 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
25043 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
25044 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
25045 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
25046 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
25047 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
25048 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
25049 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
25050 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
25051 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
25052 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
25053 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
25054 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
25055 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
25056 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
25057 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
25058 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
25059 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
25060 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
25061 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
25062 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
25063 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
25064 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
25065 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
25066 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
25067 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
25068 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025069 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025070 .np = 3,
25071 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025072 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025073};
25074
25075static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
25076 {
25077 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25078 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25079 .klen = 16,
25080 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25081 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25082 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25083 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25084 .ilen = 16,
25085 .result = "Single block msg",
25086 .rlen = 16,
25087 }, {
25088 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25089 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25090 .klen = 16,
25091 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25092 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25093 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25094 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25095 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25096 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25097 .ilen = 32,
25098 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
25099 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25100 "\x10\x11\x12\x13\x14\x15\x16\x17"
25101 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25102 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025103 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025104 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25105 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25106 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25107 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25108 .klen = 32,
25109 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25110 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25111 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
25112 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
25113 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
25114 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
25115 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025116 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
25117 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
25118 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
25119 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
25120 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
25121 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
25122 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
25123 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
25124 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
25125 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
25126 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
25127 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
25128 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
25129 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
25130 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
25131 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
25132 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
25133 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
25134 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
25135 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
25136 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
25137 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
25138 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
25139 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
25140 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
25141 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
25142 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
25143 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
25144 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
25145 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
25146 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
25147 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
25148 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
25149 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
25150 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
25151 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
25152 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
25153 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
25154 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
25155 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
25156 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
25157 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
25158 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
25159 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
25160 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
25161 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
25162 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
25163 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
25164 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
25165 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
25166 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
25167 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
25168 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
25169 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
25170 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
25171 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025172 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
25173 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
25174 "\x21\x41\x56\x72\x13\xE1\x86\x07"
25175 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
25176 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
25177 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
25178 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
25179 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
25180 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
25181 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
25182 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
25183 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
25184 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
25185 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
25186 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
25187 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
25188 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
25189 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
25190 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
25191 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
25192 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
25193 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
25194 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
25195 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
25196 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
25197 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
25198 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
25199 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
25200 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
25201 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
25202 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
25203 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
25204 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
25205 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
25206 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
25207 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
25208 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
25209 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
25210 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
25211 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
25212 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
25213 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
25214 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
25215 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
25216 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
25217 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
25218 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
25219 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
25220 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
25221 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
25222 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
25223 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
25224 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
25225 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
25226 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
25227 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
25228 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
25229 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
25230 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
25231 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
25232 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
25233 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
25234 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
25235 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
25236 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
25237 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025238 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25239 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25240 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25241 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25242 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025243 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25244 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25245 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25246 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25247 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25248 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25249 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25250 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25251 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25252 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25253 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25254 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25255 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25256 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25257 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25258 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25259 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25260 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25261 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25262 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25263 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25264 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25265 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25266 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25267 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25268 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25269 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25270 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25271 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25272 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25273 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25274 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25275 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25276 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25277 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25278 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25279 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25280 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25281 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25282 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25283 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25284 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25285 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25286 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25287 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25288 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25289 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25290 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25291 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25292 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25293 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25294 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25295 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25296 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25297 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25298 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025299 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25300 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25301 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25302 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25303 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25304 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25305 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25306 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25307 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25308 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25309 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25310 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25311 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25312 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25313 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25314 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25315 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25316 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25317 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25318 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25319 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25320 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25321 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25322 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25323 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25324 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25325 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25326 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25327 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25328 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25329 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25330 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25331 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25332 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25333 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25334 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25335 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25336 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25337 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25338 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25339 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25340 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25341 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25342 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25343 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25344 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25345 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25346 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25347 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25348 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25349 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25350 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25351 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25352 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25353 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25354 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25355 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25356 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25357 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25358 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25359 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25360 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25361 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25362 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25363 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25364 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025365 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025366 .np = 3,
25367 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025368 },
25369};
25370
25371static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
25372 { /* Generated with Crypto++ */
25373 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25374 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25375 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25376 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25377 .klen = 32,
25378 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25379 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25380 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25381 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25382 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25383 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25384 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025385 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25386 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25387 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25388 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25389 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25390 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25391 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25392 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25393 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25394 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25395 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25396 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25397 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25398 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25399 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25400 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25401 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25402 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25403 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25404 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25405 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25406 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25407 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25408 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25409 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25410 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25411 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25412 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25413 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25414 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25415 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25416 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25417 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25418 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25419 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25420 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25421 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25422 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25423 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25424 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25425 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25426 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25427 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25428 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25429 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25430 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25431 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25432 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25433 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25434 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25435 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25436 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25437 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25438 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25439 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25440 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25441 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25442 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025443 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
25444 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
25445 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
25446 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
25447 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025448 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
25449 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
25450 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
25451 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
25452 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
25453 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
25454 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
25455 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
25456 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
25457 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
25458 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
25459 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
25460 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
25461 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
25462 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
25463 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
25464 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
25465 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
25466 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
25467 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
25468 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
25469 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
25470 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
25471 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
25472 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
25473 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
25474 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
25475 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
25476 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
25477 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
25478 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
25479 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
25480 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
25481 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
25482 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
25483 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
25484 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
25485 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
25486 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
25487 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
25488 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
25489 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
25490 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
25491 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
25492 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
25493 "\x76\x44\x45\xF3\x24\x11\x57\x98"
25494 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
25495 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
25496 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
25497 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
25498 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
25499 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
25500 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
25501 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
25502 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
25503 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
25504 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
25505 .rlen = 496,
25506 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025507 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25508 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25509 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25510 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25511 .klen = 32,
25512 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25513 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25514 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25515 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25516 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25517 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25518 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25519 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025520 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25521 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25522 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25523 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25524 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25525 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25526 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25527 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25528 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25529 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25530 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25531 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25532 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25533 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25534 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25535 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25536 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25537 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25538 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25539 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25540 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25541 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25542 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25543 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25544 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25545 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25546 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25547 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25548 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25549 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25550 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25551 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25552 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25553 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25554 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25555 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25556 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25557 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25558 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25559 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25560 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25561 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25562 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25563 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25564 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25565 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25566 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25567 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25568 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25569 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25570 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25571 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25572 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25573 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25574 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25575 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025576 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25577 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25578 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25579 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25580 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25581 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25582 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25583 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25584 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25585 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25586 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25587 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25588 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25589 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25590 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25591 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25592 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25593 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25594 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25595 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25596 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25597 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25598 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25599 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25600 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25601 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25602 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25603 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25604 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25605 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25606 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25607 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25608 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25609 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25610 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25611 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25612 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25613 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25614 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25615 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25616 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25617 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25618 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25619 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25620 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25621 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25622 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25623 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25624 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25625 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25626 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25627 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25628 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25629 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25630 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25631 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25632 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25633 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25634 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25635 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25636 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25637 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25638 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25639 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
25640 "\xE4\x7B\x12",
25641 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025642 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
25643 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
25644 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
25645 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
25646 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
25647 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025648 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
25649 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
25650 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
25651 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
25652 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
25653 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
25654 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
25655 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
25656 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
25657 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
25658 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
25659 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
25660 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
25661 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
25662 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
25663 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
25664 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
25665 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
25666 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
25667 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
25668 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
25669 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
25670 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
25671 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
25672 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
25673 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
25674 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
25675 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
25676 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
25677 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
25678 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
25679 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
25680 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
25681 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
25682 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
25683 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
25684 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
25685 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
25686 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
25687 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
25688 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
25689 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
25690 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
25691 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
25692 "\x76\x44\x45\xF3\x24\x11\x57\x98"
25693 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
25694 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
25695 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
25696 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
25697 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
25698 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
25699 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
25700 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
25701 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
25702 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
25703 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025704 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
25705 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
25706 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
25707 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
25708 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
25709 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
25710 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
25711 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
25712 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
25713 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
25714 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
25715 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
25716 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
25717 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
25718 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
25719 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
25720 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
25721 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
25722 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
25723 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
25724 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
25725 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
25726 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
25727 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
25728 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
25729 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
25730 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
25731 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
25732 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
25733 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
25734 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
25735 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
25736 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
25737 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
25738 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
25739 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
25740 "\x00\x70\x12\x56\x56\x50\xAD\x14"
25741 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
25742 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
25743 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
25744 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
25745 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
25746 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
25747 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
25748 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
25749 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
25750 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
25751 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
25752 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
25753 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
25754 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
25755 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
25756 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
25757 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
25758 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
25759 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
25760 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
25761 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
25762 "\x74\x28\x9D\x05\x30\x20\x62\x41"
25763 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
25764 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
25765 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
25766 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
25767 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
25768 "\xF1\x6B\xD9",
25769 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025770 .also_non_np = 1,
25771 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025772 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030025773 }, { /* Generated with Crypto++ */
25774 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25775 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25776 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25777 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25778 .klen = 32,
25779 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
25780 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
25781 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25782 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25783 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25784 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25785 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25786 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25787 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25788 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25789 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25790 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25791 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25792 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25793 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25794 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25795 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25796 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25797 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25798 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25799 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25800 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25801 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25802 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25803 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25804 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25805 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25806 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25807 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25808 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25809 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25810 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25811 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25812 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25813 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25814 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25815 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25816 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25817 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25818 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25819 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25820 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25821 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25822 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25823 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25824 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25825 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25826 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25827 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25828 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25829 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25830 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25831 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25832 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25833 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25834 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25835 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25836 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25837 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25838 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25839 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25840 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25841 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025842 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25843 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25844 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25845 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25846 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25847 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25848 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25849 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25850 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25851 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25852 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25853 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25854 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25855 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25856 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25857 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25858 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25859 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25860 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25861 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25862 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25863 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25864 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25865 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25866 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25867 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25868 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25869 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25870 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25871 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25872 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25873 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25874 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25875 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25876 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25877 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25878 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25879 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25880 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25881 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25882 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25883 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25884 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25885 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25886 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25887 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25888 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25889 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25890 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25891 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25892 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25893 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25894 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25895 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25896 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25897 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25898 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25899 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25900 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25901 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25902 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25903 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25904 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25905 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25906 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25907 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030025908 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
25909 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
25910 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
25911 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
25912 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
25913 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
25914 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
25915 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
25916 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
25917 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
25918 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
25919 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
25920 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
25921 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
25922 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
25923 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
25924 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
25925 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
25926 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
25927 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
25928 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
25929 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
25930 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
25931 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
25932 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
25933 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
25934 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
25935 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
25936 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
25937 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
25938 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
25939 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
25940 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
25941 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
25942 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
25943 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
25944 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
25945 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
25946 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
25947 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
25948 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
25949 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
25950 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
25951 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
25952 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
25953 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
25954 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
25955 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
25956 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
25957 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
25958 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
25959 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
25960 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
25961 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
25962 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
25963 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
25964 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
25965 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
25966 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
25967 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
25968 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025969 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
25970 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
25971 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
25972 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
25973 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
25974 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
25975 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
25976 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
25977 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
25978 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
25979 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
25980 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
25981 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
25982 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
25983 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
25984 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
25985 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
25986 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
25987 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
25988 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
25989 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
25990 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
25991 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
25992 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
25993 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
25994 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
25995 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
25996 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
25997 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
25998 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
25999 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
26000 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
26001 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
26002 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
26003 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
26004 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
26005 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
26006 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
26007 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
26008 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
26009 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
26010 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
26011 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
26012 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
26013 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
26014 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
26015 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
26016 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
26017 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
26018 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
26019 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
26020 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
26021 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
26022 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
26023 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
26024 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
26025 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
26026 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
26027 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
26028 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
26029 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
26030 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
26031 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
26032 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
26033 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
26034 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026035 },
26036};
26037
26038static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
26039 { /* Generated with Crypto++ */
26040 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26041 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26042 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26043 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26044 .klen = 32,
26045 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26046 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26047 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26048 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26049 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26050 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26051 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026052 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26053 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26054 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26055 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26056 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26057 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26058 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26059 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26060 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26061 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26062 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26063 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26064 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26065 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26066 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26067 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26068 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26069 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26070 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26071 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26072 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26073 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26074 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26075 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26076 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26077 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26078 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26079 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26080 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26081 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26082 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26083 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26084 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26085 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26086 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26087 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26088 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26089 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26090 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26091 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26092 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26093 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26094 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26095 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26096 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26097 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26098 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26099 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26100 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26101 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26102 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26103 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26104 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26105 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26106 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26107 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26108 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26109 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026110 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26111 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26112 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26113 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26114 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026115 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26116 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26117 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26118 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26119 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26120 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26121 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26122 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26123 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26124 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26125 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26126 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26127 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26128 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26129 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26130 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26131 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26132 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26133 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26134 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26135 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26136 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26137 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26138 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26139 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26140 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26141 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26142 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26143 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26144 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26145 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26146 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26147 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26148 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26149 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26150 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26151 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26152 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26153 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26154 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26155 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26156 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26157 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26158 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26159 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26160 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26161 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26162 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26163 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26164 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26165 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26166 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26167 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26168 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26169 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26170 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26171 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26172 .rlen = 496,
26173 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026174 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26175 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26176 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26177 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26178 .klen = 32,
26179 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26180 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26181 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26182 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26183 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26184 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26185 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
26186 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026187 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26188 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26189 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26190 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26191 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26192 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26193 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26194 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26195 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26196 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26197 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26198 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26199 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26200 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26201 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26202 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26203 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26204 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26205 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26206 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26207 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26208 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26209 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26210 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26211 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26212 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26213 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26214 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26215 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26216 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26217 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26218 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26219 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26220 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26221 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26222 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26223 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26224 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26225 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26226 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26227 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26228 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26229 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26230 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26231 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26232 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26233 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26234 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26235 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26236 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26237 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26238 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26239 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26240 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26241 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26242 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026243 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
26244 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
26245 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
26246 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
26247 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
26248 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
26249 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
26250 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
26251 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
26252 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
26253 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
26254 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
26255 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
26256 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
26257 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
26258 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
26259 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
26260 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
26261 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
26262 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
26263 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
26264 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
26265 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
26266 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
26267 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
26268 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
26269 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
26270 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
26271 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
26272 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
26273 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
26274 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
26275 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
26276 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
26277 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
26278 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
26279 "\x00\x70\x12\x56\x56\x50\xAD\x14"
26280 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
26281 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
26282 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
26283 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
26284 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
26285 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
26286 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
26287 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
26288 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
26289 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
26290 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
26291 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
26292 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
26293 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
26294 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
26295 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
26296 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
26297 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
26298 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
26299 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
26300 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
26301 "\x74\x28\x9D\x05\x30\x20\x62\x41"
26302 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
26303 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
26304 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
26305 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
26306 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
26307 "\xF1\x6B\xD9",
26308 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026309 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26310 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26311 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26312 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26313 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26314 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026315 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26316 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26317 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26318 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26319 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26320 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26321 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26322 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26323 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26324 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26325 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26326 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26327 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26328 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26329 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26330 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26331 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26332 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26333 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26334 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26335 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26336 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26337 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26338 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26339 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26340 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26341 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26342 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26343 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26344 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26345 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26346 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26347 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26348 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26349 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26350 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26351 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26352 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26353 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26354 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26355 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26356 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26357 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26358 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26359 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26360 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26361 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26362 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26363 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26364 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26365 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26366 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26367 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26368 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26369 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26370 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026371 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26372 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26373 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26374 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26375 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26376 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26377 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26378 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26379 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26380 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26381 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26382 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26383 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26384 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26385 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26386 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26387 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26388 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26389 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26390 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26391 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26392 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26393 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26394 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26395 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26396 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26397 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26398 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26399 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26400 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26401 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26402 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26403 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26404 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26405 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26406 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26407 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26408 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26409 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26410 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26411 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26412 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26413 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26414 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26415 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26416 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26417 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26418 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26419 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26420 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26421 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26422 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26423 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26424 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26425 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26426 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26427 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26428 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26429 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26430 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26431 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26432 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26433 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26434 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
26435 "\xE4\x7B\x12",
26436 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026437 .also_non_np = 1,
26438 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026439 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026440 }, { /* Generated with Crypto++ */
26441 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26442 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26443 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26444 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26445 .klen = 32,
26446 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
26447 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
26448 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
26449 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
26450 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
26451 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
26452 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
26453 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
26454 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
26455 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
26456 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
26457 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
26458 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
26459 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
26460 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
26461 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
26462 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
26463 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
26464 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
26465 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
26466 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
26467 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
26468 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
26469 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
26470 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
26471 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
26472 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
26473 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
26474 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
26475 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
26476 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
26477 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
26478 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
26479 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
26480 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
26481 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
26482 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
26483 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
26484 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
26485 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
26486 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
26487 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
26488 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
26489 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
26490 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
26491 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
26492 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
26493 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
26494 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
26495 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
26496 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
26497 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
26498 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
26499 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
26500 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
26501 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
26502 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
26503 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
26504 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
26505 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
26506 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
26507 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
26508 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026509 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
26510 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
26511 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
26512 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
26513 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
26514 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
26515 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
26516 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
26517 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
26518 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
26519 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
26520 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
26521 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
26522 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
26523 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
26524 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
26525 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
26526 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
26527 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
26528 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
26529 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
26530 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
26531 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
26532 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
26533 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
26534 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
26535 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
26536 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
26537 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
26538 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
26539 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
26540 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
26541 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
26542 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
26543 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
26544 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
26545 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
26546 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
26547 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
26548 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
26549 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
26550 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
26551 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
26552 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
26553 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
26554 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
26555 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
26556 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
26557 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
26558 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
26559 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
26560 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
26561 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
26562 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
26563 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
26564 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
26565 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
26566 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
26567 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
26568 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
26569 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
26570 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
26571 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
26572 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
26573 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
26574 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026575 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26576 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26577 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26578 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26579 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26580 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26581 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26582 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26583 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26584 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26585 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26586 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26587 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26588 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26589 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26590 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26591 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26592 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26593 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26594 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26595 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26596 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26597 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26598 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26599 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26600 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26601 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26602 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26603 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26604 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26605 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26606 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26607 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26608 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26609 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26610 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26611 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26612 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26613 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26614 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26615 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26616 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26617 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26618 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26619 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26620 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26621 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26622 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26623 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26624 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26625 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26626 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26627 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26628 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26629 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26630 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26631 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26632 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26633 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26634 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26635 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026636 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26637 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26638 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26639 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26640 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26641 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26642 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26643 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26644 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26645 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26646 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26647 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26648 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26649 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26650 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26651 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26652 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26653 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26654 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26655 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26656 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26657 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26658 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26659 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26660 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26661 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26662 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26663 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26664 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26665 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26666 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26667 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26668 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26669 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26670 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26671 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26672 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26673 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26674 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26675 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26676 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26677 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26678 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26679 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26680 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26681 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26682 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26683 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26684 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26685 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26686 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26687 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26688 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26689 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26690 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26691 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26692 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26693 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26694 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26695 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26696 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26697 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26698 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26699 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26700 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26701 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026702 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026703};
26704
26705static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
26706 /* Generated from AES-LRW test vectors */
26707 {
26708 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
26709 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
26710 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
26711 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
26712 .klen = 32,
26713 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26714 "\x00\x00\x00\x00\x00\x00\x00\x01",
26715 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26716 "\x38\x39\x41\x42\x43\x44\x45\x46",
26717 .ilen = 16,
26718 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
26719 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
26720 .rlen = 16,
26721 }, {
26722 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
26723 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
26724 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
26725 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
26726 .klen = 32,
26727 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26728 "\x00\x00\x00\x00\x00\x00\x00\x02",
26729 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26730 "\x38\x39\x41\x42\x43\x44\x45\x46",
26731 .ilen = 16,
26732 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
26733 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
26734 .rlen = 16,
26735 }, {
26736 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
26737 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
26738 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
26739 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
26740 .klen = 32,
26741 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26742 "\x00\x00\x00\x02\x00\x00\x00\x00",
26743 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26744 "\x38\x39\x41\x42\x43\x44\x45\x46",
26745 .ilen = 16,
26746 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
26747 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
26748 .rlen = 16,
26749 }, {
26750 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
26751 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
26752 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
26753 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
26754 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
26755 .klen = 40,
26756 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26757 "\x00\x00\x00\x00\x00\x00\x00\x01",
26758 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26759 "\x38\x39\x41\x42\x43\x44\x45\x46",
26760 .ilen = 16,
26761 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
26762 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
26763 .rlen = 16,
26764 }, {
26765 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
26766 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
26767 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
26768 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
26769 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
26770 .klen = 40,
26771 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26772 "\x00\x00\x00\x02\x00\x00\x00\x00",
26773 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26774 "\x38\x39\x41\x42\x43\x44\x45\x46",
26775 .ilen = 16,
26776 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
26777 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
26778 .rlen = 16,
26779 }, {
26780 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
26781 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
26782 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
26783 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
26784 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
26785 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
26786 .klen = 48,
26787 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26788 "\x00\x00\x00\x00\x00\x00\x00\x01",
26789 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26790 "\x38\x39\x41\x42\x43\x44\x45\x46",
26791 .ilen = 16,
26792 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
26793 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
26794 .rlen = 16,
26795 }, {
26796 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
26797 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
26798 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
26799 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
26800 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
26801 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
26802 .klen = 48,
26803 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26804 "\x00\x00\x00\x02\x00\x00\x00\x00",
26805 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
26806 "\x38\x39\x41\x42\x43\x44\x45\x46",
26807 .ilen = 16,
26808 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
26809 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
26810 .rlen = 16,
26811 }, {
26812 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
26813 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
26814 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
26815 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
26816 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
26817 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
26818 .klen = 48,
26819 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26820 "\x00\x00\x00\x00\x00\x00\x00\x01",
26821 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
26822 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
26823 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
26824 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
26825 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
26826 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
26827 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
26828 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
26829 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
26830 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
26831 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
26832 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
26833 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
26834 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
26835 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
26836 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
26837 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
26838 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
26839 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
26840 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
26841 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
26842 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
26843 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
26844 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
26845 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
26846 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
26847 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
26848 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
26849 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
26850 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
26851 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
26852 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
26853 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
26854 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
26855 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
26856 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
26857 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
26858 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
26859 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
26860 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
26861 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
26862 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
26863 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
26864 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
26865 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
26866 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
26867 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
26868 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
26869 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
26870 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
26871 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
26872 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
26873 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
26874 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
26875 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
26876 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
26877 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
26878 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
26879 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
26880 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
26881 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
26882 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
26883 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
26884 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
26885 .ilen = 512,
26886 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
26887 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
26888 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
26889 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
26890 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
26891 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
26892 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
26893 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
26894 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
26895 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
26896 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
26897 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
26898 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
26899 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
26900 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
26901 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
26902 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
26903 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
26904 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
26905 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
26906 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
26907 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
26908 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
26909 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
26910 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
26911 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
26912 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
26913 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
26914 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
26915 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
26916 "\xed\x14\xa9\x57\x19\x63\x40\x04"
26917 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
26918 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
26919 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
26920 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
26921 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
26922 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
26923 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
26924 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
26925 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
26926 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
26927 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
26928 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
26929 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
26930 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
26931 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
26932 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
26933 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
26934 "\x35\xa5\x83\x04\x84\x01\x99\x56"
26935 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
26936 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
26937 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
26938 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
26939 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
26940 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
26941 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
26942 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
26943 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
26944 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
26945 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
26946 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
26947 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
26948 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
26949 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
26950 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026951 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026952 .np = 3,
26953 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026954 },
26955};
26956
26957static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
26958 /* Generated from AES-LRW test vectors */
26959 /* same as enc vectors with input and result reversed */
26960 {
26961 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
26962 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
26963 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
26964 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
26965 .klen = 32,
26966 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26967 "\x00\x00\x00\x00\x00\x00\x00\x01",
26968 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
26969 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
26970 .ilen = 16,
26971 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26972 "\x38\x39\x41\x42\x43\x44\x45\x46",
26973 .rlen = 16,
26974 }, {
26975 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
26976 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
26977 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
26978 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
26979 .klen = 32,
26980 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26981 "\x00\x00\x00\x00\x00\x00\x00\x02",
26982 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
26983 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
26984 .ilen = 16,
26985 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
26986 "\x38\x39\x41\x42\x43\x44\x45\x46",
26987 .rlen = 16,
26988 }, {
26989 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
26990 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
26991 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
26992 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
26993 .klen = 32,
26994 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
26995 "\x00\x00\x00\x02\x00\x00\x00\x00",
26996 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
26997 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
26998 .ilen = 16,
26999 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27000 "\x38\x39\x41\x42\x43\x44\x45\x46",
27001 .rlen = 16,
27002 }, {
27003 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
27004 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
27005 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
27006 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
27007 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
27008 .klen = 40,
27009 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27010 "\x00\x00\x00\x00\x00\x00\x00\x01",
27011 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
27012 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
27013 .ilen = 16,
27014 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27015 "\x38\x39\x41\x42\x43\x44\x45\x46",
27016 .rlen = 16,
27017 }, {
27018 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27019 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27020 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27021 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27022 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27023 .klen = 40,
27024 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27025 "\x00\x00\x00\x02\x00\x00\x00\x00",
27026 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27027 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27028 .ilen = 16,
27029 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27030 "\x38\x39\x41\x42\x43\x44\x45\x46",
27031 .rlen = 16,
27032 }, {
27033 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27034 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27035 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27036 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27037 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27038 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27039 .klen = 48,
27040 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27041 "\x00\x00\x00\x00\x00\x00\x00\x01",
27042 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27043 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27044 .ilen = 16,
27045 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27046 "\x38\x39\x41\x42\x43\x44\x45\x46",
27047 .rlen = 16,
27048 }, {
27049 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27050 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27051 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27052 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27053 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27054 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27055 .klen = 48,
27056 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27057 "\x00\x00\x00\x02\x00\x00\x00\x00",
27058 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27059 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27060 .ilen = 16,
27061 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27062 "\x38\x39\x41\x42\x43\x44\x45\x46",
27063 .rlen = 16,
27064 }, {
27065 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27066 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27067 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27068 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27069 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27070 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27071 .klen = 48,
27072 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27073 "\x00\x00\x00\x00\x00\x00\x00\x01",
27074 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27075 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27076 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27077 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27078 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27079 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27080 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27081 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27082 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27083 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27084 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27085 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27086 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27087 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27088 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27089 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27090 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27091 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27092 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27093 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27094 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27095 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27096 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27097 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27098 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27099 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27100 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27101 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27102 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27103 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27104 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27105 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27106 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27107 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27108 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27109 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27110 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27111 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27112 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27113 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27114 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27115 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27116 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27117 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27118 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27119 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27120 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27121 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27122 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27123 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27124 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27125 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
27126 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
27127 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
27128 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
27129 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
27130 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
27131 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
27132 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
27133 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
27134 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
27135 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
27136 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
27137 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
27138 .ilen = 512,
27139 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27140 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27141 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27142 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27143 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27144 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27145 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27146 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27147 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27148 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27149 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27150 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27151 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27152 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27153 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27154 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27155 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27156 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27157 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27158 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27159 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27160 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27161 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27162 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27163 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27164 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
27165 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
27166 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
27167 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
27168 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
27169 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
27170 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
27171 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
27172 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
27173 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
27174 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
27175 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
27176 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
27177 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
27178 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
27179 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
27180 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
27181 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
27182 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
27183 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
27184 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
27185 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
27186 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
27187 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
27188 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
27189 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
27190 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
27191 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
27192 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
27193 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
27194 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
27195 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
27196 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
27197 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
27198 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
27199 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
27200 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
27201 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
27202 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
27203 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027204 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027205 .np = 3,
27206 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027207 },
27208};
27209
27210static struct cipher_testvec camellia_xts_enc_tv_template[] = {
27211 /* Generated from AES-XTS test vectors */
27212 {
27213 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
27214 "\x00\x00\x00\x00\x00\x00\x00\x00"
27215 "\x00\x00\x00\x00\x00\x00\x00\x00"
27216 "\x00\x00\x00\x00\x00\x00\x00\x00",
27217 .klen = 32,
27218 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27219 "\x00\x00\x00\x00\x00\x00\x00\x00",
27220 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
27221 "\x00\x00\x00\x00\x00\x00\x00\x00"
27222 "\x00\x00\x00\x00\x00\x00\x00\x00"
27223 "\x00\x00\x00\x00\x00\x00\x00\x00",
27224 .ilen = 32,
27225 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
27226 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
27227 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
27228 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
27229 .rlen = 32,
27230 }, {
27231 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
27232 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
27244 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
27245 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
27246 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
27247 .rlen = 32,
27248 }, {
27249 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
27250 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
27251 "\x22\x22\x22\x22\x22\x22\x22\x22"
27252 "\x22\x22\x22\x22\x22\x22\x22\x22",
27253 .klen = 32,
27254 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27255 "\x00\x00\x00\x00\x00\x00\x00\x00",
27256 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
27257 "\x44\x44\x44\x44\x44\x44\x44\x44"
27258 "\x44\x44\x44\x44\x44\x44\x44\x44"
27259 "\x44\x44\x44\x44\x44\x44\x44\x44",
27260 .ilen = 32,
27261 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
27262 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
27263 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
27264 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
27265 .rlen = 32,
27266 }, {
27267 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27268 "\x23\x53\x60\x28\x74\x71\x35\x26"
27269 "\x31\x41\x59\x26\x53\x58\x97\x93"
27270 "\x23\x84\x62\x64\x33\x83\x27\x95",
27271 .klen = 32,
27272 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27273 "\x00\x00\x00\x00\x00\x00\x00\x00",
27274 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27275 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27276 "\x10\x11\x12\x13\x14\x15\x16\x17"
27277 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27278 "\x20\x21\x22\x23\x24\x25\x26\x27"
27279 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27280 "\x30\x31\x32\x33\x34\x35\x36\x37"
27281 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27282 "\x40\x41\x42\x43\x44\x45\x46\x47"
27283 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27284 "\x50\x51\x52\x53\x54\x55\x56\x57"
27285 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27286 "\x60\x61\x62\x63\x64\x65\x66\x67"
27287 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27288 "\x70\x71\x72\x73\x74\x75\x76\x77"
27289 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27290 "\x80\x81\x82\x83\x84\x85\x86\x87"
27291 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27292 "\x90\x91\x92\x93\x94\x95\x96\x97"
27293 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27294 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27295 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27296 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27297 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27298 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27299 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27300 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27301 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27302 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27303 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27304 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27305 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27306 "\x00\x01\x02\x03\x04\x05\x06\x07"
27307 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27308 "\x10\x11\x12\x13\x14\x15\x16\x17"
27309 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27310 "\x20\x21\x22\x23\x24\x25\x26\x27"
27311 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27312 "\x30\x31\x32\x33\x34\x35\x36\x37"
27313 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27314 "\x40\x41\x42\x43\x44\x45\x46\x47"
27315 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27316 "\x50\x51\x52\x53\x54\x55\x56\x57"
27317 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27318 "\x60\x61\x62\x63\x64\x65\x66\x67"
27319 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27320 "\x70\x71\x72\x73\x74\x75\x76\x77"
27321 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27322 "\x80\x81\x82\x83\x84\x85\x86\x87"
27323 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27324 "\x90\x91\x92\x93\x94\x95\x96\x97"
27325 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27326 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27327 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27328 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27329 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27330 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27331 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27332 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27333 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27334 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27335 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27336 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27337 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27338 .ilen = 512,
27339 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
27340 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
27341 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
27342 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
27343 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
27344 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
27345 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
27346 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
27347 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
27348 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
27349 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
27350 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
27351 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
27352 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
27353 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
27354 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
27355 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
27356 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
27357 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
27358 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
27359 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
27360 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
27361 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
27362 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
27363 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
27364 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
27365 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
27366 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
27367 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
27368 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
27369 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
27370 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
27371 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
27372 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
27373 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
27374 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
27375 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
27376 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
27377 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
27378 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
27379 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
27380 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
27381 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
27382 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
27383 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
27384 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
27385 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
27386 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
27387 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
27388 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
27389 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
27390 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
27391 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
27392 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
27393 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
27394 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
27395 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
27396 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
27397 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
27398 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
27399 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
27400 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
27401 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
27402 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
27403 .rlen = 512,
27404 }, {
27405 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27406 "\x23\x53\x60\x28\x74\x71\x35\x26"
27407 "\x62\x49\x77\x57\x24\x70\x93\x69"
27408 "\x99\x59\x57\x49\x66\x96\x76\x27"
27409 "\x31\x41\x59\x26\x53\x58\x97\x93"
27410 "\x23\x84\x62\x64\x33\x83\x27\x95"
27411 "\x02\x88\x41\x97\x16\x93\x99\x37"
27412 "\x51\x05\x82\x09\x74\x94\x45\x92",
27413 .klen = 64,
27414 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
27415 "\x00\x00\x00\x00\x00\x00\x00\x00",
27416 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27417 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27418 "\x10\x11\x12\x13\x14\x15\x16\x17"
27419 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27420 "\x20\x21\x22\x23\x24\x25\x26\x27"
27421 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27422 "\x30\x31\x32\x33\x34\x35\x36\x37"
27423 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27424 "\x40\x41\x42\x43\x44\x45\x46\x47"
27425 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27426 "\x50\x51\x52\x53\x54\x55\x56\x57"
27427 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27428 "\x60\x61\x62\x63\x64\x65\x66\x67"
27429 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27430 "\x70\x71\x72\x73\x74\x75\x76\x77"
27431 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27432 "\x80\x81\x82\x83\x84\x85\x86\x87"
27433 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27434 "\x90\x91\x92\x93\x94\x95\x96\x97"
27435 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27436 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27437 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27438 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27439 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27440 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27441 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27442 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27443 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27444 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27445 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27446 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27447 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27448 "\x00\x01\x02\x03\x04\x05\x06\x07"
27449 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27450 "\x10\x11\x12\x13\x14\x15\x16\x17"
27451 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27452 "\x20\x21\x22\x23\x24\x25\x26\x27"
27453 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27454 "\x30\x31\x32\x33\x34\x35\x36\x37"
27455 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27456 "\x40\x41\x42\x43\x44\x45\x46\x47"
27457 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27458 "\x50\x51\x52\x53\x54\x55\x56\x57"
27459 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27460 "\x60\x61\x62\x63\x64\x65\x66\x67"
27461 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27462 "\x70\x71\x72\x73\x74\x75\x76\x77"
27463 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27464 "\x80\x81\x82\x83\x84\x85\x86\x87"
27465 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27466 "\x90\x91\x92\x93\x94\x95\x96\x97"
27467 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27468 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27469 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27470 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27471 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27472 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27473 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27474 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27475 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27476 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27477 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27478 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27479 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27480 .ilen = 512,
27481 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
27482 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
27483 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
27484 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
27485 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
27486 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
27487 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
27488 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
27489 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
27490 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
27491 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
27492 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
27493 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
27494 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
27495 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
27496 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
27497 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
27498 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
27499 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
27500 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
27501 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
27502 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
27503 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
27504 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
27505 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
27506 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
27507 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
27508 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
27509 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
27510 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
27511 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
27512 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
27513 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
27514 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
27515 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
27516 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
27517 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
27518 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
27519 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
27520 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
27521 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
27522 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
27523 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
27524 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
27525 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
27526 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
27527 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
27528 "\x21\x17\xf8\x59\x15\x24\x64\x22"
27529 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
27530 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
27531 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
27532 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
27533 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
27534 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
27535 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
27536 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
27537 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
27538 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
27539 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
27540 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
27541 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
27542 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
27543 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
27544 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
27545 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027546 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027547 .np = 3,
27548 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027549 },
27550};
27551
27552static struct cipher_testvec camellia_xts_dec_tv_template[] = {
27553 /* Generated from AES-XTS test vectors */
27554 /* same as enc vectors with input and result reversed */
27555 {
27556 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
27557 "\x00\x00\x00\x00\x00\x00\x00\x00"
27558 "\x00\x00\x00\x00\x00\x00\x00\x00"
27559 "\x00\x00\x00\x00\x00\x00\x00\x00",
27560 .klen = 32,
27561 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27562 "\x00\x00\x00\x00\x00\x00\x00\x00",
27563 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
27564 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
27565 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
27566 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
27567 .ilen = 32,
27568 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
27569 "\x00\x00\x00\x00\x00\x00\x00\x00"
27570 "\x00\x00\x00\x00\x00\x00\x00\x00"
27571 "\x00\x00\x00\x00\x00\x00\x00\x00",
27572 .rlen = 32,
27573 }, {
27574 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
27575 "\x11\x11\x11\x11\x11\x11\x11\x11"
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 = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
27582 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
27583 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
27584 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
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 = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
27593 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
27594 "\x22\x22\x22\x22\x22\x22\x22\x22"
27595 "\x22\x22\x22\x22\x22\x22\x22\x22",
27596 .klen = 32,
27597 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
27598 "\x00\x00\x00\x00\x00\x00\x00\x00",
27599 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
27600 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
27601 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
27602 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
27603 .ilen = 32,
27604 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
27605 "\x44\x44\x44\x44\x44\x44\x44\x44"
27606 "\x44\x44\x44\x44\x44\x44\x44\x44"
27607 "\x44\x44\x44\x44\x44\x44\x44\x44",
27608 .rlen = 32,
27609 }, {
27610 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27611 "\x23\x53\x60\x28\x74\x71\x35\x26"
27612 "\x31\x41\x59\x26\x53\x58\x97\x93"
27613 "\x23\x84\x62\x64\x33\x83\x27\x95",
27614 .klen = 32,
27615 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27616 "\x00\x00\x00\x00\x00\x00\x00\x00",
27617 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
27618 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
27619 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
27620 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
27621 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
27622 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
27623 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
27624 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
27625 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
27626 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
27627 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
27628 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
27629 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
27630 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
27631 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
27632 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
27633 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
27634 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
27635 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
27636 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
27637 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
27638 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
27639 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
27640 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
27641 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
27642 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
27643 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
27644 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
27645 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
27646 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
27647 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
27648 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
27649 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
27650 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
27651 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
27652 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
27653 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
27654 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
27655 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
27656 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
27657 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
27658 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
27659 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
27660 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
27661 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
27662 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
27663 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
27664 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
27665 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
27666 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
27667 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
27668 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
27669 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
27670 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
27671 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
27672 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
27673 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
27674 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
27675 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
27676 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
27677 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
27678 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
27679 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
27680 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
27681 .ilen = 512,
27682 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27683 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27684 "\x10\x11\x12\x13\x14\x15\x16\x17"
27685 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27686 "\x20\x21\x22\x23\x24\x25\x26\x27"
27687 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27688 "\x30\x31\x32\x33\x34\x35\x36\x37"
27689 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27690 "\x40\x41\x42\x43\x44\x45\x46\x47"
27691 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27692 "\x50\x51\x52\x53\x54\x55\x56\x57"
27693 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27694 "\x60\x61\x62\x63\x64\x65\x66\x67"
27695 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27696 "\x70\x71\x72\x73\x74\x75\x76\x77"
27697 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27698 "\x80\x81\x82\x83\x84\x85\x86\x87"
27699 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27700 "\x90\x91\x92\x93\x94\x95\x96\x97"
27701 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27702 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27703 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27704 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27705 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27706 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27707 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27708 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27709 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27710 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27711 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27712 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27713 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27714 "\x00\x01\x02\x03\x04\x05\x06\x07"
27715 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27716 "\x10\x11\x12\x13\x14\x15\x16\x17"
27717 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27718 "\x20\x21\x22\x23\x24\x25\x26\x27"
27719 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27720 "\x30\x31\x32\x33\x34\x35\x36\x37"
27721 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27722 "\x40\x41\x42\x43\x44\x45\x46\x47"
27723 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27724 "\x50\x51\x52\x53\x54\x55\x56\x57"
27725 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27726 "\x60\x61\x62\x63\x64\x65\x66\x67"
27727 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27728 "\x70\x71\x72\x73\x74\x75\x76\x77"
27729 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27730 "\x80\x81\x82\x83\x84\x85\x86\x87"
27731 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27732 "\x90\x91\x92\x93\x94\x95\x96\x97"
27733 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27734 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27735 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27736 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27737 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27738 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27739 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27740 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27741 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27742 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27743 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27744 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27745 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27746 .rlen = 512,
27747 }, {
27748 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
27749 "\x23\x53\x60\x28\x74\x71\x35\x26"
27750 "\x62\x49\x77\x57\x24\x70\x93\x69"
27751 "\x99\x59\x57\x49\x66\x96\x76\x27"
27752 "\x31\x41\x59\x26\x53\x58\x97\x93"
27753 "\x23\x84\x62\x64\x33\x83\x27\x95"
27754 "\x02\x88\x41\x97\x16\x93\x99\x37"
27755 "\x51\x05\x82\x09\x74\x94\x45\x92",
27756 .klen = 64,
27757 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
27758 "\x00\x00\x00\x00\x00\x00\x00\x00",
27759 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
27760 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
27761 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
27762 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
27763 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
27764 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
27765 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
27766 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
27767 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
27768 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
27769 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
27770 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
27771 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
27772 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
27773 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
27774 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
27775 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
27776 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
27777 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
27778 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
27779 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
27780 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
27781 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
27782 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
27783 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
27784 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
27785 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
27786 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
27787 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
27788 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
27789 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
27790 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
27791 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
27792 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
27793 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
27794 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
27795 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
27796 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
27797 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
27798 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
27799 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
27800 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
27801 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
27802 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
27803 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
27804 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
27805 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
27806 "\x21\x17\xf8\x59\x15\x24\x64\x22"
27807 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
27808 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
27809 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
27810 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
27811 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
27812 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
27813 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
27814 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
27815 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
27816 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
27817 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
27818 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
27819 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
27820 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
27821 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
27822 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
27823 .ilen = 512,
27824 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27825 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27826 "\x10\x11\x12\x13\x14\x15\x16\x17"
27827 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27828 "\x20\x21\x22\x23\x24\x25\x26\x27"
27829 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27830 "\x30\x31\x32\x33\x34\x35\x36\x37"
27831 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27832 "\x40\x41\x42\x43\x44\x45\x46\x47"
27833 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27834 "\x50\x51\x52\x53\x54\x55\x56\x57"
27835 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27836 "\x60\x61\x62\x63\x64\x65\x66\x67"
27837 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27838 "\x70\x71\x72\x73\x74\x75\x76\x77"
27839 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27840 "\x80\x81\x82\x83\x84\x85\x86\x87"
27841 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27842 "\x90\x91\x92\x93\x94\x95\x96\x97"
27843 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27844 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27845 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27846 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27847 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27848 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27849 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27850 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27851 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27852 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27853 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27854 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27855 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
27856 "\x00\x01\x02\x03\x04\x05\x06\x07"
27857 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27858 "\x10\x11\x12\x13\x14\x15\x16\x17"
27859 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
27860 "\x20\x21\x22\x23\x24\x25\x26\x27"
27861 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
27862 "\x30\x31\x32\x33\x34\x35\x36\x37"
27863 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
27864 "\x40\x41\x42\x43\x44\x45\x46\x47"
27865 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
27866 "\x50\x51\x52\x53\x54\x55\x56\x57"
27867 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
27868 "\x60\x61\x62\x63\x64\x65\x66\x67"
27869 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
27870 "\x70\x71\x72\x73\x74\x75\x76\x77"
27871 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
27872 "\x80\x81\x82\x83\x84\x85\x86\x87"
27873 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
27874 "\x90\x91\x92\x93\x94\x95\x96\x97"
27875 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
27876 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
27877 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
27878 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
27879 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
27880 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
27881 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
27882 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
27883 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
27884 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
27885 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
27886 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
27887 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
27888 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027889 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027890 .np = 3,
27891 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027892 },
Herbert Xuda7f0332008-07-31 17:08:25 +080027893};
27894
27895/*
27896 * SEED test vectors
27897 */
27898#define SEED_ENC_TEST_VECTORS 4
27899#define SEED_DEC_TEST_VECTORS 4
27900
27901static struct cipher_testvec seed_enc_tv_template[] = {
27902 {
27903 .key = zeroed_string,
27904 .klen = 16,
27905 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
27906 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27907 .ilen = 16,
27908 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
27909 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
27910 .rlen = 16,
27911 }, {
27912 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27913 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27914 .klen = 16,
27915 .input = zeroed_string,
27916 .ilen = 16,
27917 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
27918 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
27919 .rlen = 16,
27920 }, {
27921 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
27922 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
27923 .klen = 16,
27924 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
27925 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
27926 .ilen = 16,
27927 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
27928 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
27929 .rlen = 16,
27930 }, {
27931 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
27932 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
27933 .klen = 16,
27934 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
27935 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
27936 .ilen = 16,
27937 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
27938 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
27939 .rlen = 16,
27940 }
27941};
27942
27943static struct cipher_testvec seed_dec_tv_template[] = {
27944 {
27945 .key = zeroed_string,
27946 .klen = 16,
27947 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
27948 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
27949 .ilen = 16,
27950 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27951 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27952 .rlen = 16,
27953 }, {
27954 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27955 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
27956 .klen = 16,
27957 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
27958 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
27959 .ilen = 16,
27960 .result = zeroed_string,
27961 .rlen = 16,
27962 }, {
27963 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
27964 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
27965 .klen = 16,
27966 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
27967 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
27968 .ilen = 16,
27969 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
27970 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
27971 .rlen = 16,
27972 }, {
27973 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
27974 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
27975 .klen = 16,
27976 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
27977 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
27978 .ilen = 16,
27979 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
27980 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
27981 .rlen = 16,
27982 }
27983};
27984
27985#define SALSA20_STREAM_ENC_TEST_VECTORS 5
27986static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
27987 /*
27988 * Testvectors from verified.test-vectors submitted to ECRYPT.
27989 * They are truncated to size 39, 64, 111, 129 to test a variety
27990 * of input length.
27991 */
27992 { /* Set 3, vector 0 */
27993 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
27994 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
27995 .klen = 16,
27996 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
27997 .input = "\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",
28002 .ilen = 39,
28003 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
28004 "\x68\x02\x41\x0C\x68\x86\x88\x89"
28005 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
28006 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
28007 "\x58\x3F\x52\x79\x70\xEB\xC1",
28008 .rlen = 39,
28009 }, { /* Set 5, vector 0 */
28010 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28011 "\x00\x00\x00\x00\x00\x00\x00\x00",
28012 .klen = 16,
28013 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
28014 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28015 "\x00\x00\x00\x00\x00\x00\x00\x00"
28016 "\x00\x00\x00\x00\x00\x00\x00\x00"
28017 "\x00\x00\x00\x00\x00\x00\x00\x00"
28018 "\x00\x00\x00\x00\x00\x00\x00\x00"
28019 "\x00\x00\x00\x00\x00\x00\x00\x00"
28020 "\x00\x00\x00\x00\x00\x00\x00\x00"
28021 "\x00\x00\x00\x00\x00\x00\x00\x00",
28022 .ilen = 64,
28023 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
28024 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
28025 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
28026 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
28027 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
28028 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
28029 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
28030 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
28031 .rlen = 64,
28032 }, { /* Set 3, vector 27 */
28033 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
28034 "\x23\x24\x25\x26\x27\x28\x29\x2A"
28035 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
28036 "\x33\x34\x35\x36\x37\x38\x39\x3A",
28037 .klen = 32,
28038 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
28039 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28040 "\x00\x00\x00\x00\x00\x00\x00\x00"
28041 "\x00\x00\x00\x00\x00\x00\x00\x00"
28042 "\x00\x00\x00\x00\x00\x00\x00\x00"
28043 "\x00\x00\x00\x00\x00\x00\x00\x00"
28044 "\x00\x00\x00\x00\x00\x00\x00\x00"
28045 "\x00\x00\x00\x00\x00\x00\x00\x00"
28046 "\x00\x00\x00\x00\x00\x00\x00\x00"
28047 "\x00\x00\x00\x00\x00\x00\x00\x00"
28048 "\x00\x00\x00\x00\x00\x00\x00\x00"
28049 "\x00\x00\x00\x00\x00\x00\x00\x00"
28050 "\x00\x00\x00\x00\x00\x00\x00\x00"
28051 "\x00\x00\x00\x00\x00\x00\x00\x00"
28052 "\x00\x00\x00\x00\x00\x00\x00",
28053 .ilen = 111,
28054 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
28055 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
28056 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
28057 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
28058 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
28059 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
28060 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
28061 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
28062 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
28063 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
28064 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
28065 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
28066 "\x95\x46\x45\x54\xE9\x75\x03\x08"
28067 "\x44\xAF\xE5\x8A\x81\x12\x09",
28068 .rlen = 111,
28069 }, { /* Set 5, vector 27 */
28070 .key = "\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 .klen = 32,
28075 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
28076 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28077 "\x00\x00\x00\x00\x00\x00\x00\x00"
28078 "\x00\x00\x00\x00\x00\x00\x00\x00"
28079 "\x00\x00\x00\x00\x00\x00\x00\x00"
28080 "\x00\x00\x00\x00\x00\x00\x00\x00"
28081 "\x00\x00\x00\x00\x00\x00\x00\x00"
28082 "\x00\x00\x00\x00\x00\x00\x00\x00"
28083 "\x00\x00\x00\x00\x00\x00\x00\x00"
28084 "\x00\x00\x00\x00\x00\x00\x00\x00"
28085 "\x00\x00\x00\x00\x00\x00\x00\x00"
28086 "\x00\x00\x00\x00\x00\x00\x00\x00"
28087 "\x00\x00\x00\x00\x00\x00\x00\x00"
28088 "\x00\x00\x00\x00\x00\x00\x00\x00"
28089 "\x00\x00\x00\x00\x00\x00\x00\x00"
28090 "\x00\x00\x00\x00\x00\x00\x00\x00"
28091 "\x00\x00\x00\x00\x00\x00\x00\x00"
28092 "\x00",
28093 .ilen = 129,
28094 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
28095 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
28096 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
28097 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
28098 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
28099 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
28100 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
28101 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
28102 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
28103 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
28104 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
28105 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
28106 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
28107 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
28108 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
28109 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
28110 "\x5A",
28111 .rlen = 129,
28112 }, { /* large test vector generated using Crypto++ */
28113 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28114 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28115 "\x10\x11\x12\x13\x14\x15\x16\x17"
28116 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
28117 .klen = 32,
28118 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28119 "\x00\x00\x00\x00\x00\x00\x00\x00",
28120 .input =
28121 "\x00\x01\x02\x03\x04\x05\x06\x07"
28122 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28123 "\x10\x11\x12\x13\x14\x15\x16\x17"
28124 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28125 "\x20\x21\x22\x23\x24\x25\x26\x27"
28126 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28127 "\x30\x31\x32\x33\x34\x35\x36\x37"
28128 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28129 "\x40\x41\x42\x43\x44\x45\x46\x47"
28130 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28131 "\x50\x51\x52\x53\x54\x55\x56\x57"
28132 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28133 "\x60\x61\x62\x63\x64\x65\x66\x67"
28134 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28135 "\x70\x71\x72\x73\x74\x75\x76\x77"
28136 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28137 "\x80\x81\x82\x83\x84\x85\x86\x87"
28138 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28139 "\x90\x91\x92\x93\x94\x95\x96\x97"
28140 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28141 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28142 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28143 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28144 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28145 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28146 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28147 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28148 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28149 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28150 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28151 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28152 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28153 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
28154 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
28155 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
28156 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
28157 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
28158 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
28159 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
28160 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
28161 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
28162 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
28163 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
28164 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
28165 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
28166 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
28167 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
28168 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
28169 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
28170 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
28171 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
28172 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
28173 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
28174 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
28175 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
28176 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
28177 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
28178 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
28179 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
28180 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
28181 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
28182 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
28183 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
28184 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
28185 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
28186 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
28187 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
28188 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
28189 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
28190 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
28191 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
28192 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
28193 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
28194 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
28195 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
28196 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
28197 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
28198 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
28199 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
28200 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
28201 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
28202 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
28203 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
28204 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
28205 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
28206 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
28207 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
28208 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
28209 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
28210 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
28211 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
28212 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
28213 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
28214 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
28215 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
28216 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
28217 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
28218 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
28219 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
28220 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
28221 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
28222 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
28223 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
28224 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
28225 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
28226 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
28227 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
28228 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
28229 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
28230 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
28231 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
28232 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
28233 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
28234 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
28235 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
28236 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
28237 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
28238 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
28239 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
28240 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
28241 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
28242 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
28243 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
28244 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
28245 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
28246 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
28247 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
28248 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
28249 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
28250 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
28251 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
28252 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
28253 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
28254 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
28255 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
28256 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
28257 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
28258 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
28259 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
28260 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
28261 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
28262 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
28263 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
28264 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
28265 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
28266 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
28267 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
28268 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
28269 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
28270 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
28271 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
28272 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
28273 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
28274 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
28275 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
28276 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
28277 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
28278 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
28279 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
28280 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
28281 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
28282 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
28283 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
28284 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
28285 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
28286 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
28287 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
28288 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
28289 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
28290 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
28291 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
28292 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
28293 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
28294 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
28295 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
28296 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
28297 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
28298 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
28299 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
28300 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
28301 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
28302 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
28303 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
28304 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
28305 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
28306 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
28307 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
28308 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
28309 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
28310 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
28311 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
28312 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
28313 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
28314 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
28315 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
28316 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
28317 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
28318 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
28319 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
28320 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
28321 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
28322 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
28323 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
28324 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
28325 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
28326 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
28327 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
28328 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
28329 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
28330 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
28331 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
28332 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
28333 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
28334 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
28335 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
28336 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
28337 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
28338 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
28339 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
28340 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
28341 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
28342 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
28343 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
28344 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
28345 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
28346 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
28347 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
28348 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
28349 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
28350 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
28351 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
28352 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
28353 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
28354 "\x38\x47\x56\x65\x74\x83\x92\xa1"
28355 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
28356 "\x28\x37\x46\x55\x64\x73\x82\x91"
28357 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
28358 "\x18\x27\x36\x45\x54\x63\x72\x81"
28359 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
28360 "\x08\x17\x26\x35\x44\x53\x62\x71"
28361 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
28362 "\xf8\x07\x16\x25\x34\x43\x52\x61"
28363 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
28364 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
28365 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
28366 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
28367 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
28368 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
28369 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
28370 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
28371 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
28372 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
28373 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
28374 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
28375 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
28376 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
28377 "\x00\x11\x22\x33\x44\x55\x66\x77"
28378 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
28379 "\x10\x21\x32\x43\x54\x65\x76\x87"
28380 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
28381 "\x20\x31\x42\x53\x64\x75\x86\x97"
28382 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
28383 "\x30\x41\x52\x63\x74\x85\x96\xa7"
28384 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
28385 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
28386 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
28387 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
28388 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
28389 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
28390 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
28391 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
28392 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
28393 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
28394 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
28395 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
28396 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
28397 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
28398 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
28399 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
28400 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
28401 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
28402 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
28403 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
28404 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
28405 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
28406 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
28407 "\xf0\x01\x12\x23\x34\x45\x56\x67"
28408 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
28409 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
28410 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
28411 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
28412 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
28413 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
28414 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
28415 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
28416 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
28417 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
28418 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
28419 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
28420 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
28421 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
28422 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
28423 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
28424 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
28425 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
28426 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
28427 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
28428 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
28429 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
28430 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
28431 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
28432 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
28433 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
28434 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
28435 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
28436 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
28437 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
28438 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
28439 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
28440 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
28441 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
28442 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
28443 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
28444 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
28445 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
28446 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
28447 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
28448 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
28449 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
28450 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
28451 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
28452 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
28453 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
28454 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
28455 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
28456 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
28457 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
28458 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
28459 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
28460 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
28461 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
28462 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
28463 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
28464 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
28465 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
28466 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
28467 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
28468 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
28469 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
28470 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
28471 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
28472 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
28473 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
28474 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
28475 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
28476 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
28477 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
28478 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
28479 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
28480 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
28481 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
28482 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
28483 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
28484 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
28485 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
28486 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
28487 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
28488 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
28489 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
28490 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
28491 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
28492 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
28493 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
28494 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
28495 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
28496 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
28497 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
28498 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
28499 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
28500 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
28501 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
28502 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
28503 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
28504 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
28505 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
28506 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
28507 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
28508 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
28509 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
28510 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
28511 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
28512 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
28513 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
28514 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
28515 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
28516 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
28517 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
28518 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
28519 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
28520 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
28521 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
28522 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
28523 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
28524 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
28525 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
28526 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
28527 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
28528 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
28529 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
28530 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
28531 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
28532 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
28533 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
28534 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
28535 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
28536 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
28537 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
28538 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
28539 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
28540 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
28541 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
28542 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
28543 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
28544 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
28545 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
28546 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
28547 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
28548 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
28549 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
28550 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
28551 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
28552 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
28553 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
28554 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
28555 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
28556 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
28557 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
28558 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
28559 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
28560 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
28561 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
28562 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
28563 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
28564 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
28565 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
28566 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
28567 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
28568 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
28569 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
28570 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
28571 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
28572 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
28573 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
28574 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
28575 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
28576 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
28577 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
28578 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
28579 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
28580 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
28581 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
28582 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
28583 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
28584 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
28585 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
28586 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
28587 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
28588 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
28589 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
28590 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
28591 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
28592 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
28593 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
28594 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
28595 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
28596 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
28597 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
28598 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
28599 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
28600 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
28601 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
28602 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
28603 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
28604 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
28605 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
28606 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
28607 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
28608 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
28609 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
28610 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
28611 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
28612 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
28613 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
28614 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
28615 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
28616 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
28617 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
28618 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
28619 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
28620 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
28621 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
28622 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
28623 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
28624 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
28625 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
28626 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
28627 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
28628 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
28629 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
28630 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
28631 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
28632 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
28633 "\x00\x21\x42\x63",
28634 .ilen = 4100,
28635 .result =
28636 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
28637 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
28638 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
28639 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
28640 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
28641 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
28642 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
28643 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
28644 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
28645 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
28646 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
28647 "\xbb\xde\x56\x86\xab\x65\x21\x30"
28648 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
28649 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
28650 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
28651 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
28652 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
28653 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
28654 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
28655 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
28656 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
28657 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
28658 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
28659 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
28660 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
28661 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
28662 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
28663 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
28664 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
28665 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
28666 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
28667 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
28668 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
28669 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
28670 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
28671 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
28672 "\x62\x08\x18\x7a\x25\x49\x28\xac"
28673 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
28674 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
28675 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
28676 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
28677 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
28678 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
28679 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
28680 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
28681 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
28682 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
28683 "\x33\xee\x14\x19\x22\x52\x89\xa7"
28684 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
28685 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
28686 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
28687 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
28688 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
28689 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
28690 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
28691 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
28692 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
28693 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
28694 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
28695 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
28696 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
28697 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
28698 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
28699 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
28700 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
28701 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
28702 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
28703 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
28704 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
28705 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
28706 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
28707 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
28708 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
28709 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
28710 "\x49\x97\x33\xab\x36\x14\x0a\x70"
28711 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
28712 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
28713 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
28714 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
28715 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
28716 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
28717 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
28718 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
28719 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
28720 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
28721 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
28722 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
28723 "\xad\x04\x07\xae\x22\x90\x4a\x93"
28724 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
28725 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
28726 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
28727 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
28728 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
28729 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
28730 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
28731 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
28732 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
28733 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
28734 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
28735 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
28736 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
28737 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
28738 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
28739 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
28740 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
28741 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
28742 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
28743 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
28744 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
28745 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
28746 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
28747 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
28748 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
28749 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
28750 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
28751 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
28752 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
28753 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
28754 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
28755 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
28756 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
28757 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
28758 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
28759 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
28760 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
28761 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
28762 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
28763 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
28764 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
28765 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
28766 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
28767 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
28768 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
28769 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
28770 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
28771 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
28772 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
28773 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
28774 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
28775 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
28776 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
28777 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
28778 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
28779 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
28780 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
28781 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
28782 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
28783 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
28784 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
28785 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
28786 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
28787 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
28788 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
28789 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
28790 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
28791 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
28792 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
28793 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
28794 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
28795 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
28796 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
28797 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
28798 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
28799 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
28800 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
28801 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
28802 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
28803 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
28804 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
28805 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
28806 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
28807 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
28808 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
28809 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
28810 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
28811 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
28812 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
28813 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
28814 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
28815 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
28816 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
28817 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
28818 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
28819 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
28820 "\x2e\x53\x49\x97\x94\x33\xae\x40"
28821 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
28822 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
28823 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
28824 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
28825 "\xce\x87\xad\xcc\x72\x05\x00\x29"
28826 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
28827 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
28828 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
28829 "\xac\xc0\x79\x50\x69\xca\x59\x32"
28830 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
28831 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
28832 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
28833 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
28834 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
28835 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
28836 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
28837 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
28838 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
28839 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
28840 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
28841 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
28842 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
28843 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
28844 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
28845 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
28846 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
28847 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
28848 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
28849 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
28850 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
28851 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
28852 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
28853 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
28854 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
28855 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
28856 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
28857 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
28858 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
28859 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
28860 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
28861 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
28862 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
28863 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
28864 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
28865 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
28866 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
28867 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
28868 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
28869 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
28870 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
28871 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
28872 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
28873 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
28874 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
28875 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
28876 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
28877 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
28878 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
28879 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
28880 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
28881 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
28882 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
28883 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
28884 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
28885 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
28886 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
28887 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
28888 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
28889 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
28890 "\x38\x55\xab\x33\x26\xef\x9f\x43"
28891 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
28892 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
28893 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
28894 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
28895 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
28896 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
28897 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
28898 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
28899 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
28900 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
28901 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
28902 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
28903 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
28904 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
28905 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
28906 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
28907 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
28908 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
28909 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
28910 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
28911 "\x62\x36\x43\xb2\x82\x15\x75\x50"
28912 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
28913 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
28914 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
28915 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
28916 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
28917 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
28918 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
28919 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
28920 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
28921 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
28922 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
28923 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
28924 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
28925 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
28926 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
28927 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
28928 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
28929 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
28930 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
28931 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
28932 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
28933 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
28934 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
28935 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
28936 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
28937 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
28938 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
28939 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
28940 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
28941 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
28942 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
28943 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
28944 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
28945 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
28946 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
28947 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
28948 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
28949 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
28950 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
28951 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
28952 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
28953 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
28954 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
28955 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
28956 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
28957 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
28958 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
28959 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
28960 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
28961 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
28962 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
28963 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
28964 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
28965 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
28966 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
28967 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
28968 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
28969 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
28970 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
28971 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
28972 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
28973 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
28974 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
28975 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
28976 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
28977 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
28978 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
28979 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
28980 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
28981 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
28982 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
28983 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
28984 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
28985 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
28986 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
28987 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
28988 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
28989 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
28990 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
28991 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
28992 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
28993 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
28994 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
28995 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
28996 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
28997 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
28998 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
28999 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
29000 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
29001 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
29002 "\x73\x2e\x71\x79\x16\x06\x63\x28"
29003 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
29004 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
29005 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
29006 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
29007 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
29008 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
29009 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
29010 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
29011 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
29012 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
29013 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
29014 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
29015 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
29016 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
29017 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
29018 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
29019 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
29020 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
29021 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
29022 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
29023 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
29024 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
29025 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
29026 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
29027 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
29028 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
29029 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
29030 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
29031 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
29032 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
29033 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
29034 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
29035 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
29036 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
29037 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
29038 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
29039 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
29040 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
29041 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
29042 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
29043 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
29044 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
29045 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
29046 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
29047 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
29048 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
29049 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
29050 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
29051 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
29052 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
29053 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
29054 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
29055 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
29056 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
29057 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
29058 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
29059 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
29060 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
29061 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
29062 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
29063 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
29064 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
29065 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
29066 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
29067 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
29068 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
29069 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
29070 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
29071 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
29072 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
29073 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
29074 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
29075 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
29076 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
29077 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
29078 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
29079 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
29080 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
29081 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
29082 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
29083 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
29084 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
29085 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
29086 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
29087 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
29088 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
29089 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
29090 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
29091 "\x85\x73\x78\x45\x20\x7f\xae\x13"
29092 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
29093 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
29094 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
29095 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
29096 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
29097 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
29098 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
29099 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
29100 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
29101 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
29102 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
29103 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
29104 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
29105 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
29106 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
29107 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
29108 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
29109 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
29110 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
29111 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
29112 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
29113 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
29114 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
29115 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
29116 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
29117 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
29118 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
29119 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
29120 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
29121 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
29122 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
29123 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
29124 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
29125 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
29126 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
29127 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
29128 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
29129 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
29130 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
29131 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
29132 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
29133 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
29134 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
29135 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
29136 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
29137 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
29138 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
29139 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
29140 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
29141 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
29142 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
29143 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
29144 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
29145 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
29146 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
29147 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
29148 "\xaf\xdf\x11\x95",
29149 .rlen = 4100,
29150 .np = 2,
29151 .tap = { 4064, 36 },
29152 },
29153};
29154
Martin Willi3590ebf2015-06-01 13:43:57 +020029155#define CHACHA20_ENC_TEST_VECTORS 3
29156static struct cipher_testvec chacha20_enc_tv_template[] = {
29157 { /* RFC7539 A.2. Test Vector #1 */
29158 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29159 "\x00\x00\x00\x00\x00\x00\x00\x00"
29160 "\x00\x00\x00\x00\x00\x00\x00\x00"
29161 "\x00\x00\x00\x00\x00\x00\x00\x00",
29162 .klen = 32,
29163 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29164 "\x00\x00\x00\x00\x00\x00\x00\x00",
29165 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
29166 "\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\x00"
29170 "\x00\x00\x00\x00\x00\x00\x00\x00"
29171 "\x00\x00\x00\x00\x00\x00\x00\x00"
29172 "\x00\x00\x00\x00\x00\x00\x00\x00",
29173 .ilen = 64,
29174 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
29175 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
29176 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
29177 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
29178 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
29179 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
29180 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
29181 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
29182 .rlen = 64,
29183 }, { /* RFC7539 A.2. Test Vector #2 */
29184 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29185 "\x00\x00\x00\x00\x00\x00\x00\x00"
29186 "\x00\x00\x00\x00\x00\x00\x00\x00"
29187 "\x00\x00\x00\x00\x00\x00\x00\x01",
29188 .klen = 32,
29189 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
29190 "\x00\x00\x00\x00\x00\x00\x00\x02",
29191 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
29192 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
29193 "\x6f\x20\x74\x68\x65\x20\x49\x45"
29194 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
29195 "\x64\x65\x64\x20\x62\x79\x20\x74"
29196 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
29197 "\x69\x62\x75\x74\x6f\x72\x20\x66"
29198 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
29199 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
29200 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
29201 "\x20\x70\x61\x72\x74\x20\x6f\x66"
29202 "\x20\x61\x6e\x20\x49\x45\x54\x46"
29203 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
29204 "\x74\x2d\x44\x72\x61\x66\x74\x20"
29205 "\x6f\x72\x20\x52\x46\x43\x20\x61"
29206 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
29207 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
29208 "\x20\x6d\x61\x64\x65\x20\x77\x69"
29209 "\x74\x68\x69\x6e\x20\x74\x68\x65"
29210 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
29211 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
29212 "\x45\x54\x46\x20\x61\x63\x74\x69"
29213 "\x76\x69\x74\x79\x20\x69\x73\x20"
29214 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
29215 "\x65\x64\x20\x61\x6e\x20\x22\x49"
29216 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
29217 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
29218 "\x22\x2e\x20\x53\x75\x63\x68\x20"
29219 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
29220 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
29221 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
29222 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
29223 "\x74\x73\x20\x69\x6e\x20\x49\x45"
29224 "\x54\x46\x20\x73\x65\x73\x73\x69"
29225 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
29226 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
29227 "\x77\x72\x69\x74\x74\x65\x6e\x20"
29228 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
29229 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
29230 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
29231 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
29232 "\x64\x65\x20\x61\x74\x20\x61\x6e"
29233 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
29234 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
29235 "\x20\x77\x68\x69\x63\x68\x20\x61"
29236 "\x72\x65\x20\x61\x64\x64\x72\x65"
29237 "\x73\x73\x65\x64\x20\x74\x6f",
29238 .ilen = 375,
29239 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
29240 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
29241 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
29242 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
29243 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
29244 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
29245 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
29246 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
29247 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
29248 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
29249 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
29250 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
29251 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
29252 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
29253 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
29254 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
29255 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
29256 "\xd6\x62\xab\x05\x26\x91\xca\x66"
29257 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
29258 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
29259 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
29260 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
29261 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
29262 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
29263 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
29264 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
29265 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
29266 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
29267 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
29268 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
29269 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
29270 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
29271 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
29272 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
29273 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
29274 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
29275 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
29276 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
29277 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
29278 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
29279 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
29280 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
29281 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
29282 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
29283 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
29284 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
29285 "\xc4\xfd\x80\x6c\x22\xf2\x21",
29286 .rlen = 375,
29287 }, { /* RFC7539 A.2. Test Vector #3 */
29288 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
29289 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
29290 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
29291 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
29292 .klen = 32,
29293 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
29294 "\x00\x00\x00\x00\x00\x00\x00\x02",
29295 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
29296 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
29297 "\x6e\x64\x20\x74\x68\x65\x20\x73"
29298 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
29299 "\x76\x65\x73\x0a\x44\x69\x64\x20"
29300 "\x67\x79\x72\x65\x20\x61\x6e\x64"
29301 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
29302 "\x69\x6e\x20\x74\x68\x65\x20\x77"
29303 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
29304 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
29305 "\x65\x72\x65\x20\x74\x68\x65\x20"
29306 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
29307 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
29308 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
29309 "\x72\x61\x74\x68\x73\x20\x6f\x75"
29310 "\x74\x67\x72\x61\x62\x65\x2e",
29311 .ilen = 127,
29312 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
29313 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
29314 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
29315 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
29316 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
29317 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
29318 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
29319 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
29320 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
29321 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
29322 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
29323 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
29324 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
29325 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
29326 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
29327 "\x75\x7a\x79\x7a\xc1\x88\xd1",
29328 .rlen = 127,
29329 },
29330};
29331
Herbert Xuda7f0332008-07-31 17:08:25 +080029332/*
29333 * CTS (Cipher Text Stealing) mode tests
29334 */
29335#define CTS_MODE_ENC_TEST_VECTORS 6
29336#define CTS_MODE_DEC_TEST_VECTORS 6
29337static struct cipher_testvec cts_mode_enc_tv_template[] = {
29338 { /* from rfc3962 */
29339 .klen = 16,
29340 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29341 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29342 .ilen = 17,
29343 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29344 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29345 "\x20",
29346 .rlen = 17,
29347 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
29348 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
29349 "\x97",
29350 }, {
29351 .klen = 16,
29352 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29353 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29354 .ilen = 31,
29355 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29356 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29357 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29358 "\x20\x47\x61\x75\x27\x73\x20",
29359 .rlen = 31,
29360 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
29361 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
29362 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29363 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
29364 }, {
29365 .klen = 16,
29366 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29367 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29368 .ilen = 32,
29369 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29370 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29371 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29372 "\x20\x47\x61\x75\x27\x73\x20\x43",
29373 .rlen = 32,
29374 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29375 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29376 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29377 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
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 = 47,
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",
29389 .rlen = 47,
29390 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29391 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29392 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
29393 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
29394 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29395 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
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 = 48,
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 .rlen = 48,
29408 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29409 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29410 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29411 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
29412 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29413 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
29414 }, {
29415 .klen = 16,
29416 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29417 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29418 .ilen = 64,
29419 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29420 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29421 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29422 "\x20\x47\x61\x75\x27\x73\x20\x43"
29423 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29424 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
29425 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
29426 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
29427 .rlen = 64,
29428 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29429 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29430 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29431 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29432 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
29433 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
29434 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29435 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
29436 }
29437};
29438
29439static struct cipher_testvec cts_mode_dec_tv_template[] = {
29440 { /* from rfc3962 */
29441 .klen = 16,
29442 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29443 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29444 .rlen = 17,
29445 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29446 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29447 "\x20",
29448 .ilen = 17,
29449 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
29450 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
29451 "\x97",
29452 }, {
29453 .klen = 16,
29454 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29455 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29456 .rlen = 31,
29457 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29458 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29459 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29460 "\x20\x47\x61\x75\x27\x73\x20",
29461 .ilen = 31,
29462 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
29463 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
29464 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29465 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
29466 }, {
29467 .klen = 16,
29468 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29469 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29470 .rlen = 32,
29471 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29472 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29473 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29474 "\x20\x47\x61\x75\x27\x73\x20\x43",
29475 .ilen = 32,
29476 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29477 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29478 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29479 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
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 = 47,
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",
29491 .ilen = 47,
29492 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29493 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29494 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
29495 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
29496 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29497 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
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 = 48,
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 .ilen = 48,
29510 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29511 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29512 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29513 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
29514 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29515 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
29516 }, {
29517 .klen = 16,
29518 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
29519 "\x74\x65\x72\x69\x79\x61\x6b\x69",
29520 .rlen = 64,
29521 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
29522 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
29523 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
29524 "\x20\x47\x61\x75\x27\x73\x20\x43"
29525 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
29526 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
29527 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
29528 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
29529 .ilen = 64,
29530 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
29531 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
29532 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
29533 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
29534 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
29535 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
29536 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
29537 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
29538 }
29539};
29540
29541/*
29542 * Compression stuff.
29543 */
29544#define COMP_BUF_SIZE 512
29545
29546struct comp_testvec {
29547 int inlen, outlen;
29548 char input[COMP_BUF_SIZE];
29549 char output[COMP_BUF_SIZE];
29550};
29551
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080029552struct pcomp_testvec {
David Howellsf94a3592015-04-28 15:36:30 +010029553 const void *params;
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080029554 unsigned int paramsize;
29555 int inlen, outlen;
29556 char input[COMP_BUF_SIZE];
29557 char output[COMP_BUF_SIZE];
29558};
29559
Herbert Xuda7f0332008-07-31 17:08:25 +080029560/*
29561 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110029562 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080029563 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080029564
Herbert Xuda7f0332008-07-31 17:08:25 +080029565#define DEFLATE_COMP_TEST_VECTORS 2
29566#define DEFLATE_DECOMP_TEST_VECTORS 2
29567
29568static struct comp_testvec deflate_comp_tv_template[] = {
29569 {
29570 .inlen = 70,
29571 .outlen = 38,
29572 .input = "Join us now and share the software "
29573 "Join us now and share the software ",
29574 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29575 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29576 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29577 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29578 "\x71\xbc\x08\x2b\x01\x00",
29579 }, {
29580 .inlen = 191,
29581 .outlen = 122,
29582 .input = "This document describes a compression method based on the DEFLATE"
29583 "compression algorithm. This document defines the application of "
29584 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29585 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29586 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29587 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29588 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29589 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29590 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29591 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29592 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29593 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29594 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29595 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29596 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29597 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29598 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29599 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29600 "\xfa\x02",
29601 },
29602};
29603
29604static struct comp_testvec deflate_decomp_tv_template[] = {
29605 {
29606 .inlen = 122,
29607 .outlen = 191,
29608 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29609 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29610 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29611 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29612 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29613 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29614 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29615 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29616 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29617 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29618 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29619 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29620 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29621 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29622 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29623 "\xfa\x02",
29624 .output = "This document describes a compression method based on the DEFLATE"
29625 "compression algorithm. This document defines the application of "
29626 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29627 }, {
29628 .inlen = 38,
29629 .outlen = 70,
29630 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29631 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29632 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29633 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29634 "\x71\xbc\x08\x2b\x01\x00",
29635 .output = "Join us now and share the software "
29636 "Join us now and share the software ",
29637 },
29638};
29639
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080029640#define ZLIB_COMP_TEST_VECTORS 2
29641#define ZLIB_DECOMP_TEST_VECTORS 2
29642
29643static const struct {
29644 struct nlattr nla;
29645 int val;
29646} deflate_comp_params[] = {
29647 {
29648 .nla = {
29649 .nla_len = NLA_HDRLEN + sizeof(int),
29650 .nla_type = ZLIB_COMP_LEVEL,
29651 },
29652 .val = Z_DEFAULT_COMPRESSION,
29653 }, {
29654 .nla = {
29655 .nla_len = NLA_HDRLEN + sizeof(int),
29656 .nla_type = ZLIB_COMP_METHOD,
29657 },
29658 .val = Z_DEFLATED,
29659 }, {
29660 .nla = {
29661 .nla_len = NLA_HDRLEN + sizeof(int),
29662 .nla_type = ZLIB_COMP_WINDOWBITS,
29663 },
29664 .val = -11,
29665 }, {
29666 .nla = {
29667 .nla_len = NLA_HDRLEN + sizeof(int),
29668 .nla_type = ZLIB_COMP_MEMLEVEL,
29669 },
29670 .val = MAX_MEM_LEVEL,
29671 }, {
29672 .nla = {
29673 .nla_len = NLA_HDRLEN + sizeof(int),
29674 .nla_type = ZLIB_COMP_STRATEGY,
29675 },
29676 .val = Z_DEFAULT_STRATEGY,
29677 }
29678};
29679
29680static const struct {
29681 struct nlattr nla;
29682 int val;
29683} deflate_decomp_params[] = {
29684 {
29685 .nla = {
29686 .nla_len = NLA_HDRLEN + sizeof(int),
29687 .nla_type = ZLIB_DECOMP_WINDOWBITS,
29688 },
29689 .val = -11,
29690 }
29691};
29692
29693static struct pcomp_testvec zlib_comp_tv_template[] = {
29694 {
29695 .params = &deflate_comp_params,
29696 .paramsize = sizeof(deflate_comp_params),
29697 .inlen = 70,
29698 .outlen = 38,
29699 .input = "Join us now and share the software "
29700 "Join us now and share the software ",
29701 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29702 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29703 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29704 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29705 "\x71\xbc\x08\x2b\x01\x00",
29706 }, {
29707 .params = &deflate_comp_params,
29708 .paramsize = sizeof(deflate_comp_params),
29709 .inlen = 191,
29710 .outlen = 122,
29711 .input = "This document describes a compression method based on the DEFLATE"
29712 "compression algorithm. This document defines the application of "
29713 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29714 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29715 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29716 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29717 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29718 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29719 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29720 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29721 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29722 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29723 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29724 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29725 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29726 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29727 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29728 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29729 "\xfa\x02",
29730 },
29731};
29732
29733static struct pcomp_testvec zlib_decomp_tv_template[] = {
29734 {
29735 .params = &deflate_decomp_params,
29736 .paramsize = sizeof(deflate_decomp_params),
29737 .inlen = 122,
29738 .outlen = 191,
29739 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
29740 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
29741 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
29742 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
29743 "\x68\x12\x51\xae\x76\x67\xd6\x27"
29744 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
29745 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
29746 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
29747 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
29748 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
29749 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
29750 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
29751 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
29752 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
29753 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
29754 "\xfa\x02",
29755 .output = "This document describes a compression method based on the DEFLATE"
29756 "compression algorithm. This document defines the application of "
29757 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
29758 }, {
29759 .params = &deflate_decomp_params,
29760 .paramsize = sizeof(deflate_decomp_params),
29761 .inlen = 38,
29762 .outlen = 70,
29763 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
29764 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
29765 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
29766 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
29767 "\x71\xbc\x08\x2b\x01\x00",
29768 .output = "Join us now and share the software "
29769 "Join us now and share the software ",
29770 },
29771};
29772
Herbert Xuda7f0332008-07-31 17:08:25 +080029773/*
29774 * LZO test vectors (null-terminated strings).
29775 */
29776#define LZO_COMP_TEST_VECTORS 2
29777#define LZO_DECOMP_TEST_VECTORS 2
29778
29779static struct comp_testvec lzo_comp_tv_template[] = {
29780 {
29781 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029782 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080029783 .input = "Join us now and share the software "
29784 "Join us now and share the software ",
29785 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029786 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
29787 "\x64\x20\x73\x68\x61\x72\x65\x20"
29788 "\x74\x68\x65\x20\x73\x6f\x66\x74"
29789 "\x77\x70\x01\x32\x88\x00\x0c\x65"
29790 "\x20\x74\x68\x65\x20\x73\x6f\x66"
29791 "\x74\x77\x61\x72\x65\x20\x11\x00"
29792 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080029793 }, {
29794 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029795 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080029796 .input = "This document describes a compression method based on the LZO "
29797 "compression algorithm. This document defines the application of "
29798 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029799 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080029800 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
29801 "\x64\x65\x73\x63\x72\x69\x62\x65"
29802 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
29803 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
29804 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
29805 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020029806 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
29807 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
29808 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
29809 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
29810 "\x73\x20\x74\x06\x05\x61\x70\x70"
29811 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
29812 "\x66\x88\x02\x60\x09\x27\xf0\x00"
29813 "\x0c\x20\x75\x73\x65\x64\x20\x69"
29814 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
29815 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080029816 },
29817};
29818
29819static struct comp_testvec lzo_decomp_tv_template[] = {
29820 {
29821 .inlen = 133,
29822 .outlen = 159,
29823 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
29824 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
29825 "\x64\x65\x73\x63\x72\x69\x62\x65"
29826 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
29827 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
29828 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
29829 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
29830 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
29831 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
29832 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
29833 "\x68\x69\x73\x2a\x54\x01\x02\x66"
29834 "\x69\x6e\x65\x73\x94\x06\x05\x61"
29835 "\x70\x70\x6c\x69\x63\x61\x74\x76"
29836 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
29837 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
29838 "\x20\x69\x6e\x20\x55\x42\x49\x46"
29839 "\x53\x2e\x11\x00\x00",
29840 .output = "This document describes a compression method based on the LZO "
29841 "compression algorithm. This document defines the application of "
29842 "the LZO algorithm used in UBIFS.",
29843 }, {
29844 .inlen = 46,
29845 .outlen = 70,
29846 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
29847 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
29848 "\x64\x20\x73\x68\x61\x72\x65\x20"
29849 "\x74\x68\x65\x20\x73\x6f\x66\x74"
29850 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
29851 "\x3d\x88\x00\x11\x00\x00",
29852 .output = "Join us now and share the software "
29853 "Join us now and share the software ",
29854 },
29855};
29856
29857/*
29858 * Michael MIC test vectors from IEEE 802.11i
29859 */
29860#define MICHAEL_MIC_TEST_VECTORS 6
29861
29862static struct hash_testvec michael_mic_tv_template[] = {
29863 {
29864 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
29865 .ksize = 8,
29866 .plaintext = zeroed_string,
29867 .psize = 0,
29868 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
29869 },
29870 {
29871 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
29872 .ksize = 8,
29873 .plaintext = "M",
29874 .psize = 1,
29875 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
29876 },
29877 {
29878 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
29879 .ksize = 8,
29880 .plaintext = "Mi",
29881 .psize = 2,
29882 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
29883 },
29884 {
29885 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
29886 .ksize = 8,
29887 .plaintext = "Mic",
29888 .psize = 3,
29889 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
29890 },
29891 {
29892 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
29893 .ksize = 8,
29894 .plaintext = "Mich",
29895 .psize = 4,
29896 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
29897 },
29898 {
29899 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
29900 .ksize = 8,
29901 .plaintext = "Michael",
29902 .psize = 7,
29903 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
29904 }
29905};
29906
29907/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020029908 * CRC32 test vectors
29909 */
29910#define CRC32_TEST_VECTORS 14
29911
29912static struct hash_testvec crc32_tv_template[] = {
29913 {
29914 .key = "\x87\xa9\xcb\xed",
29915 .ksize = 4,
29916 .psize = 0,
29917 .digest = "\x87\xa9\xcb\xed",
29918 },
29919 {
29920 .key = "\xff\xff\xff\xff",
29921 .ksize = 4,
29922 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
29923 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
29924 "\x11\x12\x13\x14\x15\x16\x17\x18"
29925 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
29926 "\x21\x22\x23\x24\x25\x26\x27\x28",
29927 .psize = 40,
29928 .digest = "\x3a\xdf\x4b\xb0",
29929 },
29930 {
29931 .key = "\xff\xff\xff\xff",
29932 .ksize = 4,
29933 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
29934 "\x31\x32\x33\x34\x35\x36\x37\x38"
29935 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
29936 "\x41\x42\x43\x44\x45\x46\x47\x48"
29937 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
29938 .psize = 40,
29939 .digest = "\xa9\x7a\x7f\x7b",
29940 },
29941 {
29942 .key = "\xff\xff\xff\xff",
29943 .ksize = 4,
29944 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
29945 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
29946 "\x61\x62\x63\x64\x65\x66\x67\x68"
29947 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
29948 "\x71\x72\x73\x74\x75\x76\x77\x78",
29949 .psize = 40,
29950 .digest = "\xba\xd3\xf8\x1c",
29951 },
29952 {
29953 .key = "\xff\xff\xff\xff",
29954 .ksize = 4,
29955 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
29956 "\x81\x82\x83\x84\x85\x86\x87\x88"
29957 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
29958 "\x91\x92\x93\x94\x95\x96\x97\x98"
29959 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
29960 .psize = 40,
29961 .digest = "\xa8\xa9\xc2\x02",
29962 },
29963 {
29964 .key = "\xff\xff\xff\xff",
29965 .ksize = 4,
29966 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
29967 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
29968 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
29969 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
29970 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
29971 .psize = 40,
29972 .digest = "\x27\xf0\x57\xe2",
29973 },
29974 {
29975 .key = "\xff\xff\xff\xff",
29976 .ksize = 4,
29977 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
29978 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
29979 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
29980 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
29981 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
29982 .psize = 40,
29983 .digest = "\x49\x78\x10\x08",
29984 },
29985 {
29986 .key = "\x80\xea\xd3\xf1",
29987 .ksize = 4,
29988 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
29989 "\x31\x32\x33\x34\x35\x36\x37\x38"
29990 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
29991 "\x41\x42\x43\x44\x45\x46\x47\x48"
29992 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
29993 .psize = 40,
29994 .digest = "\x9a\xb1\xdc\xf0",
29995 },
29996 {
29997 .key = "\xf3\x4a\x1d\x5d",
29998 .ksize = 4,
29999 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30000 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30001 "\x61\x62\x63\x64\x65\x66\x67\x68"
30002 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30003 "\x71\x72\x73\x74\x75\x76\x77\x78",
30004 .psize = 40,
30005 .digest = "\xb4\x97\xcc\xd4",
30006 },
30007 {
30008 .key = "\x2e\x80\x04\x59",
30009 .ksize = 4,
30010 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30011 "\x81\x82\x83\x84\x85\x86\x87\x88"
30012 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30013 "\x91\x92\x93\x94\x95\x96\x97\x98"
30014 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30015 .psize = 40,
30016 .digest = "\x67\x9b\xfa\x79",
30017 },
30018 {
30019 .key = "\xa6\xcc\x19\x85",
30020 .ksize = 4,
30021 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30022 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30023 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30024 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30025 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30026 .psize = 40,
30027 .digest = "\x24\xb5\x16\xef",
30028 },
30029 {
30030 .key = "\x41\xfc\xfe\x2d",
30031 .ksize = 4,
30032 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30033 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30034 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30035 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30036 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30037 .psize = 40,
30038 .digest = "\x15\x94\x80\x39",
30039 },
30040 {
30041 .key = "\xff\xff\xff\xff",
30042 .ksize = 4,
30043 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30044 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30045 "\x11\x12\x13\x14\x15\x16\x17\x18"
30046 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30047 "\x21\x22\x23\x24\x25\x26\x27\x28"
30048 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30049 "\x31\x32\x33\x34\x35\x36\x37\x38"
30050 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30051 "\x41\x42\x43\x44\x45\x46\x47\x48"
30052 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30053 "\x51\x52\x53\x54\x55\x56\x57\x58"
30054 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30055 "\x61\x62\x63\x64\x65\x66\x67\x68"
30056 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30057 "\x71\x72\x73\x74\x75\x76\x77\x78"
30058 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30059 "\x81\x82\x83\x84\x85\x86\x87\x88"
30060 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30061 "\x91\x92\x93\x94\x95\x96\x97\x98"
30062 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30063 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30064 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30065 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30066 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30067 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30068 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30069 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30070 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30071 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30072 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30073 .psize = 240,
30074 .digest = "\x6c\xc6\x56\xde",
30075 .np = 2,
30076 .tap = { 31, 209 }
30077 }, {
30078 .key = "\xff\xff\xff\xff",
30079 .ksize = 4,
30080 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
30081 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
30082 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
30083 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
30084 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
30085 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
30086 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
30087 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
30088 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
30089 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
30090 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
30091 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
30092 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
30093 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
30094 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
30095 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
30096 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
30097 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
30098 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
30099 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
30100 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
30101 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
30102 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
30103 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
30104 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
30105 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
30106 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
30107 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
30108 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
30109 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
30110 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
30111 "\x47\xde\x75\x0c\x80\x17\xae\x22"
30112 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
30113 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
30114 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
30115 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
30116 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
30117 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
30118 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
30119 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
30120 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
30121 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
30122 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
30123 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
30124 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
30125 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
30126 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
30127 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
30128 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
30129 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
30130 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
30131 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
30132 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
30133 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
30134 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
30135 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
30136 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
30137 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
30138 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
30139 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
30140 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
30141 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
30142 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
30143 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
30144 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
30145 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
30146 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
30147 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
30148 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
30149 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
30150 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
30151 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
30152 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
30153 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
30154 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
30155 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
30156 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
30157 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
30158 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
30159 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
30160 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
30161 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
30162 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
30163 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
30164 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
30165 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
30166 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
30167 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
30168 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
30169 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
30170 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
30171 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
30172 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
30173 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
30174 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
30175 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
30176 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
30177 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
30178 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
30179 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
30180 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
30181 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
30182 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
30183 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
30184 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
30185 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
30186 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
30187 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
30188 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
30189 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
30190 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
30191 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
30192 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
30193 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
30194 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
30195 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
30196 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
30197 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
30198 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
30199 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
30200 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
30201 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
30202 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
30203 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
30204 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
30205 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
30206 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
30207 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
30208 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
30209 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
30210 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
30211 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
30212 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
30213 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
30214 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
30215 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
30216 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
30217 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
30218 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
30219 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
30220 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
30221 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
30222 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
30223 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
30224 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
30225 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
30226 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
30227 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
30228 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
30229 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
30230 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
30231 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
30232 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
30233 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
30234 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
30235 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
30236 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
30237 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
30238 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
30239 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
30240 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
30241 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
30242 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
30243 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
30244 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
30245 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
30246 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
30247 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
30248 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
30249 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
30250 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
30251 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
30252 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
30253 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
30254 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
30255 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
30256 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
30257 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
30258 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
30259 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
30260 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
30261 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
30262 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
30263 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
30264 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
30265 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
30266 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
30267 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
30268 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
30269 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
30270 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
30271 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
30272 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
30273 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
30274 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
30275 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
30276 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
30277 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
30278 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
30279 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
30280 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
30281 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
30282 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
30283 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
30284 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
30285 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
30286 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
30287 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
30288 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
30289 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
30290 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
30291 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
30292 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
30293 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
30294 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
30295 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
30296 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
30297 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
30298 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
30299 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
30300 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
30301 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
30302 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
30303 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
30304 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
30305 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
30306 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
30307 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
30308 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
30309 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
30310 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
30311 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
30312 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
30313 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
30314 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
30315 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
30316 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
30317 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
30318 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
30319 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
30320 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
30321 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
30322 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
30323 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
30324 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
30325 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
30326 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
30327 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
30328 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
30329 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
30330 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
30331 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
30332 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
30333 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
30334 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
30335 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
30336 .psize = 2048,
30337 .digest = "\xfb\x3a\x7a\xda",
30338 }
30339};
30340
30341/*
Herbert Xuda7f0332008-07-31 17:08:25 +080030342 * CRC32C test vectors
30343 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020030344#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080030345
30346static struct hash_testvec crc32c_tv_template[] = {
30347 {
30348 .psize = 0,
30349 .digest = "\x00\x00\x00\x00",
30350 },
30351 {
30352 .key = "\x87\xa9\xcb\xed",
30353 .ksize = 4,
30354 .psize = 0,
30355 .digest = "\x78\x56\x34\x12",
30356 },
30357 {
30358 .key = "\xff\xff\xff\xff",
30359 .ksize = 4,
30360 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30361 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30362 "\x11\x12\x13\x14\x15\x16\x17\x18"
30363 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30364 "\x21\x22\x23\x24\x25\x26\x27\x28",
30365 .psize = 40,
30366 .digest = "\x7f\x15\x2c\x0e",
30367 },
30368 {
30369 .key = "\xff\xff\xff\xff",
30370 .ksize = 4,
30371 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30372 "\x31\x32\x33\x34\x35\x36\x37\x38"
30373 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30374 "\x41\x42\x43\x44\x45\x46\x47\x48"
30375 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30376 .psize = 40,
30377 .digest = "\xf6\xeb\x80\xe9",
30378 },
30379 {
30380 .key = "\xff\xff\xff\xff",
30381 .ksize = 4,
30382 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30383 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30384 "\x61\x62\x63\x64\x65\x66\x67\x68"
30385 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30386 "\x71\x72\x73\x74\x75\x76\x77\x78",
30387 .psize = 40,
30388 .digest = "\xed\xbd\x74\xde",
30389 },
30390 {
30391 .key = "\xff\xff\xff\xff",
30392 .ksize = 4,
30393 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30394 "\x81\x82\x83\x84\x85\x86\x87\x88"
30395 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30396 "\x91\x92\x93\x94\x95\x96\x97\x98"
30397 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30398 .psize = 40,
30399 .digest = "\x62\xc8\x79\xd5",
30400 },
30401 {
30402 .key = "\xff\xff\xff\xff",
30403 .ksize = 4,
30404 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30405 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30406 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30407 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30408 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30409 .psize = 40,
30410 .digest = "\xd0\x9a\x97\xba",
30411 },
30412 {
30413 .key = "\xff\xff\xff\xff",
30414 .ksize = 4,
30415 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30416 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30417 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30418 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30419 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30420 .psize = 40,
30421 .digest = "\x13\xd9\x29\x2b",
30422 },
30423 {
30424 .key = "\x80\xea\xd3\xf1",
30425 .ksize = 4,
30426 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30427 "\x31\x32\x33\x34\x35\x36\x37\x38"
30428 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30429 "\x41\x42\x43\x44\x45\x46\x47\x48"
30430 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30431 .psize = 40,
30432 .digest = "\x0c\xb5\xe2\xa2",
30433 },
30434 {
30435 .key = "\xf3\x4a\x1d\x5d",
30436 .ksize = 4,
30437 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30438 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30439 "\x61\x62\x63\x64\x65\x66\x67\x68"
30440 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30441 "\x71\x72\x73\x74\x75\x76\x77\x78",
30442 .psize = 40,
30443 .digest = "\xd1\x7f\xfb\xa6",
30444 },
30445 {
30446 .key = "\x2e\x80\x04\x59",
30447 .ksize = 4,
30448 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30449 "\x81\x82\x83\x84\x85\x86\x87\x88"
30450 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30451 "\x91\x92\x93\x94\x95\x96\x97\x98"
30452 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30453 .psize = 40,
30454 .digest = "\x59\x33\xe6\x7a",
30455 },
30456 {
30457 .key = "\xa6\xcc\x19\x85",
30458 .ksize = 4,
30459 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30460 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30461 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30462 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30463 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30464 .psize = 40,
30465 .digest = "\xbe\x03\x01\xd2",
30466 },
30467 {
30468 .key = "\x41\xfc\xfe\x2d",
30469 .ksize = 4,
30470 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30471 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30472 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30473 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30474 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30475 .psize = 40,
30476 .digest = "\x75\xd3\xc5\x24",
30477 },
30478 {
30479 .key = "\xff\xff\xff\xff",
30480 .ksize = 4,
30481 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30482 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30483 "\x11\x12\x13\x14\x15\x16\x17\x18"
30484 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30485 "\x21\x22\x23\x24\x25\x26\x27\x28"
30486 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30487 "\x31\x32\x33\x34\x35\x36\x37\x38"
30488 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30489 "\x41\x42\x43\x44\x45\x46\x47\x48"
30490 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30491 "\x51\x52\x53\x54\x55\x56\x57\x58"
30492 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30493 "\x61\x62\x63\x64\x65\x66\x67\x68"
30494 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30495 "\x71\x72\x73\x74\x75\x76\x77\x78"
30496 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30497 "\x81\x82\x83\x84\x85\x86\x87\x88"
30498 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30499 "\x91\x92\x93\x94\x95\x96\x97\x98"
30500 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30501 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30502 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30503 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30504 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30505 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30506 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30507 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30508 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30509 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30510 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30511 .psize = 240,
30512 .digest = "\x75\xd3\xc5\x24",
30513 .np = 2,
30514 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020030515 }, {
30516 .key = "\xff\xff\xff\xff",
30517 .ksize = 4,
30518 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
30519 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
30520 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
30521 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
30522 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
30523 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
30524 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
30525 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
30526 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
30527 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
30528 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
30529 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
30530 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
30531 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
30532 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
30533 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
30534 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
30535 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
30536 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
30537 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
30538 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
30539 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
30540 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
30541 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
30542 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
30543 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
30544 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
30545 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
30546 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
30547 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
30548 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
30549 "\x47\xde\x75\x0c\x80\x17\xae\x22"
30550 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
30551 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
30552 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
30553 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
30554 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
30555 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
30556 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
30557 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
30558 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
30559 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
30560 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
30561 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
30562 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
30563 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
30564 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
30565 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
30566 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
30567 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
30568 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
30569 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
30570 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
30571 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
30572 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
30573 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
30574 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
30575 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
30576 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
30577 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
30578 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
30579 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
30580 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
30581 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
30582 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
30583 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
30584 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
30585 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
30586 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
30587 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
30588 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
30589 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
30590 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
30591 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
30592 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
30593 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
30594 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
30595 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
30596 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
30597 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
30598 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
30599 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
30600 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
30601 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
30602 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
30603 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
30604 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
30605 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
30606 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
30607 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
30608 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
30609 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
30610 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
30611 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
30612 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
30613 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
30614 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
30615 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
30616 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
30617 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
30618 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
30619 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
30620 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
30621 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
30622 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
30623 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
30624 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
30625 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
30626 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
30627 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
30628 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
30629 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
30630 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
30631 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
30632 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
30633 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
30634 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
30635 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
30636 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
30637 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
30638 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
30639 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
30640 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
30641 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
30642 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
30643 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
30644 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
30645 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
30646 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
30647 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
30648 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
30649 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
30650 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
30651 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
30652 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
30653 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
30654 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
30655 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
30656 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
30657 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
30658 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
30659 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
30660 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
30661 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
30662 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
30663 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
30664 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
30665 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
30666 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
30667 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
30668 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
30669 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
30670 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
30671 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
30672 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
30673 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
30674 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
30675 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
30676 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
30677 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
30678 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
30679 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
30680 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
30681 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
30682 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
30683 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
30684 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
30685 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
30686 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
30687 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
30688 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
30689 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
30690 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
30691 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
30692 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
30693 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
30694 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
30695 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
30696 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
30697 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
30698 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
30699 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
30700 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
30701 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
30702 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
30703 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
30704 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
30705 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
30706 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
30707 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
30708 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
30709 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
30710 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
30711 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
30712 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
30713 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
30714 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
30715 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
30716 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
30717 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
30718 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
30719 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
30720 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
30721 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
30722 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
30723 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
30724 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
30725 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
30726 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
30727 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
30728 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
30729 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
30730 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
30731 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
30732 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
30733 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
30734 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
30735 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
30736 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
30737 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
30738 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
30739 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
30740 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
30741 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
30742 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
30743 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
30744 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
30745 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
30746 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
30747 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
30748 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
30749 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
30750 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
30751 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
30752 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
30753 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
30754 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
30755 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
30756 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
30757 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
30758 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
30759 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
30760 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
30761 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
30762 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
30763 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
30764 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
30765 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
30766 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
30767 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
30768 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
30769 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
30770 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
30771 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
30772 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
30773 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
30774 .psize = 2048,
30775 .digest = "\xec\x26\x4d\x95",
30776 }
Herbert Xuda7f0332008-07-31 17:08:25 +080030777};
30778
Sonic Zhanga482b082012-05-25 17:54:13 +080030779/*
30780 * Blakcifn CRC test vectors
30781 */
30782#define BFIN_CRC_TEST_VECTORS 6
30783
30784static struct hash_testvec bfin_crc_tv_template[] = {
30785 {
30786 .psize = 0,
30787 .digest = "\x00\x00\x00\x00",
30788 },
30789 {
30790 .key = "\x87\xa9\xcb\xed",
30791 .ksize = 4,
30792 .psize = 0,
30793 .digest = "\x87\xa9\xcb\xed",
30794 },
30795 {
30796 .key = "\xff\xff\xff\xff",
30797 .ksize = 4,
30798 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30799 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30800 "\x11\x12\x13\x14\x15\x16\x17\x18"
30801 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30802 "\x21\x22\x23\x24\x25\x26\x27\x28",
30803 .psize = 40,
30804 .digest = "\x84\x0c\x8d\xa2",
30805 },
30806 {
30807 .key = "\xff\xff\xff\xff",
30808 .ksize = 4,
30809 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30810 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30811 "\x11\x12\x13\x14\x15\x16\x17\x18"
30812 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30813 "\x21\x22\x23\x24\x25\x26",
30814 .psize = 38,
30815 .digest = "\x8c\x58\xec\xb7",
30816 },
30817 {
30818 .key = "\xff\xff\xff\xff",
30819 .ksize = 4,
30820 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30821 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30822 "\x11\x12\x13\x14\x15\x16\x17\x18"
30823 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30824 "\x21\x22\x23\x24\x25\x26\x27",
30825 .psize = 39,
30826 .digest = "\xdc\x50\x28\x7b",
30827 },
30828 {
30829 .key = "\xff\xff\xff\xff",
30830 .ksize = 4,
30831 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30832 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30833 "\x11\x12\x13\x14\x15\x16\x17\x18"
30834 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30835 "\x21\x22\x23\x24\x25\x26\x27\x28"
30836 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30837 "\x31\x32\x33\x34\x35\x36\x37\x38"
30838 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30839 "\x41\x42\x43\x44\x45\x46\x47\x48"
30840 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30841 "\x51\x52\x53\x54\x55\x56\x57\x58"
30842 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30843 "\x61\x62\x63\x64\x65\x66\x67\x68"
30844 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30845 "\x71\x72\x73\x74\x75\x76\x77\x78"
30846 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30847 "\x81\x82\x83\x84\x85\x86\x87\x88"
30848 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30849 "\x91\x92\x93\x94\x95\x96\x97\x98"
30850 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30851 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30852 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30853 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30854 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30855 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30856 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30857 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30858 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30859 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30860 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30861 .psize = 240,
30862 .digest = "\x10\x19\x4a\x5c",
30863 .np = 2,
30864 .tap = { 31, 209 }
30865 },
30866
30867};
30868
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020030869#define LZ4_COMP_TEST_VECTORS 1
30870#define LZ4_DECOMP_TEST_VECTORS 1
30871
30872static struct comp_testvec lz4_comp_tv_template[] = {
30873 {
30874 .inlen = 70,
30875 .outlen = 45,
30876 .input = "Join us now and share the software "
30877 "Join us now and share the software ",
30878 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30879 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30880 "\x64\x20\x73\x68\x61\x72\x65\x20"
30881 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30882 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30883 "\x77\x61\x72\x65\x20",
30884 },
30885};
30886
30887static struct comp_testvec lz4_decomp_tv_template[] = {
30888 {
30889 .inlen = 45,
30890 .outlen = 70,
30891 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30892 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30893 "\x64\x20\x73\x68\x61\x72\x65\x20"
30894 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30895 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30896 "\x77\x61\x72\x65\x20",
30897 .output = "Join us now and share the software "
30898 "Join us now and share the software ",
30899 },
30900};
30901
30902#define LZ4HC_COMP_TEST_VECTORS 1
30903#define LZ4HC_DECOMP_TEST_VECTORS 1
30904
30905static struct comp_testvec lz4hc_comp_tv_template[] = {
30906 {
30907 .inlen = 70,
30908 .outlen = 45,
30909 .input = "Join us now and share the software "
30910 "Join us now and share the software ",
30911 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30912 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30913 "\x64\x20\x73\x68\x61\x72\x65\x20"
30914 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30915 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30916 "\x77\x61\x72\x65\x20",
30917 },
30918};
30919
30920static struct comp_testvec lz4hc_decomp_tv_template[] = {
30921 {
30922 .inlen = 45,
30923 .outlen = 70,
30924 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
30925 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30926 "\x64\x20\x73\x68\x61\x72\x65\x20"
30927 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30928 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
30929 "\x77\x61\x72\x65\x20",
30930 .output = "Join us now and share the software "
30931 "Join us now and share the software ",
30932 },
30933};
30934
Herbert Xuda7f0332008-07-31 17:08:25 +080030935#endif /* _CRYPTO_TESTMGR_H */